Nonbooting System: Recovering from a GRUB Rescue Shell

Updated 2026-11-01

Few things focus the mind like a server that won't boot. A common cause is a kernel update (or a removed kernel) that leaves GRUB_DEFAULT pointing at an entry that no longer exists — GRUB can't find it and drops to a rescue prompt with error: no such device.

Get booted now

From the GRUB menu, pick a known-good kernel under "Advanced options" to boot this once. From a rescue prompt you can set root and prefix manually and insmod normal to reach the menu. The goal is just to get a running system to fix the config from.

Fix the default and regenerate

# /etc/default/grub — point at a stable entry
GRUB_DEFAULT=0        # first menu entry (or a saved, known-good one)

grub-mkconfig -o /boot/grub/grub.cfg   # regenerate (update-grub on Debian)

Never hand-edit /boot/grub/grub.cfg directly — it's generated. Change /etc/default/grub (and /etc/grub.d/) and regenerate. Keep at least one known-good older kernel installed so you always have a fallback entry.

Practise it

A nonbooting box is one of the simulator's most stressful incidents. Build the recovery muscle memory in Linux troubleshooting practice.

Learn it by doing

Create a free account and practise on a live fleet.

← All guides