Recovering From a Broken Bootloader

GRUB & Multibooting

Chapter 9 · Recovering From a Broken Bootloader

grub1-4 covered the light rescue scenario — the system still boots, just to a minimal shell. This chapter is the heavy one: GRUB itself is broken, and the system never reaches a kernel at all. This assumes real comfort with the command line, the same prerequisite linux1-11's own Essential Terminal Skills chapter established — worth naming honestly up front.

Recognizing a Broken Bootloader

Three genuinely different symptoms: a grub rescue> prompt (a minimal fallback shell GRUB itself drops into when core.img ran successfully but couldn't find /boot/grub — distinct from grub1-4's own full menu editor); the system booting straight past GRUB into another OS with no menu at all (grub1-6's own gotcha); or a firmware-level "no bootable device" / "operating system not found" error, meaning firmware couldn't find any bootloader whatsoever. The first means GRUB partially loaded; the last means firmware never found GRUB in the first place — genuinely different failures.

Step 1 — Boot From a Live USB

The same installation media linux1-4 described creating doubles as the rescue tool here — boot it, but choose "Try" or live mode rather than "Install."

Step 2 — Identify and Mount the Broken System's Partitions

From the live environment, lsblk or fdisk -l identifies which partition holds the broken system's root filesystem, and — if kept separate per grub1-8's own advice — its dedicated /boot partition. Mount them under a temporary mountpoint.

Step 3 — chroot Into the Broken System

sudo mount /dev/sdXN /mnt sudo mount /dev/sdXM /mnt/boot/efi # if UEFI and a separate ESP for dir in /dev /proc /sys; do sudo mount --bind $dir /mnt$dir; done sudo chroot /mnt

chroot temporarily makes the mounted broken system's own root filesystem be the root filesystem for a new shell — commands from this point on run against the broken system's own binaries, libraries, and configuration, as though it had actually booted normally. Bind-mounting /dev, /proc, and /sys first gives that chrooted environment working device and process access, without which most repair commands would fail outright.

Step 4 — Reinstall GRUB with grub-install

# BIOS grub-install /dev/sdX # UEFI grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB update-grub

Now run from inside the chroot, using the broken system's own grub-install — as if executed from a normal boot. On BIOS, the target is the whole disk device, never a specific partition (grub1-5's own material on why boot code needs the MBR itself). On UEFI, the syntax is genuinely different, because the installation mechanism itself differs — writing an EFI binary into the EFI System Partition and registering a fresh NVRAM boot entry, rather than writing directly to an MBR.

Step 5 — Exit, Unmount, Reboot

exit leaves the chroot; unmount everything in reverse order; reboot; remove the live USB; confirm the menu is back.

A Real Walkthrough — Recovering From Chapter 6's Own Gotcha

Applied directly to grub1-6's own scenario — a Windows Update reset the boot order or overwrote the MBR: boot the live USB, mount the Linux root partition, chroot in, run grub-install (and update-grub, or efibootmgr to restore the boot order on UEFI), reboot. The same five-step procedure, resolving the exact problem named three chapters earlier.

SymptomWhat's actually brokenRepair
grub rescue> promptGRUB partially loaded, can't find /boot/grubchroot + grub-install
No bootable deviceFirmware never found any bootloader at allchroot + grub-install (target/EFI entry likely missing entirely)
Try the lighter fix first for a wrong-authoritative-distro problem
For grub1-7's own "wrong distro became authoritative" scenario specifically, running just os-prober plus update-grub inside the chroot is often enough on its own, without needing a full grub-install. Worth trying before reaching for the heavier repair.
grub-install against the wrong device can make things worse
Targeting a specific partition instead of the whole disk device on BIOS, or targeting the wrong physical disk entirely in a multi-disk system, is a real risk — always confirm with lsblk or fdisk -l before running grub-install, especially on any system with more than one disk attached.

Hands-On Exercises

Exercise 1

Write the full command sequence to mount a broken system's root partition at /mnt, bind-mount /dev, /proc, and /sys, and chroot into it, matching this chapter's own example.

📄 View solution
Exercise 2

Explain why grub-install's own target argument differs between BIOS and UEFI systems, referencing the actual difference in what each one writes to disk.

📄 View solution
Exercise 3

A dual-Linux system (grub1-7's own scenario) suddenly boots the wrong distro's menu after an update. Explain the lighter fix worth trying before a full grub-install, and why it's likely sufficient here.

📄 View solution

Chapter 9 Quick Reference

  • grub rescue> — GRUB partially loaded but lost grub.cfg; no bootable device — firmware never found GRUB at all
  • Boot a live USB (linux1-4's own installation media) in "Try"/live mode, never "Install"
  • Mount the broken system's root (+ /boot/efi if UEFI), bind-mount /dev /proc /sys, then chroot in
  • grub-install /dev/sdX (BIOS, whole disk) vs. grub-install --target=x86_64-efi --efi-directory=... (UEFI) — genuinely different mechanisms
  • update-grub inside the chroot, then exit, unmount, reboot
  • For a wrong-authoritative-distro problem, try os-prober + update-grub alone before a full grub-install
  • Always confirm the target device with lsblk/fdisk -l first — the wrong device makes things worse, not better