Use it to change the default kernel, add kernel parameters, or recover an unbootable system.
GRUB
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.
1. grep -E 'DEFAULT|CMDLINE' /etc/default/grub — settings.
2. RHEL: grubby --info=ALL — entries and arguments.
3. Change, then update-grub / grub2-mkconfig -o ….
4. One-time test: e at the menu, edit, Ctrl+X.
5. After boot: cat /proc/cmdline.
/etc/default/grub + scripts → grub.cfg generated → menu → selected entry → kernel and parameters loaded
For Boot Process → GRUB, continue with the first unproven Topic check: Identify distro-specific GRUB source files, generated configuration path and the GRUB instance reached from firmware. If that boundary is healthy, advance to the adjacent check: Inspect the exact menuentry and linux/initrd lines, especially root identifiers, LVM/RAID/encryption hints, console and recovery parameters. Preserve the same host/time/identity scope and rerun the original workload before accepting recovery.
Continue only after interpreting the current observation.Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Operational evidence path Verify boundary
GRUB binary → prefix/config location → source-generated grub.cfg → menuentry → filesystem/device resolution → linux/initrd commands → exact kernel command line → kernel handoff
Healthy evidence: the firmware-launched GRUB instance uses current generated configuration, resolves existing artifacts and hands the intended parameters to the intended kernel.
Step 2 Verification and output interpretation Verify boundary
Existing fast checks for this Topic. - Identify distro-specific GRUB source files, generated configuration path and the GRUB instance reached from firmware.
- Inspect the exact menuentry and linux/initrd lines, especially root identifiers, LVM/RAID/encryption hints, console and recovery parameters.
- Compare generated entries with installed kernels/initramfs files and the actual storage topology.
- Test a temporary edit only as a separator; then make the persistent source change, regenerate, reboot normally and verify the original workload.
Verification chain. GRUB binary → prefix/config location → source-generated grub.cfg → menuentry → filesystem/device resolution → linux/initrd commands → exact kernel command line → kernel handoff
Step 3 Commands Verify boundary
grub2-mkconfig -o /boot/grub2/grub.cfg # RHEL
update-grub # Debian
grubby --default-kernel
Step 4 Failure modes and next checks Narrow the fault
Suspicious evidence: configuration was edited in the wrong source or regenerated to an unused path, or a menuentry points at stale artifacts/root identifiers.
Step 5 Common mistakes Narrow the fault
- Editing
grub.cfgdirectly (overwritten); edit/etc/default/grub.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
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).
grubby --info=ALL— RHEL boot entries and argumentssystemd-analyze— boot time per stagejournalctl -b -p err— errors in this bootjournalctl --list-boots— previous bootscat /proc/cmdline— kernel command line used
ReferenceWhat it is1 section · depth on demand
Core model
Separate GRUB source configuration from generated effective configuration and from the menu entry actually executed. Record the active grub.cfg location, selected menuentry, kernel/initrd paths and kernel command line. Regenerating configuration is not evidence that firmware uses that file, and editing /etc/default/grub is not effective until generation and the real boot path are verified.
ReferenceImportant terms & boundaries5 sections · depth on demand
What this shows and what it does not
GRUB evidence ends when the correct kernel/initramfs and exact parameters are loaded from the intended GRUB instance; later kernel/root/systemd failures belong downstream.
In depth
GRUB configuration and recovery
On most distributions, GRUB's configuration file grub.cfg is generated, not written by hand. The GNU GRUB manual describes the mechanism:
grub-mkconfigbuildsgrub.cfgfrom the scripts in/etc/grub.d/and the settings in/etc/default/grub.- Custom entries belong in
/etc/grub.d/40_customor/boot/grub/custom.cfg. - If you write
grub.cfgby hand, the distribution's automatic regeneration must be disabled.
Settings in /etc/default/grub (manual)
| Setting | Meaning |
|---|---|
GRUB_DEFAULT | Default entry: number, title, ID, or saved |
GRUB_SAVEDEFAULT=true | Remember the last choice (with GRUB_DEFAULT=saved) |
GRUB_TIMEOUT | Seconds before the default boots; 0 = immediately, −1 = wait |
GRUB_TIMEOUT_STYLE | menu, countdown or hidden |
GRUB_CMDLINE_LINUX | Kernel arguments for all Linux entries |
GRUB_CMDLINE_LINUX_DEFAULT | Extra arguments for the default entry only |
GRUB_DISABLE_RECOVERY=true | No generated recovery entries |
The manual recommends selecting the default entry by ID rather than by title, because titles can contain device names that change.
Installation targets (manual)
| Firmware / disk | Requirement |
|---|---|
| BIOS + MBR | Gap before the first partition (at least 1000 KiB recommended) |
| BIOS + GPT | A BIOS boot partition, type EF02, about 1 MiB |
| UEFI | The EFI System Partition, usually mounted at /boot/efi |
host$ sudo sed -i 's/^GRUB_TIMEOUT=.*/GRUB_TIMEOUT=5/' /etc/default/grub
host$ sudo grub-mkconfig -o /boot/grub/grub.cfg
host$ sudo update-grub
host$ sudo grub2-mkconfig -o /boot/grub2/grub.cfg
host$ grep -E "^menuentry|^submenu" /boot/grub/grub.cfg | cut -c1-80
host$ sudo grub-reboot "Advanced options for Ubuntu>Ubuntu, with Linux 6.8.0-45-generic"
Booting by hand from the GRUB prompt
When grub.cfg is broken, the GRUB command line can still boot the system. The manual's sequence is: select the root device, load the kernel with linux, load the initramfs with initrd, then boot.
grub> search --set=root --fs-uuid 3f1c...a9
grub> linux /boot/vmlinuz-6.8.0-49-generic root=UUID=3f1c...a9 ro
grub> initrd /boot/initrd.img-6.8.0-49-generic
grub> boot
update-grub (Debian and Ubuntu) and grub2-mkconfig (RHEL family) are distribution wrappers or names for the same generator. Use the one your distribution provides.
Documented example, not captured output.
How it works at runtime
GRUB is part of Boot Process → GRUB. GRUB covers GNU GRUB configuration, generated menu state, device/filesystem discovery, kernel/initramfs selection and recovery editing at the Linux bootloader boundary.
Topic-specific state model. GRUB covers GNU GRUB configuration, generated menu state, device/filesystem discovery, kernel/initramfs selection and recovery editing at the Linux bootloader boundary.
Interpretation rule. - Editing /etc/default/grub ≠ generated grub.cfg changed.
- grub configuration regenerated successfully ≠ firmware boots the GRUB installation containing that configuration.
- GRUB menu entry loads ≠ root=, rd.* or other kernel parameters point at a usable root.
- Temporary menu edit works once ≠ persistent GRUB configuration was repaired.
Quick reference
GRUB 2 operations:
# /etc/default/grub
GRUB_TIMEOUT=5
GRUB_DEFAULT=saved
GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=rhel/root"
grub2-mkconfig -o /boot/grub2/grub.cfg # RHEL BIOS & UEFI (RHEL 9+ uses the same path)
grub2-editenv list
grub2-set-default 1
grub2-install /dev/sda # BIOS only; UEFI uses packaged EFI binaries
At the GRUB menu, press e to edit a boot entry once (add systemd.unit=rescue.target, rd.break, or remove quiet) and Ctrl+X to boot. Protect the menu with a GRUB password on physically exposed systems (grub2-setpassword).
Limits and how it fails
Primary failure point. GRUB evidence ends when the correct kernel/initramfs and exact parameters are loaded from the intended GRUB instance; later kernel/root/systemd failures belong downstream.
ReferenceConfiguration & state1 section · depth on demand
Configuration, persistence and lifecycle
Distribution/platform context. GRUB owns GNU GRUB-specific source/generated configuration and menu execution. Bootloader owns generic handoff semantics; Package Management owns installed package lifecycle; Kernel Parameters owns parameter meaning.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Boot Process → GRUB. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://systemd.io/ · confidence 94%What changed and what may be affected
Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.
Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
GRUB operational reference
Topic-specific lookup boundaries, proof limits and next-step Evidence for GRUB.
| Lookup boundary | Topic-specific reference | Operational use |
|---|---|---|
| Scope / effective state | GRUB covers GNU GRUB configuration, generated menu state, device/filesystem discovery, kernel/initramfs selection and recovery editing at the Linux bootloader boundary. | Establish exactly what this Topic owns before crossing into another subsystem. |
| Fast verification | Pin exact host + failed boot attempt → identify firmware mode/boot entry → capture bootloader entry + kernel/initramfs + command line → prove root-device discovery and early-userspace handoff → inspect PID 1 transaction/target → change one demonstrated cause → reboot through original path → verify service/workload readiness and regression. | Use the shortest evidence path first; a fast check is a boundary test, not blanket proof. |
| Verification chain | GRUB binary → prefix/config location → source-generated grub.cfg → menuentry → filesystem/device resolution → linux/initrd commands → exact kernel command line → kernel handoff | Trace requested/configured state through effective state to the observed workload result. |
| Failure boundary | GRUB proof ends when the correct kernel/initramfs and exact parameters are loaded from the intended GRUB instance; later kernel/root/systemd failures belong downstream. | Stop broad troubleshooting at the first boundary that is not supported by evidence. |
| Positive evidence | Correlated Linux boot evidence can establish this proof path: GRUB binary → prefix/config location → source-generated grub.cfg → menuentry → filesystem/device resolution → linux/initrd commands → exact kernel command line → kernel handoff | Use this observation only for the specific claim it actually supports. |
| Evidence limit | It does not independently prove behavior outside the captured host/VM, firmware, disk, selected boot entry, kernel/initramfs, root topology, boot attempt, service set, time or workload scope. GRUB proof ends when the correct kernel/initramfs and exact parameters are loaded from the intended GRUB instance; later kernel/root/systemd failures belong downstream. | Do not promote a local success signal into end-to-end or adjacent-dependency proof. |
| Next troubleshooting check | Continue from the first unproven handoff: capture the exact artifact/configuration and downstream state, change only the demonstrated cause, reboot through the original path, then repeat the original service/workload and adjacent regression checks. | Continue to the next unresolved boundary while preserving the original test condition. |
GRUB · operational reference
Compact Linux state, persistence, verification and boundary reference for fast lookup.
| Reference boundary | GRUB |
|---|---|
| Topic path | Boot Process → GRUB |
| Runtime state | GRUB covers GNU GRUB configuration, generated menu state, device/filesystem discovery, kernel/initramfs selection and recovery editing at the Linux bootloader boundary. |
| Fast checks | - Identify distro-specific GRUB source files, generated configuration path and the GRUB instance reached from firmware. - Inspect the exact menuentry and linux/initrd lines, especially root identifiers, LVM/RAID/encryption hints, console and recovery parameters. - Compare generated entries with installed kernels/initramfs files and the actual storage topology. - Test a temporary edit only as a separator; then make the persistent source change, regenerate, reboot normally and verify the original workload. |
| Verification chain | GRUB binary → prefix/config location → source-generated grub.cfg → menuentry → filesystem/device resolution → linux/initrd commands → exact kernel command line → kernel handoff Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return/regression → explicit Evidence boundary. |
| Failure boundary | GRUB proof ends when the correct kernel/initramfs and exact parameters are loaded from the intended GRUB instance; later kernel/root/systemd failures belong downstream. Boundary chain: process/context → userspace configuration → kernel subsystem/resource → device/network/filesystem dependency → effective state → original workload. |
| Persistence rule | Prove which configuration source owns the state, then prove that the running consumer loaded or generated the intended state. |