Tuesday, April 28, 2009

Restore Ubuntu GRUB After Windows wipes it out

This is a common problem with most new Ubuntu(or any Linux) enthusiasts. You install Ubuntu with a dual boot with Windows. Due to some freaking reason, you have to perform a Windows reinstall and what the !!!! Now you can't see Ubuntu in the OS's choice while booting your computer, kore precisely you don't get an OS choice menu.
Ok, here's a simple straight forward trick to regain your lost GRUB bootloader.

1. Boot your computer using an Ubuntu Live CD.
2. Press Alt+F2, type xterm and hit enter.
3. Now enter following commands:

sudo grub

find /boot/grub/stage1

4. The output of previous commands will be like (hd0,0) or (hd1,2) depending on where you had installed your Ubuntu.
5. Type



root (hd1,2)

6. Then type:

setup (hd0)

and you're done.

The above tutorial was for newbies only, and I considered the most common circumstances. Experts already know what's wrong with their system and they play well with the circumstances :)

No comments: