Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 Oct 18 '09 at 19:28

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

marked as duplicate by BinaryMisfit 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.

The Ubuntu community has written a guide specifically to address this situation:

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

And reboot your computer. And everything should work again!

share|improve this answer

Before this gets to superuser you may find this will help you.

share|improve this answer