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.

I had Ubuntu installed on my laptop. I installed Windows 7 and now I can't access Ubuntu. But the partition is there. I thought I would get a choice of operating systems at the start but I don't. I want them both. How do I get a choice of operating systems during system start up?

share|improve this question

3 Answers 3

up vote 6 down vote accepted


  • Boot from a Ubuntu LiveCD.
  • Select Try Ubuntu.
  • Open a terminal (Ctrl + Alt + T).
  • Execute the following commands:

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

  • Follow the instructions.
  • Reboot.

This will re-install GRUB, which was removed by the Windows installer. You'll be able to boot into both operating systems now.

share|improve this answer
  1. Boot from the live CD.
  2. Determine the partition number of your main partition. GParted can help you here. I'm going to assume in this answer that it's /dev/sda2, but make sure you use the correct partition number for your system!
  3. Mount your partition:

    sudo mount /dev/sda2 /mnt  # make sure that sda2 is correct!
  4. Bind mount some other necessary stuff:

    for i in /sys /proc /run /dev; do sudo mount --bind "$i" "/mnt$i"; done
  5. chroot into your Ubuntu install:

    sudo chroot /mnt
  6. At this point, you're in your install, not the live CD, and running as root. Update grub:


    If you get errors, go to step 7. (Otherwise, it is optional.)

  7. Depending on your situation, you might have to reinstall grub:

    grub-install /dev/sda
  8. If everything worked without errors, then you're all set:

    sudo reboot
share|improve this answer

You installed Ubuntu and with it a bootloader called GRUB2.

Now you have installed Wnindows with its own bootloader and it overwrites GRUB2.

The easiest way - for the beginning - is to install ubuntu again with the bootloader. That will not overwrite the Windows Loader, but it integrated the Windows Loader in the GRUB2-Menu and you can choose the System you want to boot at startup. This is called Dualboot.

share|improve this answer
While 'reinstalling ubuntu will get you ubuntu back, but surely that's not the first thing someone wants? –  Nanne Mar 5 '13 at 15:28
@Nanne I agree. 1. It will remove ALL data from Windows 7 (Because you are overwriting Win7) and 2. All data will be lost from Ubuntu, too. So that won't help at all! –  nerof61 Mar 5 '13 at 15:50

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.