Fixed in grub rescue mode when Ubuntu is started

Source: Internet
Author: User

In the grub rescue mode when Ubuntu is started, it is fixed that the partition where grub is located is changed from sda3 to sda2 due to partition modification in Windows. As a result, grub cannot be found, when Ubuntu is started, grub rescue appears. In this case, you can solve the problem as follows, instead of re-installing the system. First, 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: after grub rescue> ls press enter, the ls command will list all disk partition information, such as hd0, 4), (hd0, 7), (hd0, 8), (hd0, 9) use the following command cyclically, until the file content contained in the partition is displayed instead of the unknown filesystem and some other abnormal information grub rescue> ls (hd0, 0)/boot/grub (ls (hd0, 0) is written online) for/grub, it may vary depending on different linux releases. For Ubuntu 10.04, grub is placed under/boot. Or you can use the ls command for other files. If we try (hd0, 8), the content of the file is displayed successfully. Step 2: grub rescue> set root = (hd0, 8) // The partition in the brackets is the partition that succeeded in the previous attempt, that is, the partition where linux grub is located grub rescue> set prefix = (hd0, 8)/boot/grub Step 3: grub rescue> insmod normal. mod some insmod/grub/normal online. mod, my Ubuntu 10.04 is not successful now. I should exit the grub rescue mode and enter the familiar grub Mode Step 4: grub> normal Step 5: After the grub enters the Linux system, step 6 of sudo update-grub in the command line: sudo grub-install/dev/sda // sda is your boot disk

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.