Grub rescue appears when Ubuntu starts

1.Cause

Cause: A "grub rescue" error usually means that your computer was unable to boot into the operating system normally and instead entered GRUB (Grand Unified Bootloader) emergency mode. This may be caused by a misconfigured boot loader, a corrupted hard drive, or other boot issues.

2. Solution

To resolve this issue, you can try the following steps:

1. Try to use the command to view available partitions:

At the "grub rescue" prompt, you can list the available partitions and file systems using the following command: execute the ls command

grub rescue> ls

This will display a list of partition identifiers similar to (hd0,msdos1), where hd0 represents the first hard disk and msdos1 represents the partition number. You need to find the partition that contains your Ubuntu installation.

2. Find the partition where the grub folder is located.
If the system's "/boot" folder does not have a separate partition (which should be the case for most people), then use the ls (X,Y)/boot/grub command to browse all partitions, where X represents the hard disk number, Y represents the partition number, such as:

grub rescue> ls (hd0,msdos5)/boot/grub

If the system does not report an error and displays the files under the folder, then the partition is the partition we are looking for. Write down the hard disk number and partition number.

Similarly, if the "/boot" folder of the system is a separate partition or the required partition is not found in the previous command, use the ls (X,Y)/grub command, where X represents the hard disk number and Y represents the partition number.

3. Set the correct boot partition:

If you know the correct boot partition, you can set it with the following command (replace hd0,msdos1 with your partition number):

grub rescue> set root=(hd0,msdos5)
grub rescue> set prefix=(hd0,msdos5)/boot/grub 

4. Set grub to enter normal mode

grub rescue> insmod normal
grub rescue> normal

At this point, grub has entered normal mode from recovery mode. The missing boot menu should be displayed normally and you can boot to the system through grub.
American bison

Guess you like

Origin blog.csdn.net/ezconn/article/details/132562919