Rescue / Emergency Mode
Cheat sheet · https://pcornel.dk/topic.php?topic=2737
Answer
Rescue mode (rescue.target, single-user) mounts filesystems and starts a root shell with few services; emergency mode (emergency.target) gives a root shell with only / mounted read-only. Both are used to repair a system that cannot boot normally.
Remember
Boot into it by adding systemd.unit=rescue.target or emergency.target (or rd.break for the initramfs) at the GRUB menu. In emergency mode remount root writable: mount -o remount,rw /. If root's password is locked, use installation media.
First checks
systemd-analyze— boot time per stagejournalctl -b -p err— errors in this bootjournalctl --list-boots— previous bootscat /proc/cmdline— kernel command line used
Commands
systemctl defaultmount -o remount,rw /sysroot
Verify in this order
kernel parameter selects rescue/emergency target → minimal system with a root shell → repair → reboot to the default target
Where it usually breaks
First mismatch in persistent unit/config/generator → dependency/order graph → systemd state → process/cgroup → socket/resource dependency → journal → consumer check; preserve identity/native diagnostic/pre-state before mutation.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=2737