Skip to content

Rescuing a Non-Booting GRUB2 Environment

When the GRUB bootloader fails to find its configuration file or its partition, you are dropped into one of two shells: the GRUB Shell (grub>) or the GRUB Rescue Shell (grub rescue>). This guide covers how to access these shells and manually boot your system.

If the system doesn’t drop you into a shell automatically, you may need to interrupt the boot process manually.

Depending on your system configuration (BIOS vs. UEFI), use the following keys immediately after the BIOS/Manufacturer splash screen:

  • BIOS/Legacy: Hold the Shift key.
  • UEFI: Tap the Esc key repeatedly.

Once the GRUB menu (the list of available kernels) is visible:

  • Press c: This opens the GRUB shell (grub>).
  • Press e: This allows you to edit the boot parameters of the selected entry.

This shell appears when GRUB can load its modules but cannot find the grub.cfg file.

List all partitions known to GRUB:

Terminal window
grub> ls

Inspect the partitions to find your kernel (vmlinuz) and initrd files:

Terminal window
grub> ls (hd0,1)/

Note: If you have a separate /boot partition, the files will be in the root of that partition. If not, look in (hd0,1)/boot/.

Once identified, set the root partition and point to the specific kernel and initrd versions:

Terminal window
grub> set root=(hd0,1)
grub> linux /boot/vmlinuz-3.13.0-29-generic root=/dev/sda1
grub> initrd /boot/initrd.img-3.13.0-29-generic
Terminal window
grub> boot

Scenario B: The GRUB Rescue Shell (grub rescue>)

Section titled “Scenario B: The GRUB Rescue Shell (grub rescue>)”

This limited shell appears when GRUB cannot find its own directory (/boot/grub).

Tell GRUB where its modules and root partition are located:

Terminal window
grub rescue> set prefix=(hd0,1)/boot/grub
grub rescue> set root=(hd0,1)
Terminal window
grub rescue> insmod normal
grub rescue> normal

Note: If normal loads successfully, you will transition to the standard grub> prompt.

If the system stays in the rescue environment after normal, load the Linux module manually:

Terminal window
grub rescue> insmod linux
grub rescue> linux /boot/vmlinuz-3.13.0-29-generic root=/dev/sda1
grub rescue> initrd /boot/initrd.img-3.13.0-29-generic
grub rescue> boot

Manual booting is temporary. Once you are back in your OS, you must repair the bootloader.

Terminal window
sudo grub-install /dev/sda
sudo update-grub
Terminal window
sudo grub2-install /dev/sda
sudo grub2-mkconfig -o /boot/grub2/grub.cfg