Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

I installed Ubuntu 12.04 alongside Windows 7. I then fiddled around with EasyBCD and managed to stuff up the boot info and Windows wouldn't boot, etc.

I then repaired Windows via an install CD but now I don't have an option to boot into Ubuntu, it boots straight into Windows.

How do I boot into Ubuntu now?

share|improve this question
add comment

marked as duplicate by Eliah Kagan, Jorge Castro, fabricator4, Anwar Shah, hhlp Jan 11 '13 at 10:47

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.

8 Answers

The only problem is the MBR section which now has replaced windows. Whenever you repair windows, it repairs MBR and uninstall the GRUB or whatever is written on it. So now your GRUB is not in the MBR and it directly boots you into windows.

To repair GRUB, you can use any live cd to boot into ubuntu and open up terminal and then issue the command sudo grub-install . Well, in many cases, that fails. For that, you have to manually mount the root partition and then re-install the GRUB into it. It follows as:

sudo fdisk -l 
...list of devices and partions
//here find out the root partition (mine is sda3, so i am condireing /dev/sda3 here)

sudo mkdir /mnt/anyname
sudo mount /dev/sda3 /mnt/anyname
cd /mnt/anyname
sudo grub-install --root-directory=/mnt/anyname /dev/sda

This will re-install your GRUB. If you are encountering any problem in installing the GRUB, just go to google, there are millions of guides on "installing the grub in linux". :)

share|improve this answer
add comment

In addition to @ashutosh answer, you can use a graphical utility called Boot Repair to re-install Ubuntu bootloader:

Picture: Boot Repair

There's also a detailed article in Ubuntu wiki which lists different ways of recovering the bootloader after installing Windows

share|improve this answer
add comment

Maybe you should read this:

http://neosmart.net/wiki/display/EBCD/Ubuntu and start from the "Adding Ubuntu to the Windows Bootloader" part.

This worked for me.

share|improve this answer
add comment

Ubuntu's installation replaces the win7 bootloader in the boot sector. It prompts you to choose which system you want to start each time. I recommend Debian if you want to run two or more operating systems on one machine. You should try to make the system swap area about 2 GB as well, because that could lead to system freezing in the boot section, I think.

share|improve this answer
add comment

The same thing happened to me and I just reinstalled ubuntu after fixing windows. I don't know if I had to do that there might be an easier solution but it worked for me.

share|improve this answer
add comment

Maybe u should read this one ..

http://www.operationgeorge.com/tutorials/reinstalling-grub-and-getting-back-your-operating-systems-in-ubuntu

share|improve this answer
    
Welcome to Ask Ubuntu! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. –  fossfreedom May 10 '12 at 12:35
add comment

If you are having a Ubuntu Live Cd then you could possibly try this, to recover your Ubuntu Grub which would allow you to get it back to normal.

share|improve this answer
add comment

https://help.ubuntu.com/community/Boot-Repair This really helped me, and is probably a better alternative if you're not used to using the terminal.

paste these into the terminal and hit automatically repair.

sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair
share|improve this answer
add comment

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