Ubuntu boot Up is a grub rescue solution

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.