// learn Β· linux Β· rhcsa Β· 9 min

GRUB & rescue boot.

When the system won't boot, GRUB is your seat at the wheel. Edit the kernel command line for one boot, drop into rd.break to reset root, or boot into rescue/emergency targets to fix fstab. This is the lesson that turns a 3 a.m. call into a 3-minute fix.

GRUB and rescue boot animated tutorial. Editing the GRUB menu with 'e', adding rd.break or init=/bin/bash to the kernel command line, single-user mode, rescue.target and emergency.target, password reset workflow with SELinux relabel, and persisting changes with grubby. RHCSA EX200 ready.
// grub & rescue boot

When the system won't boot or you've lost root, GRUB is your seat at the wheel. Six steps from menu to fix.

// before you start
you should know
  • Β·The boot-process lesson
  • Β·Comfortable in a Bash shell
  • Β·SELinux contexts lesson (relabel concept)
by the end you'll

Edit the GRUB cmdline for one boot, use rd.break to reset root, drop into rescue/emergency targets, and persist cmdline changes with grubby.

pace: 9 minutes

grub / rescue β€” step 1 / 6 Β· the menu
GNU GRUB version 2.06 β€” use ↑/↓ Β· enter Β· e Β· c
β–Ά Red Hat Enterprise Linux 9 (5.14.0-411.el9.x86_64)
Red Hat Enterprise Linux 9 (5.14.0-362.el9.x86_64)
Red Hat Enterprise Linux 9 (rescue) - 5.14.0-411
The highlighted entry will be executed automatically in 4s.

The GRUB menu β€” your one chance to intervene

On boot, GRUB shows a menu listing kernel entries (current, previous, rescue). It auto-boots the highlighted entry after a few seconds β€” press any key to pause the timeout. ↑/↓ to pick; press `e` to EDIT the selected entry for ONE boot (great for rescue), or `c` to drop to a GRUB command line. Whatever you do here doesn't persist unless you also run grubby afterwards.

$press any key
$press e
$press c
// key insight

GRUB editing is one-shot rescue; grubby is permanent. After rd.break, two things are non-obvious but mandatory: mount -o remount,rw /sysroot and chroot /sysroot. And after any write inside the rescue chroot, touch /.autorelabel to keep SELinux happy. Forget that and login fails after reboot.

// exam-ready Β· the rescue toolkit
$[in GRUB] e
$[in GRUB] Ctrl-X / F10
$append: rd.break
$append: init=/bin/bash
$append: single
$append: systemd.unit=rescue.target
$append: systemd.unit=emergency.target
$mount -o remount,rw /sysroot
$chroot /sysroot
$passwd root
$touch /.autorelabel
$systemctl isolate rescue.target
$systemctl default
$grubby --info=ALL
$grubby --update-kernel=ALL --args="X"
$grub2-mkconfig -o /boot/grub2/grub.cfg
// check yourself
4 quick questions
Q1

You can't log in as root and SSH key auth isn't set up. You're at the GRUB menu. What's the move?

Q2

What's the difference between rescue.target and emergency.target?

Q3

You appended an arg in the GRUB editor and it worked. Two days later, after a reboot, the arg is gone. Why, and how do you make it stick?

Q4

After rd.break, you're in a shell with / mounted at /sysroot. What two things must you do before commands like `passwd root` behave normally?

These aren't graded β€” they're just for active recall, which is what actually makes the lesson stick.

🎚️
// related

Kernel parameters & tuned

Every cmdline arg you add here is a boot-time kernel parameter. See the full picture β€” boot args vs sysctl, and how tuned bundles them.

open β†’
// more in linux

keep going β€” these pair well with what you just learned.

see all linux β†’
the boot processall lessons