You start your computer and instead of the normal boot menu, you see a short, unfriendly message: error, unknown filesystem, entering rescue mode, followed by a grub rescue prompt. There is no Ubuntu, no Windows, and no list of choices.
This usually happens after a partition was deleted or resized, Ubuntu was removed or moved, a disk was formatted, or a second system changed the partition layout. The boot loader is still present, but it can no longer find the files it needs to continue.
Do not panic and do not reinstall everything at once. In many cases you can point GRUB back to the correct partition from the rescue prompt itself and boot Ubuntu in minutes. If that fails, a live USB repair restores the boot loader cleanly. Both methods are covered here, step by step.
Quick Answer
At the grub rescue> prompt, run ls to list partitions, test each one with ls (hd0,gpt2)/ until you find the Linux partition, then set it with set prefix=(hd0,gpt2)/boot/grub and set root=(hd0,gpt2), load the normal module with insmod normal, and run normal to boot. Once inside Ubuntu, permanently fix it with sudo update-grub and sudo grub-install /dev/sda. Use your real partition numbers instead of the examples.
Why GRUB Shows Unknown Filesystem and Enters Rescue Mode
GRUB is the boot loader that runs before any operating system. Its first small stage lives in a fixed place on the disk, but most of its files, including its configuration and its file system modules, live inside your Ubuntu partition in /boot/grub.
At startup, GRUB looks for that partition using a saved location. If the partition was deleted, its file system was changed, or the partition numbering shifted, GRUB cannot read it. A boot loader that can only read file systems it understands will report an unknown filesystem when it lands on a partition it cannot parse, for example a Windows partition, a deleted space, or a damaged Linux file system.
Rescue mode is GRUB’s minimal emergency shell. It has only a few commands, but they are enough to search the disk by hand, find the real Ubuntu partition, and load the full boot menu from it.
Typical Triggers
- Deleting or resizing partitions from Windows or a partitioning tool.
- Removing Ubuntu from a dual boot machine without restoring the boot loader.
- Installing another operating system that changed the partition order.
Method 1: Boot Manually From the GRUB Rescue Prompt
This method changes nothing permanently at first. It simply finds the right partition and boots from it once, so you can do the lasting repair from inside Ubuntu.
Step 1: List the Disks and Partitions
- At the
grub rescue>prompt, typelsand press Enter. You will see entries such as(hd0),(hd0,gpt1),(hd0,gpt2), or on older disks(hd0,msdos1). - Note all of them. GPT in the name means a modern partition table, msdos means the older style. Both are handled the same way here.
Step 2: Find the Linux Partition
- Test each partition by typing
ls (hd0,gpt2)/and pressing Enter, changing the numbers to match your list. - If you see folders like
boot/,etc/,home/, andusr/, you found the Ubuntu root partition. - If you see the unknown filesystem error for a partition, move on to the next one. That partition is not your Linux system.
- You can confirm further with
ls (hd0,gpt2)/boot/, which should show kernel files and agrubfolder. - If your system has a separate boot partition, its listing will show the
grubfolder and kernel files directly, without the full root folders. The prefix path in the next step then changes slightly, as explained below.
Step 3: Point GRUB to the Correct Partition and Boot
- Set the root with
set root=(hd0,gpt2), using your partition. - Set the prefix with
set prefix=(hd0,gpt2)/boot/grub. If the partition you found is a separate boot partition, useset prefix=(hd0,gpt2)/grubinstead. - Check your typing with
set, which prints the current values. - Load the full module with
insmod normal. - Start the normal boot menu with
normal. The regular GRUB menu should appear, and you can boot Ubuntu as usual.
If insmod normal fails, the prefix is still wrong. Try the other prefix form.
Make the Fix Permanent Inside Ubuntu
The rescue boot is temporary. If you shut down now, the rescue prompt will return, because GRUB’s saved location has not changed. Fix it permanently while Ubuntu is running.
- Open a terminal with
Ctrl + Alt + T. - Check your disk name with
lsblk. On most systems the main disk is/dev/sdaor/dev/nvme0n1. - Reinstall the boot loader to the disk, not to a partition, with
sudo grub-install /dev/sda, using your disk name. - On a modern UEFI system, if that command reports an EFI issue, use
sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=ubuntuinstead. - Regenerate the configuration with
sudo update-grub. Confirm it lists your Ubuntu kernel and any other operating systems, such as Windows, that you expect. - Reboot and confirm the normal menu appears without any manual steps.
For background reading, the official GNU GRUB manual documents every rescue command, and our related walkthrough on how to use Ubuntu boot repair step by step covers the graphical repair tool mentioned next.
Method 2: Repair With a Live USB When Rescue Boot Fails
If no partition shows Linux folders, or the rescue boot loads but Ubuntu crashes immediately, repair from outside the installed system.
- Boot from a Ubuntu live USB and choose Try Ubuntu.
- First, inspect the disk with the Disks application. Confirm the Ubuntu partition still exists and has not been deleted. If it was deleted, boot repair cannot restore it; that becomes a data recovery question, not a boot question.
- If the partition exists, open a terminal and check its file system with
sudo fsck -f /dev/sda2, using the real partition name and making sure it is unmounted. - For a manual reinstall, mount the root partition at
/mnt, mount the EFI partition at/mnt/boot/efiif you have one, bind the/dev,/proc, and/sysfolders, enter it withsudo chroot /mnt, then rungrub-install /dev/sdaandupdate-grub. - Exit the chroot, unmount cleanly, remove the USB, and reboot.
An easier live option is the Boot-Repair tool, described in the Ubuntu community Boot-Repair guide, which automates the same steps.
What If No Linux Partition Exists?
Sometimes every partition returns unknown filesystem or shows only Windows folders. That means the Ubuntu partition is gone or badly damaged.
- Do not write new data to the disk or reinstall into the empty space if you hope to recover files.
- Boot a live USB and see if the space shows as unallocated or as an unknown partition.
- If important files were there, use recovery tools from the live session or seek data recovery help before installing anything.
- If you have backups and simply want a working machine, reinstalling Ubuntu into the free space is then a clean and reasonable choice.
Common Mistakes and Useful Tips
- Typing the letter O instead of zero: Disk names use the number zero in
hd0. This small typo causes many failed attempts. - Forgetting the trailing folder structure: The prefix must point to the folder that contains GRUB’s files, not just to the partition. Test both prefix forms if the first fails.
- Installing GRUB to a partition: The permanent fix installs to the whole disk, such as
/dev/sda, not to/dev/sda2. Installing to a partition usually changes nothing at boot. - Skipping the permanent fix: The rescue boot alone is not a repair. Always run grub-install and update-grub from inside Ubuntu afterwards.
- Tip: Write down your working root and prefix values on paper. If the problem ever returns, you can re-enter them in under a minute.
- Tip: After any partition resize, reboot once and check the GRUB menu before doing further disk changes, so problems surface one at a time.
Conclusion
The unknown filesystem error at the GRUB rescue prompt means the boot loader cannot find its own files on the partition it expects. The system underneath is often completely healthy. GRUB has simply lost its way after a partition change.
List the partitions, test each one until the Linux folders appear, set root and prefix to that partition, and load the normal module to boot. Then make it permanent with grub-install and update-grub from inside Ubuntu. If no Linux partition can be found, use a live USB to check the disk honestly before deciding between repair and recovery. Either way, work slowly and read each listing, and this intimidating prompt becomes a short, manageable fix.
Frequently Asked Questions
Is the grub rescue prompt the same as grub rescue mode in the menu?
No. The black rescue prompt in this guide appears when GRUB cannot load its main files at all. It is more limited than the normal GRUB menu, which is why you must load the normal module by hand.
Why did this happen after I deleted a partition in Windows?
Deleting or resizing partitions can shift numbering or remove the partition GRUB was pointing to. GRUB still starts from its fixed location, but its saved path no longer leads to its files, so it drops to rescue mode.
Can I use these steps on a UEFI system?
Yes, the rescue search and boot steps are the same. Only the permanent reinstall command can differ, using the EFI form of grub-install shown in this guide when the standard form reports an EFI problem.
What does insmod normal actually do?
It loads GRUB’s full-featured module from the prefix location you set. Without it, the rescue shell stays minimal. With it, the normal command starts the regular boot menu.
Will fixing GRUB remove Windows from my dual boot?
No. Running update-grub scans the disk and adds every operating system it finds to the menu, including Windows. If Windows is missing from the list, its boot files may need a separate check, but the GRUB repair itself does not delete them.


Leave a Reply