0

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.

0

2 Answers 2

0

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

https://help.ubuntu.com/community/Boot-Repair

this will restore your grub file !!

0
  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:

    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:

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

source

Not the answer you're looking for? Browse other questions tagged .