Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

migrated from stackoverflow.com Oct 18 '09 at 19:28

This question came from our site for professional and enthusiast programmers.

marked as duplicate by Diago Oct 18 '09 at 20:59

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

3 Answers 3

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

share|improve this answer

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
quit

And reboot your computer. And everything should work again!

share|improve this answer

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

share|improve this answer