A few days ago, I split a partition into two parts in my current project. The following error occurs when I restart the system: My computer is Ubuntu and grub is used for boot, grub is stored in/boot/grub in Ubuntu. Since grub cannot find the original Ubuntu partition because I have assigned another partition, it will naturally not find/boot/grub. Therefore, it is very easy to solve this problem, you only need to map grub to/boot/grub. Step 1: Enter
A few days ago, I split a partition into two parts in my current project. The following error occurs during restart:
Because my computer is Ubuntu and grub is used for boot, grub is placed under/boot/grub in Ubuntu. Since grub cannot find the original Ubuntu partition because I have assigned another partition, it will naturally not find/boot/grub. Therefore, it is very easy to solve this problem, you only need to map grub to/boot/grub.
The procedure is as follows:
1.
Enter ls as follows:
All available partitions on the current disk are listed. Which of the following partitions is determined based on the original partition order on the disk)
2.
Enter set as follows:
The current grub settings are listed. It is because of these incorrect settings that grub cannot find the Ubuntu partition. Since grub cannot be found, we need to manually specify it.
3.
Taking (hd0, msdos1) as an example, enter:
Set root = hd0, msdos1
Set prefix = (hd0, msdos1)/boot/grub
As follows:
Note: The format here may vary with grub versions, as long as it is consistent with the format listed in the previous set.
4.
Input set again and we will find that we have set it: