Skill 1 in course 3.2: Boot and Storage Recovery

Startup and Boot Failures

Find which boot stage failed, repair GRUB and kernel arguments, rebuild the initramfs and clear systemd start-up hangs.

Advanced4 lessons12 exercises3 h 10 min

You will be able to

  • Place a boot failure at its stage (firmware, boot loader, kernel, initramfs, systemd) from what the screen and journal show.
  • Edit kernel arguments for one boot and permanently, and recover a missing or broken boot entry.
  • Rebuild an initramfs, reach a root shell with rd.break, and finish with a correct SELinux relabel.
  • Diagnose emergency mode, a bad /etc/fstab, dependency cycles and slow or hung units.

Lessons

  1. 01Which boot stage failed? Reading the evidencePlace a boot failure at firmware, boot loader, kernel, initramfs or systemd, and read the previous boot's journal.journalctljournalctl -b -1systemd-analyzesystemd-analyze blamesystemd-analyze critical-chainsystemctl list-jobs0/3 exercises
  2. 02GRUB, boot entries and kernel argumentsEdit kernel arguments for one boot, make them permanent with grubby, and rebuild a missing or broken boot configuration.grubbygrubby --info=ALLgrubby --update-kernelgrubby --set-defaultgrub2-mkconfiggrub2-editenv0/3 exercises
  3. 03The initramfs, rd.break and recovering root accessInspect and rebuild the initramfs with dracut, stop boot with rd.break, and reset a lost root password with a correct SELinux relabel.dracutdracut -flsinitrdlsinitrd -frd.breakrd.lvm.lv0/3 exercises
  4. 04Emergency mode, bad mounts and systemd start-up hangsRecover from emergency mode, repair fstab, and find dependency cycles, masked units and units that hang the boot.systemctl defaultsystemctl rescuesystemctl --failedsystemctl list-dependenciessystemctl list-jobssystemd-analyze verify0/3 exercises