[Original] grub rescue appears at startup. Solution: grubrescue

Source: Internet
Author: User

[Original] grub rescue appears at startup. Solution: grubrescue

This problem occurs generally because the grub boot file cannot be found due to disk partitioning (which may be caused by GHOST backup. We just need to let it find the boot file.

At this point, the screen prompts grub resume> enter set to see which disk the grub boot is directed.

 

This indicates that the boot is now directed to the first partition of the first hard disk, and the boot file is not in this partition, so grub resume will not try this partition later.

Run the ls command to view the disk partition information. hd0 indicates the first hard disk. hd1 indicates the second disk.

 

Next, we need to find the location where the boot file is located.

Use ls (hd0, msdos1)/one by one. When grub is used, it indicates that the correct pilot partition is found. You can use ls (hd0, msdosX) /grub continue to view the specific content.

Use

Set command to Set root and prefix

Change msdos1 in the figure to the correct partition. Run the set command to check whether the settings have been set.

Enter insmod normal and press enter normal to return to the grub startup interface.

But not yet.

If you can enter linux, go to the last step. Otherwise, go to the next step.

Enter the command line mode in c on the grub interface.

Set root = (hd0, msdos1)

Set prefix = (hd0, msdos1)

Here, msdos1 finds the correct boot partition for you.

Last step

Start your linux system and enter

Sudo update-grub

Sudo grub-install/dev/sda

The meaning of Sda is that your first disk a represents the first sdb represents the second disk, and sda1 represents the second partition of the first disk.

You can use ls/dev/sd * to view your disk status.

Solve the problem ..

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.