Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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:
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

marked as duplicate by Anwar Shah, Mitch, Takkat, Tom Brossman, Christopher Kyle Horton 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.

Please see possible duplicates… and…. – 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. – Christopher Kyle Horton Sep 16 '12 at 3:05

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

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

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