GRUB2 & the Boot Process

GRUB2

GRUB2 is the standard bootloader. It loads the kernel and initramfs and passes kernel parameters.

File / commandPurpose
/etc/default/grubMain GRUB config (edit this)
/boot/grub2/grub.cfgGenerated config - do not edit by hand
grub2-mkconfig -o /boot/grub2/grub.cfgRegenerate config (RHEL)
update-grubRegenerate config (Debian)

Kernel parameters are set via GRUB_CMDLINE_LINUX. Temporary edits can be made at boot by pressing e.

Exam tip: To reset a lost root password you boot to an emergency shell by appending rd.break (RHEL) or init=/bin/bash at the GRUB prompt.