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

We have a new Dell Optiplex 790 desktop with Windows 7 and just installed Ubuntu 12.04 on it using a USB stick that was configured as a boot drive. We created a new partition for Ubuntu during installation using the partition editor that comes up during installation.

Everything seems to have gone fine with the installation except that, unexpectedly, there is no option to boot up Ubuntu when the computer is started. We just start the computer and Windows starts up with no option to ever start Ubuntu.

The only way we have gotten Ubuntu to start is by putting the USB stick used for installation back into the computer and having the computer boot from it. Then GRUB shows up and the Ubuntu OS that we installed starts up (rather than the live-CD version on the USB stick).

Previous times we have installed Ubuntu, GRUB shows up when we start the computer and we can choose among the various OSes installed.

Can anyone suggest what to do? We want to have the option to launch either Windows 7 or Ubuntu 12.04 when we start the computer, with the default being Windows 7. Right now there is no option and Windows 7 just starts the way it did before we installed Ubuntu.

Note that if we hit F1 soon after starting the computer, we get some sort of Windows bootloader (not sure of exact name) but there is no option for Ubuntu; just Windows 7. Also note that if we hit the shift key soon after starting the computer, as some help pages have suggested, nothing happens (Windows 7 is loaded as usual).

Thanks in advance!

share|improve this question

Boot into ubuntu with your usb-stick and then bring up a terminal window and run:

sudo grub-install /dev/sda

(Assuming your boot device is /dev/sda, of course -- substitute this with a different device name if your boot disk isn't sda.)

Then, to build the menu for booting, run:

sudo update-grub

Before doing any of this, make sure that you have a way to boot into Windows from a USB disk, in case something screws up.

share|improve this answer

Sounds like their is no functioning grub installed. You should try re-installing grub from the live-cd, info on how to do this can be found on the Ubuntu help page. Using one of the following two methods:

Using Boot Repair

For more info look here.

  1. In a terminal run:

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

    sudo apt-get install -y boot-repair && boot-repair


  2. Then try "Recommended repair" button. When repair is finished, note the URL that appeared on a paper, then reboot and check if you recovered access to your OSs. If the repair did not succeed, indicate the URL to people who help you by email or forum. here

Manually Re-Install Grub

Taken from Ubuntu help page:

This is a quick and simple method of restoring a broken system's GRUB 2 files from a LiveCD terminal. The user must know the device name/partition of the installed system (sda1, sdb5, etc), which is then mounted from the LiveCD. GRUB 2 files are copied from the LiveCD libraries to the proper locations and MBR.

This operation will write to the MBR and restore the modules and core.img to /boot/grub. It will not replace or restore grub.cfg or fix corrupted files. Boot the LiveCD, select "Try It", and open a terminal.

When using a LiveCD, due to GRUB 2 changes between Ubuntu releases, it is recommended that the user boots a LiveCD of the same release (11.10, 12.04, etc) as the release to be repaired. If the user has installed a different version of GRUB 2, use a LiveCD with the same GRUB 2 version.

If necessary, use the fdisk command to help determine the partition on which Ubuntu is installed. The fdisk option "-l" is a lowercase "L". Look for one of the appropriate size or formatting. Running sudo blkid may provide more information to help locate the proper partition, especially if the partitions are labeled.

sudo fdisk -l
sudo blkid

In the following commands:

  1. Use the partition number of the Ubuntu installation with mount command.

  2. Do not use the partition number with the grub-install command.

  3. X is the drive letter (a, b, c, etc.); Y is the partition number (1, 5, etc).

  4. --boot-directory is the folder in which the GRUB folder is located. This is normally /boot but should be changed if the grub folder is located elsewhere.

  5. On systems with a separate /boot partition, that partition should be mounted to /mnt/boot. For instance: sudo mount /dev/sda6 /mnt/boot

  6. grub-install will restore missing files in the grub folder but will not restore intentionally deleted or corrupted files. To accomplish these tasks GRUB 2 must be completely removed and reinstalled.

sudo mount /dev/sdXY /mnt # Example: sudo mount /dev/sda5 /mnt

sudo grub-install --boot-directory=/mnt/boot /dev/sdX # Example: sudo grub-install --boot-directory=/mnt/boot /dev/sda

Hope that helps.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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