Ubuntu:Feisty th/BootMenu
From
เมนูบู๊ต
จะใช้สิทธิ root โดยไม่เข้าระบบอย่างไร
- อ่านก่อนใช้งาน
- วิธีง่ายที่สุด (จะใช้ไม่ได้หากตั้งรหัสผ่านเมนู GRUB ไว้)
- บู๊ตเครื่องคอมพิวเตอร์
- หากไม่ขึ้นเมนู GRUB ให้กด 'Esc' เพื่อเข้าเมนู
- เลื่อนตัวเลือกไปที่
Ubuntu, kernel 2.6.10-5-386 (recovery mode)
- กด 'Enter' เพื่อเข้าใช้งาน
- วิธีอื่น
วิธีแก้ไขอาร์กิวเมนต์การบู๊ตของเคอเนลเพื่อเข้าใช้สิทธิของรูท
- อ่านก่อนใช้งาน
- บู๊ตเครื่องคอมพิวเตอร์
- หากเมนู GRUB ซ่อนไว้ ให้กด 'Esc' เพื่อเข้าเมนู GRUB
- หากใส่รหัสเมนู GRUB ไว้ กด 'p' เพื่อปลดล็อคเมนู GRUB
- เลือก
Ubuntu, kernel 2.6.10-5-386
- กด 'e' เพื่อแก้ไขคำสั่งก่อนบู๊ต
- เลือก
kernel /boot/vmlinuz-2.6.10-5-386 root=/dev/hda2 ro quiet splash
- กด 'e' เพื่อแก้ไขคำสั่งที่เลือกไว้ในลำดับการบู๊ต
- เพิ่ม "rw init=/bin/bash" ต่อท้ายอาร์กิวเมนต์ จะได้ประมาณ
grub edit> kernel /boot/vmlinuz-2.6.10-5-386 root=/dev/hda2 ro quiet splash rw init=/bin/bash
- กด 'b' เพื่อบู๊ต
How to use Ubuntu Installation CD, to gain root user access
- Read #General Notes
- Boot-up computer into Ubuntu Installation CD
- At "boot:" prompt, add "rescue" to the argument
boot: rescue
- Follow the instructions on screen
How to change root user/main user password if forgotten
- Read #General Notes
- Read #How to gain root user access without login
- To change root user password
# passwd root
- To change main user password
# passwd system_main_username
How to change GRUB menu password if forgotten
- Read #General Notes
grub
grub> md5crypt Password: ****** (ubuntu) Encrypted: $1$ZWnke0$1fzDBVjUcT1Mpdd4u/T961 (encrypted password) grub> quit
sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup gksudo gedit /boot/grub/menu.lst
- Find this line
... password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/ ...
- Replace with the following line
password --md5 $1$ZWnke0$1fzDBVjUcT1Mpdd4u/T961 (encrypted password above)
- Save the edited file
How to restore GRUB menu after Windows installation
Super Grub Disk
- Use Super Grub Disk
- More info on how to use it here
Grub
If you have booted your linux distro with Super Grub Disk, or a live CD and want to restore your grub, follow the below instructions:
- As root (or with sudo), type
grub - When at the grub prompt, type
find /boot/grub/stage2 - This will return something like
(hd0,2) - To setup the boot partition boot type
root (hd0,2). This is the harddrive and the partition your linux is installed on... - And then to configure grub type
setup (hd0) - Now you're done, so exit with
quit
How to identify the name of the boot drive (hd0, hd1, hd2, etc)
Press "c" on boot menu. If you don't see a boot menu, press ESC key first when booting to show the boot menu.
Type:
root (hd0,0)
Most likely you will get "(hd0,0) ext2fs", which should be your current Linux drive. Now change hd0 to hd1 to see what is there.
root (hd1,0)
If you get "(hd1,0) filesystem type unknown, partition type 0x7", then hd1 is a Windows drive.
Now change hd1 to hd2, keep going until you reach hd7.
How to add Windows entry into GRUB menu
- Read #General Notes
- Read #How to list partition tables
- e.g. Assumed that /dev/hda1 is the location of Windows partition
sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup gksudo gedit /boot/grub/menu.lst
- Append the following lines at the end of file
title Microsoft Windows root (hd0,0) savedefault makeactive chainloader +1
- Save the edited file
How to boot into Windows installed on a seperate SATA drive
This configuration applies to people who have Linux installed on a IDE drive, and Windows installed on a seperate SATA. The IDE drive boots first, so we need to add an entry to the boot menu on the Linux disk. Here we assume the name of your Windows drive is hd1. If you are not sure, click the link above to find out.
sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup gksudo gedit /boot/grub/menu.lst
- Append the following lines at the end of file.
title Windows XP on SATA drive map (hd0) (hd1) map (hd1) (hd0) chainloader (hd1,0)+1
- Save the edited file
How to read Linux partitions (ext2, ext3) in Windows machine
- Read #General Notes
- Download Explore2fs: Here
- OR

