: The Scratchpad :

Restoring Linux – Restoring Grub

If you install Windows on a sytem that has Linux or if you reinstall Windows on dual boot system, the boot loader will be overwritten by Windows Installation.

Good news is that, this does not overwrite the Linux installation, but just the bootloader in the MBR.

Here are the steps to recover your Linux partition:

1. Boot from Linux Installation disk. You need to boot in a special mode called “Linux Rescue”.

2. Depending on the Linux version you may be presented a command prompt or GUI.

If command line, type : linux rescue

If GUI, select: Rescue installed system.

3. chroot /mnt/sysimage

4. cd /sbin

5. grub

6. find /boot/grub/stage1

7. From the list, select the suitable partition that had Grub previsouly installed.

Eg: grub > find /boot/grub/stage1

(hd0,4)

(hd0,5)   <————— Assuming that this is the drive, our next command will be

8. root (hd0,5)

9. setup (hd0)

Note : Here (hd0) represents MBR, and it is not a typo

January 21, 2009 - Posted by | Linux Tips

No comments yet.

Leave a comment