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

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
up vote 7 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

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.