Boot error > no such device: grub rescue
Re-install your GRUB.
Boot using a live cd of ubuntu.
Open a terminal and run the command
sudo fdisk -l
It lists the complete partition table of the hard disk. In there, identify which partition you have got your linux installed on. You can identify it using the drive size you had allocated for it and looking at the last column of the output which will beextended
orLinux
for all of your linux partitions. The partition will most probably be something like/dev/sda5
or something. Remember this partition.Create a temporary folder in your home directory (Note: You can make the temporary folder anywhere you want. I’m using the home folder just for the sake of explanation). I’m calling it
temp
for now. So thattemp folder’s path will be
/home/ubuntu/temp`.Mount your linux partition there. That is, assuming that you found your linux partition to be
/dev/sda5
, you mount that at thetemp
folder by doing the following commandsudo mount /dev/sda5 /home/ubuntu/temp
If you want to check whether you have mounted the correct partition, go to your home folder and open temp. You will be in the
/
directory. In there you will findhome
, in which your home folder’s name will be there. Once you’ve confirmed you have mounted the correct partition, do step 6.You have to install grub by showing the system where to read the data from the hard disk at the beginning. Don’t worry, just run the following command
sudo grub-install --root-directory=/home/ubuntu/temp /dev/sda
The
/dev/sda
corresponds to your hard disk name. Replace it by whatever the commandsudo fdisk -l
command showed you.You’re done. You may restart your system.
I had the same problem while upgrading 10.10 to 12.04 on an ASUS EEEPC.
Previously, I had /
mounted on the 4GB disk and /home
on the 12GB disk. The latest Ubuntu needs at least 4.8GB in /
, so I needed to swap the mount points.
I fixed the problem by changing the hard-disk boot sequence in my BIOS settings.