The meaning of the commands under several grub rescue:
- Set setting environment variables
- LS Viewing device
- Insmod Loading Module
- root specifies the partition used to boot the system
- Prefix Setting Grub boot path
Operation Flow: 1. Use the LS command first to find out which partition Ubuntu is installed on:
Grub Rescue>ls
Will list all the disk partition information, for example:
(hd0), (HD0,MSDOS3), (Hd0,msdos2), (HD0,MSDOS1)
2. Then call the following command: MSDOSX for each partition, note that there is no space between MSDOS and numbers!
Grub Rescue>ls (HD0,MSDOSX)/boot/grub
If you can't find it, you need to check if the path to grub is incorrect due to the Linux version differences
For example Direct LS (hd0,x)/grub and so on.
3. Assuming that the files in the folder are displayed when found (HD0,MSDOS3), Linux is installed on this partition.
4. Call the following command:
Grub Rescue>set root= (HD0,MSDOS3)
Grub Rescue>set prefix= (HD0,MSDOS3)/boot/grub
Grub Rescue>insmod/boot/grub/normal.mod//Here Normal.mod is also possible in/boot/grub/i386-pc, own LS look
5. Then call the following command to display the missing Grub menu.
Grub Rescue>normal
6. Don't be happy, however, if the problem persists, we need to go to Linux and fix grub.
After entering Linux, execute at the command line:
sudo update-grub
sudo grub-install/dev/sda
(SDA is your hard drive number, do not specify the partition number, such as SDA1,SDA5, etc. are not correct)
7. Restart the test to see if the Grub boot menu has been restored.
Note: sudo gedit/boot/grub/grub.cfg can modify the boot menu of grub.
Dual System (win8.1+ubuntu14.04) Delete win under partition leads to Grub rescue solution