[PLUG] How to recover GRUB on MBR
pranavpeshwe at gmail.com
Sun Jul 5 21:06:24 PDT 2009
On Mon, Jul 6, 2009 at 9:06 AM, Vaibhav Kulkarni <netvaibhav at gmail.com>wrote:
> 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
> > it. Now GRUB is not appearing. So I am unable to boot into Open SUSE 11.
> > know that Open SUSE 11 is still installed in one of the partition of my
> > disk. But as MBR has been overwritten by Windows Xp and so I am not able
> > 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
I think mounting is not required since, writing an MBR is not a filesystem
dependent task. `grub-install /dev/<boot/root partition name>` should do
> # grub-install --root-directory=/mnt/sda5 '(hd0)'
> 3. Reboot.
I would recommend a read of the howtos and documentation available related
to grub and bootloaders. That will help you to backup and restore your
bootloader and understand things better.
My 2 cents...
More information about the plug-mail