jump to navigation

How to reinstall the Grub loader in Ubuntu when Windows overwrites it. December 23, 2007

Posted by ubuntuanswers in Ubuntu Fixes.
trackback

If you run a dual-boot system with Linux and Windows, I am sure this has happened to you. You had to do your quarterly reinstall of Windows, and now you don’t see the Grub bootloader anymore, so you can’t boot into Ubuntu.

Here’s the quick and easy way to re-enable Grub.

1) Boot off the LiveCD

2) Open a Terminal and type in the following commands, noting that the first command will put you into the grub “prompt”, and the next 3 commands will be executed there. Also note that hd0,0 implies the first hard drive and the first partition on that drive, which is where you probably installed grub to during installation. If not, then adjust accordingly.
sudo grub
root (hd0,0)
setup (hd0)
exit

Reboot (removing the livecd), and your boot menu should be back.

Comments»

No comments yet — be the first.