Short answer: grub rescue> means GRUB’s first stage started but could not load its normal module, usually because the partition or path it was told to use for /boot/grub is gone or wrong. Find the right partition with ls, point prefix and root at it, load normal to boot once, then reinstall GRUB from the running system so the next boot works on its own.
ls # list disks and partitions GRUB can see
ls (hd0,gpt2)/ # look for a boot/ folder (or grub/ on a separate /boot)
set prefix=(hd0,gpt2)/boot/grub
set root=(hd0,gpt2)
insmod normal
normal # the usual menu appearsReplace (hd0,gpt2) with the partition that holds your /boot/grub folder. The sequence is the one the GNU GRUB manual gives in GRUB only offers a rescue shell. None of the commands on this page were run here: they change how a machine boots, so they are documented from the GRUB 2.06 manual that Debian 12 installs as info pages, the grub-install(8) and update-grub(8) man pages, the Debian wiki and Fedora’s GRUB 2 page.
What the grub rescue> prompt means
GRUB boots in two parts. A small core image (in the gap after the MBR or in a BIOS boot partition on BIOS machines, in a .efi file on the EFI system partition on UEFI machines) carries a built-in value called prefix, the location of the /boot/grub directory. Normal start-up sets prefix, sets root to match, loads the normal module from that directory and runs it. normal reads grub.cfg and draws the menu.
When the core image cannot load normal, it drops to the rescue shell. The manual says only four commands are normally available there: ls, set, unset and insmod, so there is no linux or cat until normal is loaded. Above the prompt GRUB usually prints the reason as error: ...; the messages below are built from strings in Debian 12’s GRUB 2.06 BIOS files (kernel.img and, for the file message, fshelp.mod from grub-pc-bin), read with strings:
| Message | Usual meaning | Where to look |
|---|---|---|
error: no such partition. | The partition number in prefix no longer exists: deleted, recreated or renumbered | ls to find the new number |
error: unknown filesystem. | The partition in prefix exists, but GRUB cannot read what is on it (wrong partition, resized or reformatted, or a filesystem GRUB lacks) | ls each partition for boot/grub |
error: disk `hd1' not found. | prefix names a disk GRUB does not see: disk order changed, or the disk was replaced | ls for the disks present |
error: file `/boot/grub/i386-pc/normal.mod' not found. | The partition is readable but the module file is missing at the prefix path: wrong path, or a damaged or incomplete GRUB install | check the path with ls, else reinstall from a live ISO |
The manual is blunt about the cause: any problem that leaves you in the rescue shell probably means GRUB was not correctly installed. Typical triggers are a partition that was deleted, moved or resized, a disk added in front of the boot disk, a second system that rewrote the boot sector, and an upgrade that was cut off while it updated the boot loader.
Find the partition that holds /boot/grub
Start with set on its own. It prints the preset variables, so you see the prefix GRUB tried. Then run ls without arguments to list every device GRUB knows:
grub rescue> set
prefix=(hd0,gpt3)/boot/grub
root=hd0,gpt3
grub rescue> ls
(hd0) (hd0,gpt2) (hd0,gpt1)That example output is illustrative: prefix points at a third partition the disk no longer has. GRUB names disks hd0, hd1 and so on in firmware order, and partitions by table type and number, counted from 1: (hd0,msdos1) on an MBR disk, (hd0,gpt2) on a GPT disk. A VPS disk that Linux calls /dev/vda is normally hd0 in GRUB when it is the first disk the firmware sees, but the manual warns not to assume that the two orders match.
Now list the top folder of each partition. The manual’s ls lists a directory when you give it an absolute path with the device in front:
ls (hd0,gpt1)/ # EFI or BIOS boot partition: often "unknown filesystem", move on
ls (hd0,gpt2)/ # a root filesystem shows bin/ boot/ etc/ ...
ls (hd0,gpt2)/boot/grub/ # should list grub.cfg and a platform folder- Root filesystem with /boot inside it: the folder is
(hdX,Y)/boot/grub. - Separate /boot partition: its top level shows
grub/and the kernels directly, so the folder is(hdX,Y)/grub. - Platform folder: BIOS installs keep modules in
i386-pc/, 64-bit UEFI installs inx86_64-efi/. Ifgrub.cfgis there but the platform folder is not,insmod normalwill fail and you need the live ISO route below.
Boot once from the rescue shell
- 1Point prefix and root at the right partition
grub rescue> set prefix=(hd0,gpt2)/boot/grub set root=(hd0,gpt2)prefixis where GRUB loads modules from;rootis the device that file names without a device are read from. - 2Load and run the normal module
grub rescue> insmod normal normalnormalreads$prefix/grub.cfgand shows the menu. Ifinsmodprints an error, the prefix is still wrong or the modules are gone. - 3Pick your system and let it boot
These settings live in memory only. The next reboot lands in the rescue shell again until you do the permanent fix from the booted system.
Fix it permanently from the booted system
Once Linux is up, reinstall GRUB to the disk the firmware boots from and regenerate its configuration. First check how the machine booted and which disk holds /boot:
[ -d /sys/firmware/efi ] && echo UEFI || echo BIOS
lsblk -o NAME,SIZE,TYPE,FSTYPE,MOUNTPOINTS
findmnt /boot; findmnt /boot/efi# BIOS: install to the whole disk, not to a partition
sudo grub-install /dev/vda
# UEFI: the EFI system partition must be mounted at /boot/efi
sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi
# both: rebuild /boot/grub/grub.cfg
sudo update-grubupdate-grub is a Debian stub that runs grub-mkconfig -o /boot/grub/grub.cfg. If your shell says it is not found, see usermod: command not found, which covers update-grub and the /usr/sbin PATH issue too.
# BIOS
sudo grub2-install /dev/vda
# UEFI: reinstall the signed packages, do not run grub2-install
sudo dnf reinstall shim-* grub2-efi-* grub2-common
# both
sudo grub2-mkconfig -o /boot/grub2/grub.cfgFedora’s GRUB 2 page says not to use grub2-install on UEFI systems, because the boot loaders come from the shim and GRUB EFI packages. Since Fedora 34, and on RHEL 9 and its rebuilds, the grub.cfg on the EFI partition is a small stub that loads /boot/grub2/grub.cfg, so that is the file to regenerate. On RHEL 8 and Fedora 33 or older, the full UEFI config still lives on the EFI partition, under /boot/efi/EFI/<vendor>/grub.cfg.
No way in? Repair from a live or rescue ISO with chroot
If no partition boots, or insmod normal keeps failing, boot a live or rescue ISO if your provider offers one, mount your installed system and run the same commands inside it. This follows the Debian wiki’s GrubEFIReinstall page; the device names are examples, so check yours with lsblk -f first:
mount /dev/vda2 /mnt # your root filesystem
mount /dev/vda1 /mnt/boot/efi # UEFI only: the EFI system partition
# (a separate /boot partition goes to /mnt/boot before /mnt/boot/efi)
for i in /dev /dev/pts /proc /sys /run; do mount -B $i /mnt$i; done
[ -d /sys/firmware/efi ] && mount -B /sys/firmware/efi/efivars /mnt/sys/firmware/efi/efivars
chroot /mnt
grub-install /dev/vda # or grub2-install / dnf reinstall, as above
update-grub # or grub2-mkconfig -o /boot/grub2/grub.cfg
exitThe ISO must boot in the same mode as the installed system: the Debian wiki says to boot the live system using UEFI for a UEFI install, and to check for /sys/firmware/efi, which only exists in a UEFI boot and holds the firmware boot variables that grub-install updates. If your root filesystem sits on LVM, run vgchange -ay before mounting; if it is encrypted, open it with cryptsetup open first. For mounting in general, see how to mount a disk on Linux.
BIOS versus UEFI: what changes
| BIOS (legacy) | UEFI | |
|---|---|---|
| Where GRUB starts | Boot code in the MBR, core image after it or in a BIOS boot partition (GPT) | A .efi file on the EFI system partition (FAT) |
| Module folder | /boot/grub/i386-pc | /boot/grub/x86_64-efi |
| grub-install target | grub-install /dev/vda | --target=x86_64-efi --efi-directory=/boot/efi |
| Must be mounted in a chroot | Root filesystem and /boot | Also /boot/efi and efivars |
| RHEL family | grub2-install /dev/vda | dnf reinstall shim-* grub2-efi-* grub2-common |
A BIOS machine with a GPT disk needs a small BIOS boot partition (type EF02 in gdisk, flag bios_grub in parted) for GRUB to embed its core image; the manual recommends one rather than installing into a filesystem.
On a VPS or dedicated server
A machine stuck at grub rescue> never starts its network or SSH, so you only reach it through your provider’s VNC or serial console (on a dedicated server, the remote management console). Check each line on screen before you press Enter. After the permanent fix, reboot once while the console is open and watch the menu appear; the reboot commands are in Linux reboot and shutdown.
If GRUB now loads but the kernel stops with a panic, that is a different stage of the boot: see kernel panic: not syncing. If the system starts but drops into a maintenance shell over a bad /etc/fstab line, that is emergency mode.
Frequently asked
What does grub rescue> mean?
GRUB's core image started but could not load its normal module from the directory stored in the prefix variable, usually because that partition was deleted, moved, resized or renumbered, or the GRUB files on it are damaged. In this rescue shell only ls, set, unset and insmod are normally available. The GNU GRUB manual says it usually means GRUB was not correctly installed.
How do I get out of grub rescue without a live USB?
Run ls to list partitions, then ls (hd0,gpt2)/ and so on until one shows boot/grub (or grub/ on a separate /boot partition). Set prefix=(hd0,gpt2)/boot/grub and root=(hd0,gpt2), then run insmod normal and normal to get the menu. This lasts for one boot only, so reinstall GRUB from the running system afterwards.
How do I fix grub rescue permanently?
Boot the system once from the rescue shell or a live ISO with chroot, then reinstall GRUB and regenerate its config. On Debian and Ubuntu that is grub-install /dev/vda (BIOS) or grub-install --target=x86_64-efi --efi-directory=/boot/efi (UEFI), then update-grub. On RHEL, Rocky, Alma and Fedora use grub2-install on BIOS, dnf reinstall shim-* grub2-efi-* grub2-common on UEFI, then grub2-mkconfig -o /boot/grub2/grub.cfg.
What does error: unknown filesystem mean at grub rescue?
GRUB found the partition named in prefix but cannot read the filesystem on it. Either prefix points at the wrong partition (for example after a partition was recreated or resized), the filesystem was reformatted, or it is a type GRUB cannot read from rescue mode, such as LVM or encryption without the needed modules. Use ls on each partition to find the one with your GRUB folder.