Powering on a Linux laptop or server only to be greeted by a black screen displaying error: no such partition and a blinking grub rescue> prompt is every Linux admin’s nightmare. This error occurs when GRUB loses track of its /boot/grub partition path—usually after resizing partitions, dual-booting Windows, or updating storage drivers.
Step 1: Locate Your Linux Root and Boot Partitions
Inside the grub rescue> interface, list all available hard drive partitions using ls:
grub rescue> ls
(hd0) (hd0,msdos1) (hd0,msdos5) (hd0,gpt1) (hd0,gpt2)
# Inspect contents of each partition to locate your /boot/grub directory
grub rescue> ls (hd0,gpt2)/
./ ../ lost+found/ boot/ etc/ var/ home/Step 2: Point GRUB to Root & Boot Directory and Launch
Once you identify the partition containing /boot/grub (in this example, (hd0,gpt2)), set the root environment variables and load the normal GRUB module:
# 1. Set root and prefix variables
grub rescue> set root=(hd0,gpt2)
grub rescue> set prefix=(hd0,gpt2)/boot/grub
# 2. Load the normal execution module
grub rescue> insmod normal
# 3. Launch full graphical GRUB bootloader menu
grub rescue> normalStep 3: Permanently Repair GRUB Bootloader inside Linux
Once your Linux desktop or terminal boots successfully, open a shell and reinstall GRUB to the Master Boot Record (MBR) or EFI partition to make the fix permanent:
# Update GRUB configuration
sudo update-grub
# Reinstall GRUB bootloader to primary drive (/dev/sda or /dev/nvme0n1)
sudo grub-install /dev/sda
Comments and corrections