Pcornel
Linux · Boot Process

GRUB

Cheat sheet · https://pcornel.dk/topic.php?topic=2730

Back to the Topic

Answer

GRUB 2 reads /boot/grub/grub.cfg (Debian) or /boot/grub2/grub.cfg (RHEL), generated from /etc/default/grub and /etc/grub.d. It shows the boot menu and passes kernel parameters.

Remember

Edit /etc/default/grub (e.g. GRUB_CMDLINE_LINUX) and regenerate with update-grub or grub2-mkconfig; on RHEL use grubby for kernel arguments. Press e in the menu for a one-time edit (e.g. add systemd.unit=rescue.target).

First checks

  • grubby --info=ALL — RHEL boot entries and arguments
  • systemd-analyze — boot time per stage
  • journalctl -b -p err — errors in this boot
  • journalctl --list-boots — previous boots
  • cat /proc/cmdline — kernel command line used

Verify in this order

/etc/default/grub + scripts → grub.cfg generated → menu → selected entry → kernel and parameters loaded

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=2730

Confirmation

Confirm action

Continue?