OPINIONATED OMARCHY
TROUBLESHOOTING CORPUS
790
RECORDS
790
AUDITED
0
UNCHECKED
2388
SOURCES
LIVE
boot-kernel critical common DISPUTE

Recover from `grub rescue>` with "error: unknown filesystem"

archendeavouroscachyosmanjarogrubbtrfsdesktoplaptop
CORRECTED An auditor found the fix wrong or incomplete and rewrote it.
AUDIT NOTE

The grub-install + grub-mkconfig pairing and the Arch news citation are correct. But the grub rescue> recovery block is wrong for the two layouts the record itself names as causes. On a Btrfs root with an @ subvolume, explicitly called out in the symptom and Applies-to, the prefix is inside the subvolume, so set prefix=(hd0,gpt2)/boot/grub fails and the user is stuck at the rescue prompt believing the advice failed. Same for a separate /boot partition, where the prefix is /grub, not /boot/grub.

The cause above was not rewritten and may still contain the error described. The fix below is the corrected version.
RISK

grub-install --target=i386-pc /dev/sda writes to the MBR/boot gap of that disk. Pointing it at the wrong device (or at a partition instead of a disk) can destroy another OS's bootloader.

Symptom

The machine no longer reaches the GRUB menu. Instead:


error: unknown filesystem.
Entering rescue mode...
grub rescue> 

Seen after a grub package update, after a hard reset/power loss on a Btrfs root, after resizing partitions, or after a Windows 11 feature update.

Cause

GRUB's installed core.img on the ESP/MBR gap no longer matches what it needs to read /boot. Either the grub package was upgraded without re-running grub-install (Arch has published a news item about exactly this class of breakage), or the filesystem gained a feature the old core.img cannot parse (very common with Btrfs after btrfs-progs enables new on-disk features), or a partition move invalidated the embedded block list.

Fix

Boot a live USB, chroot in (see the chroot record), and re-run **both** halves, because neither alone is enough:


sudo arch-chroot /mnt
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB   # UEFI
# BIOS/MBR instead:
# grub-install --target=i386-pc /dev/sda
grub-mkconfig -o /boot/grub/grub.cfg

Make that pair a habit whenever grub appears in a pacman -Syu.

**One-shot rescue without a live USB.** At grub rescue>, find the partition and then set a prefix that matches your actual layout:


ls
ls (hd0,gpt2)/            # look at what is really there before setting prefix
set root=(hd0,gpt2)

Then pick the matching prefix:


# /boot on the root partition, plain ext4:
set prefix=(hd0,gpt2)/boot/grub

# Btrfs root with an @ subvolume (Omarchy/EndeavourOS/CachyOS default):
set prefix=(hd0,gpt2)/@/boot/grub

# separate /boot partition (that partition IS /boot):
set prefix=(hd0,gpt2)/grub

insmod normal
normal

If normal still errors, the prefix is wrong, so ls (hd0,gptN)/ each candidate until you see a grub directory. That gets you one boot. Immediately run the grub-install + grub-mkconfig pair afterwards.

Verify

Reboot without the live USB and land on the GRUB menu. sudo grub-install --version and the on-disk /boot/grub/i386-pc/ or /boot/EFI/GRUB/ files share the same version.

Sources

grub-unknown-filesystem-rescue-prompt