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?)

How To Repair GRUB2 In A System With Broken Recovery Mode

share|improve this question

marked as duplicate by Scott Severance, Anwar Shah, jokerdino, Tom Brossman, LnxSlck Sep 24 '12 at 8:58

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.

Boot using a live cd and reinstall the grub. – karthick87 Sep 24 '12 at 6:10
up vote 2 down vote accepted

I've solve it this is the way how todo(same boot partition):
Boot into the Ubuntu 12.04 Live CD and click "Try Ubuntu without installing": enter image description here After the desktop is loaded, we need to mount the root partition so that we grant the live cd user read/write permissions on your system files and folders. Let's first identify the partition where Ubuntu is installed with this command:

sudo fdisk -l

Note: The Terminal can be started by pressing CTRL+ALT+T.

The Ubuntu partition we will work on will be labeled with the word "Linux" as shown in the screenshot given below:

enter image description here Run now this sequence of commands to mount the root partition:

sudo mkdir -p /media/ubuntu

sudo mount /dev/sda1 /media/ubuntu

Then you need to mount these system folders to use them on your current desktop environment:

sudo mount --bind /dev /media/ubuntu/dev

sudo mount --bind /proc /media/ubuntu/proc

sudo mount --bind /sys /media/ubuntu/sys

Now chroot into your hard drive with this command:

sudo chroot /media/ubuntu

You have now read/write permissions on your root partition. To install GRUB2, you need to use one of these two commands:

grub-install /dev/sda


grub-install --root-directory=/media/ubuntu /dev/sda

Note: the "sudo" is not required since you are logged in as root now. Also keep /dev/sda as is.

If the installation is successful, you will get these outputs:

root@ubuntu:/# grub-install /dev/sda

Installation finished. No error reported.

Update GRUB2 with this command:


Now Remove the Ubuntu installation CD and reboot your system to see if the GRUB2 boot menu is restored or not.

share|improve this answer
+1 from me for the neat answer. It will be better if you can elobarate your answer. Suppose if the user has a seperate boot partition, the method which you have shared wont work. Clarify the same in your answer.. – karthick87 Sep 24 '12 at 6:34