Kernel Parameters & the GRUB Command Line
GRUB & Multibooting
Chapter 4 · Kernel Parameters & the GRUB Command Line
grub1-3 covered setting kernel parameters permanently. This chapter is the other half — editing them live, once, at the GRUB menu itself, for genuine troubleshooting, without touching any file at all.
The GRUB Menu — Editing an Entry Live
At the GRUB menu, highlighting an entry and pressing e opens a text editor showing that entry's actual boot commands — the same linux/initrd lines grub1-2 described GRUB reading from grub.cfg, now genuinely editable, live, for this one boot only. Ctrl+X (or F10) boots with the edits applied; Esc discards them. Nothing here is ever written to disk — reboot again, and the menu is back to its normal, unedited state. This is grub1-2's own "GRUB reads grub.cfg and presents a menu" material, made interactive.
What Kernel Parameters Actually Are
Words appended to the linux line, passed directly to the kernel the moment it starts — before any userspace or init system is even running. They configure kernel-level behavior: which device is root, which console to use, debugging/recovery flags, hardware quirk workarounds.
A Real Troubleshooting Scenario — Booting Into Recovery Mode
The classic real use case: a forgotten root password, a broken /etc/fstab, or a misconfigured service blocking a normal boot entirely. Live-editing the linux line to append systemd.unit=rescue.target boots straight into a minimal shell with root access, bypassing normal service startup — enough to fix the actual problem before rebooting normally.
- At the GRUB menu, press
eon the default entry - Find the
linux ...line, move to its end - Append
systemd.unit=rescue.target Ctrl+Xto boot with the edit- Land in a rescue shell — fix the actual problem (reset a password, correct
fstab) - Reboot normally
This is the light version of a rescue scenario — the system still successfully reaches a kernel and boots, just to a minimal shell instead of a full desktop. grub1-9 covers the heavier case: GRUB itself broken, never even reaching a kernel at all.
Other Common Parameters Worth Knowing
- ro / rw — mount root read-only or read-write at boot; recovery mode typically starts
rofor safety, and often needs manually remountingrwbefore a real fix (like editingfstab) can be saved - quiet / splash — suppress boot messages / show a graphical splash screen (
grub1-3's own default). Temporarily removing these during troubleshooting reveals the actual kernel boot messages — genuinely useful for diagnosing a hang - nomodeset — a real, common graphics-driver workaround for a system that hangs on a black screen during boot due to a broken or unsupported graphics driver
Making a Temporary Fix Permanent — Closing the Loop Back to Chapter 3
If a parameter discovered live via e turns out to be something needed on every boot — nomodeset because this specific hardware always needs it, say — the correct move is not to re-type it at every single boot. It's grub1-3's own workflow: add it to GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub, then run update-grub. This chapter is for temporary, diagnostic edits; grub1-3 is for turning a genuine discovery into something permanent.
| Persistence | Right for | |
|---|---|---|
| Live edit via 'e' | This boot only — gone on reboot | Diagnosis, one-off recovery, testing a fix before committing to it |
| GRUB_CMDLINE_LINUX_DEFAULT + update-grub | Permanent, every boot | A confirmed, needed-every-time parameter |
e — a genuine GRUB shell, useful when even a normal menu entry doesn't help. Previewed here; grub1-9's own rescue chapter goes further into when this is genuinely needed.
e edit, confirming it works, then being confused when the exact same problem reappears on the very next reboot is a genuinely common beginner experience — the edit was never saved anywhere. This chapter's own "make it permanent" section, feeding back into grub1-3's workflow, is the actual fix for that confusion.
Hands-On Exercises
Write the exact key sequence (from the GRUB menu to a booted rescue shell) needed to boot into recovery mode using systemd.unit=rescue.target, matching this chapter's own numbered walkthrough.
📄 View solutionA system hangs on a black screen during every boot due to a broken graphics driver. Explain which parameter to add live via 'e' to diagnose/work around this, and what the correct permanent fix would be once confirmed.
📄 View solutionA user fixes a boot issue by appending nomodeset via 'e', confirms it works, reboots later, and the same black-screen problem is back. Explain exactly why, using this chapter's own warn-box.
📄 View solutionChapter 4 Quick Reference
- 'e' at the GRUB menu opens a live, temporary editor for one entry's boot commands;
Ctrl+Xboots,Escdiscards, nothing is ever saved to disk - Kernel parameters are words appended to the linux line, passed directly to the kernel before userspace even starts
- systemd.unit=rescue.target — the real recovery-mode workflow: minimal shell, root access, bypassing normal service startup
- ro/rw, quiet/splash, nomodeset — common, genuinely useful troubleshooting parameters
- A confirmed-useful live edit belongs in GRUB_CMDLINE_LINUX_DEFAULT (grub1-3) to make it permanent — not retyped at every boot
- A live edit that "worked" but reappears on the next reboot was never actually saved — expected behavior, not a bug
- 'c' drops into a full GRUB command-line shell — previewed here, covered further in grub1-9's own rescue chapter