Fixed in grubrescue mode when Ubuntu is started

Source: Internet
Author: User
In Windows, the partition where grub is located is changed from sda3 to sda2, so grubrescue & gt appears when Ubuntu is started, you can solve this problem as follows. Instead of reinstalling the system, find out where your Linux disk is located and where the grub directory is. If you still remember the best, it doesn't matter if you forget it. Use the following command to test it one by one: After grubrescue & gt; ls returns

In Windows, the partition where grub is located is changed from sda3 to sda2, so that grub cannot be found, and it appears when Ubuntu is started.

Grub rescue>

In this case, you can solve the problem as follows without reinstalling the system.

Step 1: Find out the partition of your Linux disk and the location of the grub directory.

If you still remember the best, it doesn't matter if you forget it. Use the following command to test it one by one:

Grub rescue> ls

After you press enter, the ls command will list all disk partitions, such:

Hd0, 4), (hd0, 7), (hd0, 8), (hd0, 9)

Run the following command repeatedly until the file content contained in the partition is displayed instead of the unknown filesystem and other abnormal information is displayed.

Grub rescue> ls (hd0, 0)/boot/grub

(If ls (hd0, 0)/grub is written on the internet, it may vary depending on the linux release version. Ubuntu 10.04 is placed under/boot. Or you can use the ls command for other files)

Assume that the file content is successfully displayed when we try (hd0, 8.

Step 2:

Grub rescue> set root = (hd0, 8)

// The partition in the brackets is the partition where the previous attempt was successful, that is, the partition where the linux grub is located

Grub rescue> set prefix = (hd0, 8)/boot/grub

Step 3:

Grub rescue> insmod normal. mod

Some insmod/grub/normal. mod on the internet, my Ubuntu 10.04 is not successful

At this point, the grub rescue mode should be withdrawn and the grub mode should be used.

Step 4:

Grub> normal

Step 5: repair grub

After entering the Linux system, in the command line

Sudo update-grub

Step 6:

Sudo grub-install/dev/sda // sda is your boot disk

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.