Ubuntu boot fix: For grubrescue | grubnotfound | unknownfilesystem errors
Introduction
Ubuntu is usually guided by grub. Grub is divided into grub, grub2, and grub for dos (grub4dos ).
Recently, in Windows, a large score is divided into GB to install Win10. When I started Ubuntu, I encountered a problem: grub not found ==> grub rescue.
The cause of this problem is that grub cannot find the partition where Ubuntu is located (this is generally because you have adjusted the partition, but grub configuration has not been adjusted accordingly ). Generally, there are two solutions to this problem:
1. Use EasyBCD software for adjustment;
2. Use the command line to re-specify the partition;
Use EasyBCD software to adjust Baidu search EasyBCD 2.2, download and install (free software ). Run as an administrator. Click "Add new entry", as shown in:
Select "Linux/BSD" in the Operating System Options ":
Select "GRUB2" in the type column, enter the name as needed, select "automatic positioning and loading" for the drive, and select "Add entry ". In this way, the problem is solved. restart the computer and choose Ubuntu. It should be noted that this method sometimes fails. In the command line, use the command to re-specify the partition. Because in rescue mode, only a few basic commands are available, you must perform some operations to load the module and then enter the normal mode; in rescue mode, the following commands can be used: set, ls, insmod, root, and prefix (set the startup path );
Command explanation in grub rescue mode:
Ls: view system device status
Set: view the startup path and partition
Root: Set the grub boot partition.
Prefix: Set the startup path of grub
Insmod: loading Module
First, find the partition where grub is located. Run the ls command: grub rescue> ls to list all the partitions on your disk, such as: (hd0, msdos10), (hd0, msdos9 )......; Then, enter the following command: ls (hd0, msdos10)/grub or ls (hd0, msdos10)/boot/grub (generally the last one ). note that this command is just a template, and each person's computer may be different. Enter the command according to your computer. If the system returns: unknown filesystem, enter the next partition to be listed. When a partition does not display unknown filesystem, but other content, the partition where grub is located, continue; grub rescue> set root = (hd0, msdos10); grub rescue> set prefix = (hd0, msdos10) /boot/grub or grub rescue> set prefix = (hd0, msdos10)/grub. Check the location of the grub. grub rescue> insmod normal; grub rescue> normal; at this point, you should have entered the normal mode of the Ubuntu system. Enter the system! However, things are not ready yet. After entering the Linux system, refresh grub on the root terminal:
# Update-grub
# After grub-install/dev/sda is complete, everything will be OK, and it will be okay if you restart it later. If you encounter a similar problem in the future, the same is true.