Reinstalling GRUB after windows wipes out grub in MBR record!
Posted on Apr 16, 2008 under General, Ubuntu |If you are experiencing the problem where windows boots up and grub boot loader is missing and you can’t boot to ubuntu , that’s probably because when you run windows installation ( just run it , even you didn’t install it also same result) it tends to clear your grub from the master boot record (mbr). Its totally something you didn’t expect and it hits you badly.
The solution? All you need is Ubuntu live cd.Boot up to ubuntu using the live cd and then you use your terminal to type the following commands :
-$ sudo -s
To make you root.
-$ grub
Here you will enter the grub program.
-$ root (hda, 1)
Then you set the root where your root filesystem for ubuntu is located (which is the location of the grub config file). For example mine is in the hda1 partition. If you are unsure just run fdisk -l in the terminal and you should see /dev/hda3 linux swap , /dev/hda4 and etc. Carefully select and then run
-$setup (hda)
-$quit
And that’s it grub will overwrite the settings and you can now reboot and you should see grub menu. If your grub menu doesn’t contain windows in the selection then you have to insert it in the grub menu file.
-$sudo vim /boot/grub/menu.lst
title WindowsXP PRO
root (hd4,4)
makeactive
chainloader +1
Save and then reboot you should see your windows in the grub menu.
Share This
By anonymous on Apr 16, 2008 | Reply
# grub-install /dev/hda
By SoLoMoN on May 12, 2008 | Reply
grav, i’m amazed…you do write…kekekee
just bought http://www.mysatrianeo.com
-SouL-