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.

This question already has an answer here:

I had Windows Vista and Ubuntu 12.04 LTS dual booting on my Lenovo SL300 laptop. I used a windows 7 home premium install disk to install 7 on a new partition. Then I uninstalled vista by deleting the windows vista partition. Now when I boot the computer it goes straight into windows 7 without displaying the GRUB bootloader.

The ubuntu partition is still untouched and I would like to be able to acess it without reinstalling ubuntu. Do I someohow need to confiure grub through windows? I still have my 12.04 LTS live disk, so I could maybe use that to access the GRUB files that are on my ubuntu partition? please help

share|improve this question

marked as duplicate by karel, Eliah Kagan, Radu Rădeanu, falconer, chaskes Jan 7 at 1:44

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.

    
Also look at howtoubuntu.org/… –  MrVaykadji Jan 6 at 1:02

1 Answer 1

Boot up your liveCD.

  1. Mount the partition your Ubuntu Installation is on. If you are not sure which it is, launch GParted (included in the Live CD) and find out. It is usually a EXT4 Partition. Replace the XY with the drive letter, and partition number, for example: sudo mount /dev/sda5 /mnt.

    sudo mount /dev/sdXY /mnt
    
  2. Now bind the directories that grub needs access to to detect other operating systems, like so:

    sudo mount --bind /dev /mnt/dev && sudo mount --bind /dev/pts /mnt/dev/pts && sudo mount --bind /proc /mnt/proc && sudo mount --bind /sys /mnt/sys
    
  3. Now we jump into that using chroot.

    sudo chroot /mnt
    
  4. Now install, check, and update grub.

    This time you only need to add the drive letter (usually a) to replace X, for example: grub-install /dev/sda, grub-install –recheck /dev/sda.

    grub-install /dev/sdX
    grub-install --recheck /dev/sdX
    update-grub
    
  5. Now grub is back, all that is left is to exit the chrooted system and unmount everything.

    exit && sudo umount /mnt/dev && sudo umount /mnt/dev/pts && sudo umount /mnt/proc && sudo umount /mnt/sys && sudo umount /mnt
    
  6. Shut down and turn your computer back on, and you will be met with the default Grub2 screen.

You may want to update grub or re-install burg however you like it.

share|improve this answer

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