[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 ..