Recently wanted on the basis of Ubuntu, and then in a partition of the hard disk to install Windows, which there are times careless, when installing Windows, deleted a partition, causing the next launch Ubuntu system appears grub rescue
Here is my fix, reference to http://www.linuxidc.com/Linux/2012-07/65249.htm, some modifications
- Using the LS command first to find out which section of Ubuntu is installed, LS will list all the disk partition information, for example:
Grub rescue>ls (hd0), (HD0,MSDOS3), (Hd0,msdos2), (HD0,MSDOS1)
- Then call the following command in turn: 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.
Assuming that a file is displayed in the folder when found (HD0,MSDOS3), Linux is installed on this partition.
- Call the following command:
Grub Rescue>set root=(HD0,MSDOS3) Grub Rescue>set prefix= (HD0,MSDOS3)/boot/grubgrubRescue >insmod Normal
- You can then call the following command to display the missing Grub menu.
Grub Rescue>normal
But don't be happy, if this is restarted, the problem still exists, we need to go into Linux and fix grub.
- After entering Linux, execute at the command line:
sudo update-grubsudo grub-install /DEV/SDA
(SDA is your hard drive number, do not specify the partition number, such as SDA1,SDA5, etc. are not correct)
- Restart the test whether the boot menu for grub has been restored.
Ubuntu boot Up is a grub rescue solution