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 had two Operating System in my laptop.Ubuntu 12.04 and Windows 7.

last day i reinstalled my Windows 7 in same partition c. also i config a prtition for Ubuntu with swap & / & /boot area.

after reinstalling Windows 7 OS i cant see Ubuntu grub for startup this OS and i go directly to windows 7 .

how i can install grub for going to ubuntu???????

help me please...

thanks a lot.

share|improve this question

marked as duplicate by hexafraction, Jorge Castro, Jjed, Mik, jokerdino Sep 29 '12 at 15:33

This question was marked as an exact duplicate of an existing question.

download boot-repair-disk and run it . for details go through this:-

this will restore your grub file !!

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
    update-grub # I'm not sure if this is necessary, but it doesn't hurt.
  8. If everything worked without errors, then you're all set:

    sudo reboot
  9. At this point, you should be able to boot normally.


share|improve this answer

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