Reset GRUB Password

From CDOT Wiki
Revision as of 16:25, 28 September 2010 by Cheping (talk | contribs)
Jump to: navigation, search

You followed Lab 2 instruction and secure your system with GRUB password. Now you need to boot your system to single user mode but you can,t remember where you put that piece of paper that has the GRUB password on it. Now, what can you do?

To solve this problem, you need one piece of information and your Live Fedora CD.

The information that you need is the partition # on your hard disk you used as the boot partition. Suppose it is the first logical partition, which is partition 5, or /dev/sda5 if it is the first hard disk.

Here are the steps to reset or remove your GRUB password:

  • Boot your system with your Live Fedora CD.
  • Login to your Fedora as liveuser and switch to root.
  • mount the boot partition to /mnt with the following command:
#> mount -t ext3 /dev/sda5 /mnt
  • Edit the file /mnt/grub/grub.conf to modify or remove the grub password
  • Shutdown the Live Fedora, remove the CD and reboot.