Grub is a universal bootloader that is used to boot the Linux operating system and other operating systems. But when you perform any actions with partitions on the disk, for example, restore or resize, then Grub can be damaged.

Such damage often results in a "grub rescue unknown filesystem" error. As a result, you see an error message and a recovery console for entering commands.

Cause of "grub rescue unknown filesystem" error

"grub rescue unknown filesystem" error

The fact is that Grub is located in two places. The first is in the MBR partition table. There is very little space, about 512 bytes, so the entire bootloader cannot fit there. This is why Grub has a modular structure and all the main modules, configuration files and resources are located on a regular /boot partition.

Moreover, information about the location of the /boot partition is recorded in the MBR, and if something happens to this partition and the program cannot load the usual modules, it will give an "unknown filesystem" error.

If the partition is no longer there (for example, deleted), then the only solution is to reinstall the bootloader, if the partition is just slightly changed, then you can still fix everything.

Fix "grub rescue unknown filesystem" error

  1. First we need to see the list of available partitions, for this we use the ls command.
    ls
    Grub command line
  2. Without modules, grub only supports the file system that was on /boot. You can try looking at the contents of each partition to determine where the module files are located. Let's start with the first one:
    ls (hd0,1)/
    Grub command line
    If you see the /boot partition, then move on. If not, repeat the command above with the next partition.
  3. Next, assign this partition to the value of the root variable using the set command:
    set root=(hd0,1)
    set prefix=(hd0,1)/boot/grub
  4. Load modules:
    insmod normal
    normal

If the /boot partition has not been damaged, then the bootloader will normally detect all the files, and the system will start.

Grub Menu