Ubuntu boot appears grub rescue> Terminal Mode Repair method

Source: Internet
Author: User

I installed the windows and Ubuntu dual system, hand cheap in Windows moved the original mounted on the Ubuntu system on a disk, this thought is not originally originally zoned to Ubuntu HDD

Space, and in Windows Explorer is also visible and available, and finally formatted a bit, you can not go to Ubuntu, it is very strange

But the online Ubuntu forum has introduced solutions

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.
Here I am (HD0,MSDOS7)
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
It should be noted here that some machines normal.mod directly in the/boot/grub/can be found, but some can not, we through the LS (hd0,msdosx)/boot/grub command can see a i386-pc folder, I was estimated a bit, Then LS (HD0,MSDOSX)/boot/grub/i386-pc can see a bunch of files, a lot of. mod files, so I guess normal.mod right here, so above Grub Rescue>set root= (hd0, MSDOS3)

Grub Rescue>set prefix= (HD0,MSDOS3)/boot/grub

Grub Rescue>insmod/boot/grub/normal.mod steps can be rewritten as: Grub Rescue>set root= (HD0,MSDOS3)

Grub Rescue>set prefix= (HD0,MSDOS3)/boot/grub

Grub Rescue>insmod/boot/grub/i386-pc/normal.mod on the go. 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.

Ubuntu boot appears grub rescue> Terminal Mode Repair method

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.