Reinstalling GRUB

GRUB is generally lost due to Windows install or if your MBR gets erased. Follow the simple steps given below to restore GRUB.

1. Boot your computer using a Linux live CD.

2. Open a terminal and type,

liveuser@liveuser-laptop:~$ sudo grub

This gives you the grub prompt.

3. To inform the GRUB about the location of the GRUB files, we should know it ourselves first. Generally, it is (hd0,1), which means hda (primary controller master) in the second partition.

If you know where they are, type ,

grub> root (hd0,1)

Else to find out, type,

grub> find /boot/grub/stage1

4. Then install it on hd0 (or any other hard drive in your case), which is the MBR of the first HDD.

grub>setup (hd0)

5. To quit, type

grub> quit

6. Reboot your machine.

liveuser@liveuser-laptop:~$ reboot

The GRUB menu appears on system reboot.



Comments