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 recently installed Ubuntu 12.04 LTS alongside Windows 7 using Ubuntu's Startup disk creator and installation completed without any difficulties or errors.

Now when I try to boot, it directly boots with Windows and shows no option to choice as to which Operating System to load. But when I boot using that same pen drive with which I installed Ubuntu, it shows an OS selection screen.

I also tried the command sudo gedit /etc/default/grub & sudo update-grub and I see "Found windows 7(loader) on /dev/sda2" and "Found windows 7(loader) on /dev/sda3" messages while running the later command, but still the same problem persists.

What should I do in order to get the OS selection screen. Please help me.

share|improve this question
    
Please see possible duplicates askubuntu.com/questions/24479/… and askubuntu.com/questions/88384/…. –  Peachy Sep 15 '12 at 14:29
    
I had this happen recently when I was installing Ubuntu from a LiveUSB onto my cousin's desktop and my brother's netbook. It's due to a Ubiquity bug which has since been fixed; the bug would cause GRUB to be installed onto the USB drive instead of onto the target computer, which is why you only see the menu with the drive inserted. –  WarriorIng64 Sep 16 '12 at 3:05
add comment

marked as duplicate by Anwar Shah, Mitch, Takkat, Tom Brossman, WarriorIng64 Sep 16 '12 at 3:05

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.

2 Answers

It seems that you installed GRUB on the pen drive itself.

Follow these steps:

  • Boot using pendrive.

  • Open a terminal. Run the following commands:

    sudo grub-install /dev/sda
    sudo update-grub
  • Reboot.
share|improve this answer
add comment

You could also take a look at the boot repair utility:

Boot-Repair is a simple tool to repair frequent boot issues you may encounter in Ubuntu like when you can't boot Ubuntu after installing Windows or another Linux distribution, or when you can't boot Windows after installing Ubuntu, or when GRUB is not displayed anymore, some upgrade breaks GRUB, etc.

Boot Repair

It is contained in a PPA Ubuntu repository:

sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair

At the linked website you also can download a live-cd image, which you could then burn to a CD and boot from that, invoke the program from the running live-cd, and let it repair your boot selection (grub configuration).

share|improve this answer
add comment

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