[PLUG] How to recover GRUB on MBR
netvaibhav at gmail.com
Sun Jul 5 20:36:56 PDT 2009
On Sun, Jul 5, 2009 at 7:18 PM, Pankaj Kumar<pankaj at glug4muz.org> wrote:
> Hi all,
> Initially on my system Windows Xp and Open SUSE 11 was installed. The menu to
> switch between these two operating systems was appearing with the help of
> GRUB boot loader. Yesterday I reinstalled Windows Xp due to some problem in
> it. Now GRUB is not appearing. So I am unable to boot into Open SUSE 11. I
> know that Open SUSE 11 is still installed in one of the partition of my hard
> disk. But as MBR has been overwritten by Windows Xp and so I am not able to
> boot into Open SUSE 11. So please tell me how to recover GRUB on MBR?
I have run into this situation several times and the recovery is quite
simple. All you need is a live CD to boot into some Linux.
Assuming your root partition is /dev/sda5 and you do not have a
separate /boot partition,
1. Boot live CD
2. On root prompt:
# mkdir /mnt/sda5
# mount /dev/sda5 /mnt/sda5
# grub-install --root-directory=/mnt/sda5 '(hd0)'
More information about the plug-mail