Possible Duplicate:
[GRUB Problem] Dual Boot Ubuntu - XP (Ubuntu Installed First)

I have installed both windows XP as well as Ubuntu 9.04 on my machine.I can choose between them using dual boot option at the startup.Up to this, it is fine.

But unfortunately when my XP crashes, I need to install XP again.But when I do it,after installing XP successfully, dual boot option no longer appears at the startup.

So the Ubuntu goes in vein.

What is the problem here? How do I solve it?


3 Answers 3


The Ubuntu community has written a guide specifically to address this situation: https://help.ubuntu.com/community/RecoveringUbuntuAfterInstallingWindows


Windows kills the MBR (Master Boot Record), and as such erases GRUB (the boot loader that lets you choose).

To reinstall the MBR, use the Ubuntu live CD that matches your version, run a terminal and run the following (except the ones marked gray, those are comments):

sudo grub
# Then inside grub, run those:
find /boot/grub/stage1
# This will give you something like (hd0)
setup (hd0) # Use the same thing you got on the command above

And reboot your computer. And everything should work again!


Before this gets to superuser you may find this http://www.supergrubdisk.org/ will help you.