Grub Rescue> Prompt [Solved]
When trying to boot a friend’s notebook that had had a faulty install on it, all I could get was a Grub Rescue> prompt which takes very few commands. Here’s the recipe I followed to get the notebook to boot into something useful.
Grub is throwing a wobbly because it can’t find your boot files – you need to find them first.
"The Grub folder containing the modules must be located so the correct modules can be loaded. This folder would have been created during the initial installation of Ubuntu and should be located in the Ubuntu partition. This folder would normally be located at either (hdX,Y)/boot/grub or (hdX,Y)/usr/lib/grub/i386-pc"
You can find where yours are located using ls
Code:
ls # List the known drives (hdX) and partitions (hdX,Y)
ls (hdX,Y)/ # List the contents of the partition's root
ls (hdX,Y)/boot/grub # Normal location of the Grub 2 modules.
ls (hdX,Y)/usr/lib/grub/i386-pc # Alternate location of the Grub 2 modules.
Mine turned out to be at (hd0,msdos1)/usr/lib/grub/i386-pc
So next give grub the right path:
grub rescue> set prefix=(hd0,msdos1)/usr/lib/grub/i386-pc
grub rescue> set root=(hd0,msdos1)
Now it knows where it’s modules are, run the normal one to get a better prompt
grub rescue> insmod normal
grub rescue> normal
The GRUB 2 menu should appear.
grub> insmod linux
grub> linux /vmlinuz root=/dev/sda1 ro
grub> initrd /initrd.img
grub> boot
These changes are not permanent. After successfully booting into the system you should run sudo update-grub and inspect the GRUB 2 configuration file (/boot/grub/grub.cfg).
For problems with booting the main linux kernel, ensure the search, linux, and initrd lines in the [### BEGIN /etc/grub.d/10_linux ###] section of the file now point to the correct locations.
You may need to reinstall GRUB 2 using sudo grub-install /dev/sdX.
Or using sudo apt-get remove Grub2
sudo apt-get install Grub2
Sources:
https://help.ubuntu.com/community/Grub2#GRUB%202%20Troubleshooting%20Preparation
http://ubuntuforums.org/showthread.php?t=1599293
