Grub Rescue when Windows 8 and Ubuntu 12.04 Dual systems boot up

Source: Internet
Author: User
Tags command line linux

Because of the partition modification under Windows (which I removed from the partition), the grub partition was changed from Sda3 to Sda2, so that grub was not found, and Ubuntu turned on:

Grub Rescue >

In this case, the following can be resolved without reinstalling the system

The first step is to find out where your Linux disk is in that partition and the Grub directory.

If you remember the best, forget it doesn't matter, use the following command to test one by one:

Grub Rescue>ls

After carriage return, the LS command lists all the disk partition information, such as:

hd0, (HD0,MSDOS7), (Hd0,msdos8), (HD0,MSDOS5) ...

Loop through the following command until the contents of the file contained in the partition are displayed instead of unknown filesystem and some other abnormal information

Grub Rescue>ls (HD0,MSDOS7)/boot/grub

(There's a/grub on the web for hd0,0, which may be different from Linux distributions, and Ubuntu 12.04 is grub is placed underneath/boot.) Or can LS other files also the same)

If we try to (HD0,MSDOS7) when all the files in the folder are successfully displayed, grub is in the partition.

Step Two: Set the following

Grub Rescue>set root= (HD0,MSDOS7)

partitions in brackets for the previous attempt to succeed, that is, the partition where the Linux grub resides

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

Step Three:

Grub Rescue>insmod/boot/grub/normal.mod

At this point, you should quit the Grub rescue mode and get into the familiar grub mode

Fourth Step:

Grub>normal

So far, my computer has entered the Ubuntu boot interface, and has the option to start the system, to completely solve this problem has to go into Ubuntu repair grub, as follows:

Step Fifth: Fix grub

After entering the Linux system, on the command line

sudo update-grub

Sixth step:

sudo grub-install/dev/sda//SDA is the system's general default boot disk

More Wonderful content: http://www.bianceng.cnhttp://www.bianceng.cn/OS/home/

Related Article

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.