How to Fix: error: unknown filesystem. grub rescue> in Linux Mint & Ubuntu

Fix error: unknown filesystem. grub rescue>

Do you get this error: unknown filesystem.
grub rescue>
error message when you start your computer?

Then you've come to the right place, because here I will show you step by step how to repair grub in Linux Mint and Ubuntu.

How to Repair GRUB

error: unknown filesystem.
grub rescue>

1 Run the following command:

ls

Example: grub rescue> ls

Now you will see all the partitions on your hard drive.

Examples:

grub rescue> ls
(hd0) (hd0,gpt5) (hd0,gpt4) (hd0,gpt3) (hd0,gpt2) (hd0,gpt1) (fd0)
grub rescue>

Or

grub rescue> ls
(hd0) (hd0,msdos5) (hd0,msdos4) (hd0,msdos3) (hd0,msdos2) (hd0,msdos1) (fd0)
grub rescue>

2 Now you will have to find the partition where Linux Mint or Ubuntu is installed on.

To find the right partition you need run the following command: ls (hd0,...) for each partition until you see something like:

grub rescue> ls (hd0,gpt5)/
./ ../ lost+found/ etc/ media/ bin/ boot/ dev/ home/ lib/ mnt/ opt/ proc/ root/ run/ sbin/ selinux/ srv/ sys/ tmp/ usr/ var/ initrd.img initrd.img.old vmlinuz cdrom/
grub rescue>

(hd0,gpt5) is in this example the right partition and I'll be using this partition as example in the following steps, so don't forget to replace gpt5 with the right partition.

3 Run the following command:

set prefix=(hd0,gpt5)/boot/grub

4 Run the following command:

set root=(hd0,gpt5)

5 Run the following command:

ls /

6 Run the following command:

insmod normal

7 Run the following command:

normal

The Grub will now open the boot menu and display all installed operating systems.

8 Boot into Linux Mint or Ubuntu.

9 Open the Terminal.

10 Run the following command:

sudo update-grub

11 Run the following command:

sudo grub-install /dev/sda

This fixed my problem and hopefully it will also fix yours.

Related: