I have both ubuntu and windows XP installed in my thinkpad X61. The mbr on my laptop was erased after executing the System Update under windows XP this afternoon. 😦 The grub menu was gone with only four letters – GRUB – appeared on screen after rebooting. The mbr might also be destroyed when you reinstall windows XP. This article will help you to resotre your original mbr using ubuntu live CD.
Here is a way to restore the grub mbr if you have grub previously installed.
- Get a ubuntu installation CD. Boot your computer from the live CD. Select the “graphic safe mode”(don’t remember the exact label) which is right below the install ubuntu selection. It’s going to take a while for Ubuntu live CD to boot.
- After entering the desktop, open a terminal. The Ubuntu live CD does not mount the drives so you have to do it yourself. Let’s mount the disk, which Ubuntu was installed, to /media (or whatever place you prefer) first.
sudo mount -t ext2 /dev/sda# /media/
# is the drive number Ubuntu installed to. In my case, it’s /dev/sda3.
- Then you have to mount proc and dev to /media as well. This will allow your devices to be detectable after we apply chroot in step 5.
sudo mount -t proc none /media/proc
sudo mount -o bind dev /media/dev
- cd to the directory /media/boot/grub/ and make sure the file stage1 is there. It should be there if you have grub previously installed. If the file is not there, sorry you will have to google a solution to fix your problem. 😦
- Change current system root to /media/ which is the root of your previous installed ubuntu!
sudo chroot /media
- Now you are in the chroot environment.
This will lead you to the grub shell with a grub> prompt.
- In the grub shel, enter
It will return parameter in the format of (hdX,Y). that is used in next step.
put a space between root and (hdX,Y)
- Then enter
- Enter quit to leave grub and then reboot.
- The GRUB menu should appear on the next boot up.