What the grub rescue or error: unknown filesystem Error Means
This situation occurs when the BIOS/UEFI successfully hands off control to the drive, but the GRUB bootloader cannot locate its configuration files or the Linux kernel. Instead of the familiar OS selection menu, you see a black screen with a grub rescue> prompt or the white text error: unknown filesystem. The system remains stuck because the boot chain is interrupted at a very early stage. This error does not indicate corruption of your personal files—the issue is strictly isolated to the boot sectors and the /boot/grub/ configuration.
Common Causes
Boot failures are almost always linked to changes in the disk structure or bootloader configuration:
- Windows update or reinstallation. The Windows installer automatically overwrites the MBR or wipes the EFI partition, removing GRUB entries without warning.
- Disk repartitioning. Operations using
gparted,fdisk, orpartedcan change partition UUIDs or shift the/bootlocation, causing GRUB to lose track of its configuration. - File system corruption. A sudden power loss or disk failure at the file system level (ext4/xfs/btrfs) can make the
/boot/grub/grub.cfgfile inaccessible. - Deletion of the Linux partition. If you removed the Linux distribution partition but kept Windows, GRUB remains in the boot record but cannot find the target OS.
How to Fix It
Method 1: Quick Recovery via the grub rescue> Console
If the system halts at the grub rescue> prompt, try manually specifying the path to the GRUB modules and loading the kernel. This method works if the files haven't been deleted but have simply lost their reference.
- List available partitions:
ls - Locate the Linux partition by testing options:
ls (hd0,msdos1)/(note the trailing slash). Look for the partition containing theboot/grub/directory. - Set the prefix:
set prefix=(hd0,X)/boot/grub(replaceXwith the correct partition number). - Load the modules:
insmod normal - Start the standard bootloader:
normal
If the familiar menu appears after running normal, immediately boot into Linux and run sudo update-grub to make the changes permanent.
Method 2: Full Reinstallation via Live USB (chroot)
If the file system is corrupted or grub rescue> does not respond to commands, you will need a bootable USB drive with any modern Linux distribution.
- Boot from the USB drive into a Live Session. Open a terminal.
- Identify the root and EFI partitions:
lsblk -f - Mount the root partition (e.g.,
/dev/sda2) and the EFI partition (e.g.,/dev/sda1):sudo mount /dev/sda2 /mnt sudo mount /dev/sda1 /mnt/boot/efi # For UEFI systems only - Prepare the chroot environment:
for dir in /dev /dev/pts /proc /sys /run; do sudo mount --bind $dir /mnt$dir; done sudo chroot /mnt - Reinstall the bootloader and update the configuration. For Debian/Ubuntu-based systems:
For Fedora/RHEL/Arch, usegrub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB --recheck update-grubgrub2-mkconfig -o /boot/grub2/grub.cfgorgrub-mkconfiginstead ofupdate-grub.
⚠️ Important: In the
grub-installcommand, specify the entire disk (/dev/sdaor/dev/nvme0n1), not a partition (/dev/sda2). Specifying a partition will result in aninstall_device isn't a diskerror.
Method 3: Automatic Recovery with the Boot-Repair Utility
If working manually in the terminal is challenging, use a reliable graphical tool. It automatically detects partitions, restores the MBR/EFI, and generates a correct configuration.
- In the Live session, add the repository and install the utility:
sudo add-apt-repository ppa:yannubuntu/boot-repair sudo apt update && sudo apt install boot-repair - Launch
boot-repairfrom the applications menu. - Click the Recommended repair button.
- Follow the on-screen instructions. The utility will ask you to run a few commands in the terminal—simply copy and paste them.
- Once finished, restart your computer and remove the USB drive.
Prevention
To avoid future bootloader failures, adopt a few simple practices when working with multiple operating systems:
- Disable Fast Startup in Windows. This feature locks partitions in a hibernated state and prevents Linux from mounting the EFI partition correctly.
- Do not modify the
/boot,/boot/efi, or Linux root partitions using third-party managers without creating a backup first. - Back up your GRUB configuration before major updates:
sudo cp /boot/grub/grub.cfg ~/grub-backup-$(date +%F).cfg. - When setting up a dual-boot system, always install Windows first, followed by Linux. This ensures GRUB automatically detects both operating systems and correctly registers itself in the boot record.