Possible Duplicate:
How can I repair grub? (How to get Ubuntu back after installing Windows?)

Recently I reinstalled Windows XP on my laptop which also have Ubuntu 9.10 installed, but after reinstalling Windows I was not able to boot to the Ubuntu again.

I have the Ubuntu 9.10 Live CD with me and I tried some of the tutorials I saw online but was not successfully. For example I followed the examples on this site but I couldn't make it work. Can somebody please help me?

  • Windows XP might have overwritten some files it didn't recognize. It's always recommended to install Windows before Ubuntu, and any older versions before installing a newer one. Jul 26 '11 at 16:38

How to restore the Ubuntu grub bootloader (9.10 and beyond)

First you need to find out what your drives are called. You can do this by going to a terminal and typing:

sudo fdisk -l

From that you need to find the device name of your Ubuntu drive, something like “/dev/sda5″. So, still in the terminal, type:

sudo mkdir /media/sda5
sudo mount /dev/sda5 /media/sda5

And then, to reinstall the grub:

sudo grub-install --root-directory=/media/sda5 /dev/sda

Push enter and you’re done! Of course you need to replace “/dev/sda5″ and “/dev/sda” with what you found in the fdisk output.

This is extracted from http://ubuntuforums.org/showthread.php?t=1014708 thread by talsemgeest.



Try this

  • It's encouraged that answers are somewhat self-contained so that you explain or summarize links instead of just providing one without giving any explanation.
    – N.N.
    Sep 28 '11 at 6:44

The problem is that Windows changed the MBR Master Boot Record to boot Windows instead of GRUB which in turn gave you the option of booting into Windows, Ubuntu or another flavor of Linux. GRUB and Ubuntu are still there in their own disk partition unless Windows was directed to install on the entire disk. At this point you can boot from the Ubuntu Live CD you used to install Ubuntu. And here's where I become unsure as to exactly what you need to do to restore your MBR since you probably never made a back up copy. If you'd been running Ubuntu 11.04 there's a program called "Boot-Repair" that could be used to restore the MBR. From the LiveCD you can mount your exiting Ubuntu 9.04 partition which would give you the opportunity to backup your /home folder and then worst case re-install Ubuntu and restore your data from the backup. I wish I had a better answer but since the the other answers didn't seem to help I wanted to at least give you some better information on exactly what needs to be restored and that is an MBR that boots GRUB from your Ubuntu partition. Hopefully my answer will lead you to find a solution.

Info on Boot-Repair https://help.ubuntu.com/community/Boot-Repair

Not the answer you're looking for? Browse other questions tagged or ask your own question.