Re-installing GRUB after installing Windows

January 12, 2009

This post lists out the steps for reinstalling GRUB. You might have lost it by reinstalling Windows (Windows put its bootloader into MBR), or due to any other reason.
This is written for BOSS Linux and should work on most other distributions.

You’ll need to boot using the Live CD or DVD.

Once you are at the desktop open up the terminal (Applications>Accessories>Terminal)

In the terminal type: sudo grub

This will get you to a grub> prompt.

Now type find /boot/grub/stage1

This will return a location, on my system it returns (hd0,3), now based on this location type: root (hd0,3) remember to replace 0 and three with the information specific to your system.

Then type setup (hd0).

Note the space between root and (hd0,3), setup and (hd0). (thanks to tckb for pointing it out)

We’re done, now type exit and reboot. If all goes well you should be looking at the GRUB menu upon reboot.

Update: This post is related to grub-legacy(0.97) used in versions prior to BOSS version 4. The steps mentioned here will not work on BOSS 4 and above.