Error Codes Wiki

Linux GRUB Rescue — Minimal BASH-like Error & Boot Recovery

Criticalboot

Overview

Fix GRUB rescue 'error: no such partition' and 'minimal BASH-like line editing' prompt caused by partition changes, deleted Linux partitions, or corrupted GRUB installation.

Key Details

  • GRUB rescue mode appears when GRUB cannot find its configuration or modules
  • 'error: no such partition' means the partition GRUB was installed from has been moved or deleted
  • GRUB needs to know: (1) where its modules are, (2) where Linux kernel is, (3) the root filesystem
  • Common after resizing partitions, dual-boot changes, or Windows reinstallation
  • GRUB rescue provides limited commands: ls, set, insmod, linux, initrd, boot

Common Causes

  • Partition table changed (resized, deleted, reordered) after GRUB installation
  • Windows Boot Manager overwriting GRUB in the EFI partition
  • Deleted Linux partition while GRUB still references it
  • GRUB config (grub.cfg) corrupted or missing
  • UUID of the boot partition changed after formatting

Steps

  1. 1In GRUB rescue, list partitions: ls — note partitions like (hd0,msdos1) or (hd0,gpt2)
  2. 2Find the partition with GRUB: ls (hd0,gptN)/boot/grub — look for the one that does not error
  3. 3Set root and prefix: set root=(hd0,gptN) and set prefix=(hd0,gptN)/boot/grub
  4. 4Load normal module: insmod normal then normal — this should boot to full GRUB menu
  5. 5After booting: run sudo update-grub and sudo grub-install /dev/sdX to permanently fix

Tags

linuxgrubrescuebootrecovery

More in Boot

Frequently Asked Questions

If GRUB rescue prompt is available, yes — use ls, set root, insmod normal to boot. Then fix permanently from within the OS.