Linux GRUB Rescue — Minimal BASH-like Error & Boot Recovery
About Linux GRUB Rescue
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. This guide covers everything you need to know about this topic, including common causes, step-by-step solutions, and answers to frequently asked questions.
Here are the key things to understand: 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. Understanding these fundamentals will help you diagnose and resolve this issue more effectively.
The most common reasons this occurs include: 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. Identifying the root cause is the first step toward finding the right solution.
To resolve this, follow these recommended steps: In GRUB rescue, list partitions: ls — note partitions like (hd0,msdos1) or (hd0,gpt2). Find the partition with GRUB: ls (hd0,gptN)/boot/grub — look for the one that does not error. Set root and prefix: set root=(hd0,gptN) and set prefix=(hd0,gptN)/boot/grub. Load normal module: insmod normal then normal — this should boot to full GRUB menu. After booting: run sudo update-grub and sudo grub-install /dev/sdX to permanently fix. If these steps do not resolve the issue, consider consulting additional resources or a qualified professional.
This article is part of our Linux Error Codes collection on Error Codes Wiki. We provide comprehensive, up-to-date information to help you find solutions quickly.
Quick Answer
Can I fix GRUB without a Live USB?
If GRUB rescue prompt is available, yes — use ls, set root, insmod normal to boot. Then fix permanently from within the OS.
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
- 1In GRUB rescue, list partitions: ls — note partitions like (hd0,msdos1) or (hd0,gpt2)
- 2Find the partition with GRUB: ls (hd0,gptN)/boot/grub — look for the one that does not error
- 3Set root and prefix: set root=(hd0,gptN) and set prefix=(hd0,gptN)/boot/grub
- 4Load normal module: insmod normal then normal — this should boot to full GRUB menu
- 5After booting: run sudo update-grub and sudo grub-install /dev/sdX to permanently fix