Resintalling grub from single user mode

While surfing the web this weekend, I came across the following procedure for reinstalling grub from the command line:

1. Boot the system from an installation boot medium.

2. Type linux rescue at the installation boot prompt to enter the rescue environment.

3. Type chroot /mnt/sysimage to mount the root partition.

4. Type /sbin/grub-install /dev/hda to reinstall the GRUB boot loader, where /dev/hda is the boot partition.

5. Review the /boot/grub/grub.conf file, as additional entries may be needed for GRUB to control additional operating systems.

6. Reboot the system.

This is useful stuff, and having it handy can save you time you get into a bind.

Leave a Reply

Your email address will not be published. Required fields are marked *