Tuesday, June 24, 2008

Repair Grub Entry after a Ubuntu Hardy Updates

Just few months after its official launch, Ubuntu Hardy Heron has release some kernel updates. Every kernel updates suggest us to create a new Grub menu. But unfortunately, if you choose wrong option, it might overwrite original grub menu entries, including non-ubuntu entries. I accidentally chosen let aptititute update whole list.

If this happen to you, no worry. No need reinstallation of OS. First is recover your lost non-Linux entries. Mostly user mixed with Microsoft OS, like Windows XP or Vista. Insert Windows XP or Vista installation CD. Upon setup option, instead of setup, select "Repair A Windows Installation". Choose command line repair. After a command line windows shows, type :
$ fixboot
$ fixmbr

For more command, your can type :
$ help

Close repair session, remove Windows CD, and then reboot. Now your box should be able to boot Windows. Next is repair grub entries. Insert Ubuntu Live CD, then reboot. Open a terminal session from Start Menu -> Accessories -> Terminal. Type :

$ sudo grub
grub >find /boot/grub/stage1

From given information, setup grub root and entries

grub> root (hd0,1)
grub> setup (hd0)
grub> quit


More reading about dual boot tips and emergency tips your may read Ubuntu official tutorial

1 comment:

Anonymous said...

Phew, took 2 hours from a newbie to fix it. Damn grub developers!