Grub rescue from live Ubuntu CD

Grub Rescue commands

If Grub is missing after installing Ubuntu and screen is showing Grub Rescue, then Ubuntu grub rescue or restore has to done. It can be done through Ubuntu Server CD or Ubuntu Desktop CD
If at system start up you might be seeing the option Grub Rescue or Grub missing option then you need to follow the below commands.

This article will show how to do Ubuntu grub rescue with screen shots using Ubuntu Desktop CD. These screenshots  have been taken on Ubuntu 11.04. The very same method can be used to repair grub mint Debian.
If you don't have the desktop CD then you can use Ubuntu server CD or USB also. 
To do grub rescue through Ubuntu Server CD see 
"Install Grub from Ubuntu server CD".

NOTE:  You will get /usr/sbin/grub-probe: error: cannot stat 'aufs'  error if you didn't follow the commands listed below. Specifically you did not do chroot,
i.e. sudo chroot /mnt. 

For Ubuntu grub rescue follow these steps:
1.Boot from the Ubuntu Desktop live CD

Ubuntu grub rescue-1

                          Select Try Ubuntu.     

2.In Live Desktop session open terminal. 
  Application ->Accessories->Terminal.

3. In Terminal tpye sudo fdisk -l  
    It will display all partiton of the disk.
Ubuntu grub rescue screenshot-2
The partation which have Linux under System column is your drive in which ubuntu linux is installed. In screenshot ubuntu partition drive is /dev/sda11.

4. Mount the ubuntu partition drive
       sudo mount /dev/sdXX /mnt  (example 'sudo mount /dev/sda11 /mnt' ,don't miss the spaces.)

5.Only if you have a separate boot partition:
            sudo mount /dev/sdYY /mnt/boot.
 6.  Mount the virtual filesystems:
            sudo mount --bind /dev /mnt/dev
            sudo mount --bind /proc /mnt/proc 
            sudo mount --bind /sys /mnt/sys

7. To ensure that only the grub utilities from the LiveCD get executed, mount /usr     
     sudo mount --bind /usr/ /mnt/usr 
     sudo chroot /mnt  

8. If there is no /boot/grub/grub.cfg or it's not correct, create one using 
      or  update-grub2
9.Now reinstall Grub  
         grub-install /dev/sdX  (e.g. grub-install /dev/sda. Do not specify the partition number.   
 10. Verify the install 
        sudo grub-install --recheck /dev/sdX
11. Exit chroot : CTRL-D on keyboard.
12. Unmount virtual filesystems:  
           sudo umount /mnt/dev 
           sudo umount /mnt/proc
           sudo umount /mnt/sys 

If you mounted a separate /boot partition:  
           sudo umount /mnt/boot 

13. Unmount the LiveCD's /usr directory: 
          sudo umount /mnt/usr

14. Unmount last device: 
           sudo umount /mnt
15. Reboot. 
         sudo reboot.

NOTE: If you are getting /usr/sbin/grub-probe: error: cannot stat 'aufs'  error then the possible reason is that you didn't follow the commands listed above. Specifically you did not do chroot,
ie sudo chroot /mnt.
Follow the above steps correctly and you are done.



got /usr/sbin/grub-probe: error: cannot stat 'aufs'.

check this: it works for me ;]

Thanks, I have Mint Debian and Grub2 broke after update. Your article saved the day !!
I copied straight from Firefox into Terminal and noticed that it appears to need a space after the "chroot".
Thanks again,

Thanks for suggestion and correction has been made. It good to know that, this Grub 2 rescue method work on Mint Debian as I have only tried it to install grub for Ubuntu.

Thanks for a good tutorial - it saved my time!

Just a few remarks for others in the same situation:
I did it the same way using grmllive linux (medium version) booted from usb pendrive. The procedure works also for the RAID array (mirroring, two disks), but first you have to create an array from two disks (/dev/hda /dev/hdb):

mdadm -A /dev/md0 /dev/hda1 /dev/hdb1

then mount it as describe above:

mount /dev/md0 /mnt

perform further steps as above, and when it comes to grub-install, do it for all disks in the array:

grub-install /dev/sda
grub-install /dev/sdb

then unmount, reboot and voila!

by the way:
this procedure fixed the problem on my debian box with grub:

Error symbol not found: 'grub_divmod64_full'.
Entering rescue mode
grub rescue>

Dude you saved my Bacon and then some, had a Dually-Boot WinXP and 11.04, did an update on WinDoze which crashed Grub2, followed the How-To exactly, Waaalaaa perfect on reboot !!

Thanks a Bunch !!

Thank you fo this!! I too am on debian and following
This guide worked without a hitch. I tip my hat to you good sir! Muchly appreciated. The joys of Sid ah!

Thank you! You saved my 'boot'!

Thanks. Wonderfull!
Just a little note to those who are booting from a different disk than where linux is installed:
change the section in 9.

Now reinstall Grub
grub-install /dev/sdX

to reflect the disk where you are booting from. The rest stays the same.

In my case linux was on /dev/sdb2 but had to install grub to /dev/sda.
Worked for me.


THx it is realy very good.

Great man!
Thank you very much for this advices!

Thanks !! I'm a noob Linux user and you helped me after a unsuccessful upgrade Ubuntu 11.10 -> Mint 12
Perfect tutorial
Thanks again

Thank you very much....

grub rescue in sweet and simple way. Thanks a million

thanks so much! i have been working on this problem using troubleshooting i have found, and this is the only that worked for me!

I installed linux on another partition and booted with livecd and copied the boot dir from new install to old linux.


When i tried this, I found sda1 ntfs sda2 ntfs sda3 extended sda4 ntfs and sda5 linux swap. I wasn't thinking and when things did not work I tried having "Windows" try to fix the boot. Did Bill Gates eat my Ubuntu 11.10???? I am bummed!

It seems you have deleted the Linux partition while trying installing grub from Windows. I suggest reinstalling Ubuntu for grub rescue

OMG!! I can't thank you enough for this perfect step by step post, it saved me (...& my computer!). I'm definitely adding your blog to my bookmark list for future reference! =)
Thanks again!

How does grub rescue from LiveCD work on GUID Partition Table (GPT) .

Tried to installubuntu 10.4 to drive C: Installation went completely through normally, no hiicups. Hit restart and that's when it all went wrong..prompted to remove CD. Did that, hit enter and pc rebooted. Came back up with "error: out of disk" and "grub rescue>" with a blinking colon. So I went to my Win 7 machine and went looking for answers...Put the cd back in, changed boot order to boot from livecd. Starts booting and cdrom churns for about 10 minutes then gives up with a "System halted"..Any ideas? This is the 4th major failure I've had trying to get Ubuntu (different cds / different machines) on a machine and am really thinking it is not ready for primetime...

sudo mount --bind /dev /mnt/dev
mnt/dev doesn't exist

When reading a command, be quite careful to see where there are spaces. Some fonts don't make them obvious.

About to try this. Have a GPT, though, so almost no partition utilities will work -- but, Parted Magic is a gem -- (Get the latest, and burn to an 8 cm CD (if you have one)). Latest (and recent) GParted and GNU parted (only GNU) do work with a GPT.

It seems /hard/ to find a list of grub-rescue commands! Maybe I have to download source code and study it? (Wikipedia?)

A couple of commands that /do/ work in grub-rescue are [set] and [ls].
Those can be /really/ useful if you know what to do with them. Used alone, they give critical info.

As well, [prefix={parameters}] and
[root={parameters}] apparently can redefine some things.

(I use [ and ] instead of quotes that I then need to "un-define".)

Better not to experiment with these commands, though, unless you know what you're doing!

One more thing to worry about is numbering of gpt partitions. Considering how Linux has historically done such things, I'd be an idiot to assume that the gpt{n} digits match those in, say, /dev/sda{n}.

Good luck!

SOLVED. I used the Mint Linux Debian GNOME 201109 live CD. I did [sudo su] to gain root access, used gparted to see which partition was which, and proceeded from there. Some commands took a few seconds to finish, but I'm back up and running.

Really, truly appreciated. I've posted a message to the current Mint blog about release of Update 4, using TinyURL
. (Leave off the < and >).


Thank you very much!!!!

Thanks. You jusy saved another soul today.

Thank you very much!!!!

very very cool. i have resolved my problem through your way

Thank you very much! You just saved my day!
My newly installed Ubuntu 12.04 failed to boot showing the grub rescue prompt
Thank to your manual I was able to boot without reinstall...

Many thanks

Worked OK - But only got Win XP back. The restored Grub did not include a choice for Ubuntu 10.04 (or Linux restore). The Linux partition is there in fdisk and GParted. My 11.04 CD would not boot, so I did this with a live 11.1 distro. How do I get Ubuntu to boot?
Thanks for the help

Thanks mehn !!!! Everything worked smoothly. I installed Ubuntu 11.10 first then Windows 7 Ultimate; I updated the Ubuntu to the 12.04 LTS version and lost the Windows boot option so I changed the grub to the Windows MBR main option. I now lost the Ubuntu option in the Windows MBR so this post aided me to get the grub back and the Ubuntu and the Windows options so all is well once again. Many Thanks !!!!!

First, thanks for the guide it's really clear.
And I have to thanks malapradej too that pointed out that if you have more than one HD in your computer, it may not boot on the one you it is.

But instead of changing the place where Grub was installed I decided to change the hard drive boot priority in my BIOS and it works too.

Thanks again !

Thanx a lot dude.... It helped a lot :p

Thank you very much, i was stuck after installing Ubuntu 12.04 along with Windows 7 - i tried by re-installing Ubuntu but no luck, My installed Ubuntu 12.04 failed to boot and showed The error - grub rescue prompt.
I followed ur guide and it helped and saved my day.
Thank a ton.

One nuance to be careful about - the instructions say to check if you have a separate boot partition, and if so then do sudo mount /dev/sd·· /mnt/boot. I got confused here - I did have a boot partition that was not my Linux, it was my base partition (/sda0). So I did that command, and ended up getting a grub menu that only showed my Windows boot. I re-ran the procedure without the doing the sudo mount /dev/sd·· /mnt/boot and it worked beautifully - my old GRUB menu was back, with all the Linux options as well as Windows. The instructions are only referring to a separate Linux boot partition, not for the case where your boot partition is not Linux.

thank you. I solved my problem with this article

... Thank you so much!!!!!!!!!!

Thanks a ton, really helpful stuff ! Keep posting useful stuff like this. :)

Thanks a million!!

I installed Windows 7 on a laptop with Ubuntu 10.04, and could not boot into Ubuntu anymore.

I followed your instructions mechanically, and the boot menu was back, and I can now choose Ubuntu or Windows. It worked beautifully!

Thanks once again!

Dear Geek Mitra,

Just wanted to say, "Thanks!" Your clear and concise tutorial saved me from a very tedious reinstall. Bravo!

Please do disregard my previous comment. I went ahead and continued with the steps in the hope that the error would effect it and lo and behold, it actually worked, I was finally to boot Windows 7. Thanks man, this tutorial really helped me out.

You made my day!!!

Thanks great guide, just to note though make sure that if your grub is originally on an x32 distro you'll need to do this off of an x32 install disk, else you get chroot bin/bash errors

Thanks a ton mate... Simply awsome nd my porblem is solved nd ubuntu 12.04 is working perfectly. All thanks to u. God bless. :)

yeah thank bro it work fine for me......

At the step "update-grub2", I get the error message:

/etc/grub.d/00_header: 28: .: Can't open /usr/share/grub-mkconfig_lib

When I try to use "sudo update-grub2", I get the error message:

sudo: unable to resolve host ubuntu
Generating grub.cfg ...
/etc/grub.d/00_header: 28: .: Can't open /usr/share/grub-mkconfig_lib

Saved a newbie, with dual boot (couldn't get into Windos 7 and "everything!!") Thank you.

actually i m having chameleon bootloader but it is not detecting my linux partition. bcz at the time of installation i have not selected grub. my backtrack linux is installed properly but it is not starting bcz of no grub. i want my chameleon boot loader as it is so how to install grub on my extended partition. i dont want it on MBR...plz help

Hello please help me. actually i miss in step-3. I dont have that linux thing.. what i have to do??

my ubuntu12.04 terminal don't know the word update when i try to update grub2

Thank you

oh and for the guy before me, there is no space between 'update' and 'grub2', there's a dash, like this:

Thanks buddy! I really like your tutorial and it is clear very helpful to me! God bless you!

i dont hsve a linux System wrtten infront of sny of the psrtitions. how will i know where is linux installed?

while installing linux i used install linux side by side windows and partitions were automatically made. Linux ran fine for the first time. but then it stuck up with grub rescue

Very helpful! thanks a ton.

This comment has been removed by the author.

I dont know who u r bt i wl find u fr thanking u. Thanks a lot. :)

Thank you so much!

This worked! Very clear. Thanks :)

This worked perfect on Ubuntu 14.01

grub-install: error: cannot open directory `/boot/grub/i386-pc': Input/output error.
getting this error at step 9

Nice post! This blog has given me a better understanding. Thanks a lot for such an informative blog post. Cheers!
Ryan Levin

Hello, I have Ubuntu 14.04 and window 7 ultimate, I tried updating to window 10, but am stuck at " no such partition" "grub rescue>"
I have tried the following " set boot=(hd0,0)" followed by "set prefix=(hd0,msdos6)" then "set prefix=(hd0,msdos6)/boot/grub" and finally "insmod normal"
Then I get "no such partition"

I get error saying:

chroot: failed to run command "/bin/bash": Exec format error
this is when i'm trying to run the chroot /mnt command

What is happening?

So I now get grub at boot up but it only shows my windows loader but fdisk shows that I also have Linux and android installed
How can I alter the actual grub file from liveUSB?

Download your office setup from and after installing or re-installing you can get any error call toll free +1-855-550-9333.

Officecom-Setups is providing online 24*7 technical support for online Microsoft office setup . If you have any problem related Microsoft office setup activation & installation, then you can contact at +1-844-777-7886

setup and activate office com setup with product key and mcafee product and office 365 respectively | This is very unique i really appreciate your work doing good job. for applw support visit apple support number and to setup and install activate office here:

Post a Comment