ITNuvoAkademiya
Academy homePackagesPlaylistsToolsSubnet calculatorSearchGlossary
CiscoCCNA · CCNA: networking fundamentals1. Introduction2. Network Fundamentals3. Network Access4. IP Connectivity5. IP Services6. IPv67. Security Fundamentals8. AutomationCCNP: Enterprise networks · coming soon
LinuxLinux: system administrator üçün · Linux for system administrators1. Getting to know Linux2. Working with text3. Users and permissions4. Processes and packages5. Inside the system6. Monitoring and logs7. NetworkingRed Hat Enterprise Linux · Red Hat Enterprise Linux: from beginner to advanced1. Getting started2. Packages3. Users and permissions4. SELinux5. Services6. Storage7. Networking8. Building services9. Boot and recovery10. DevOps11. Security and monitoring
FortinetFortiGate Administrator · FortiGate Administrator: from first login to ZTNA1. Getting to know FortiGate2. Routing, policy and NAT3. Security profiles4. Users and logs5. Resilience, SD-WAN and automation6. VDOM7. VPN and ZTNA8. Proxy9. DMZ
MonitoringZabbix · Zabbix: from installation to alerts1. Introduction2. Installation and the database3. Basics: groups, templates, users4. Connecting devices5. Alerts, Grafana and the API
VirtualizationProxmox VE · coming soonVMware ESXi · coming soon
My account / Sign in
AZENRU
← itnuvo.com

The boot process, GRUB, targets

Lesson 9.18 minAdvancedDecember 1, 2026
Open

This lesson is open to everyone. The other lessons open with a package: sign in or sign up, then choose a package.

Key points

  • The order is the same: UEFI → GRUB2 → kernel + initramfs (dracut) → systemd → target.
  • RHEL's tool for kernel parameters is grubby: grubby --update-kernel=ALL --args="...", grubby --info=DEFAULT, grubby --set-default.
  • When changing /etc/default/grub: grub2-mkconfig -o /boot/grub2/grub.cfg (on RHEL 9 this path is used for UEFI too).
  • For one boot: e in the GRUB menu, systemd.unit=rescue.target or emergency.target at the end of the linux line, Ctrl+X.
  • Rebuilding the initramfs: dracut -f; boot time: systemd-analyze blame.

RHEL tools

JobUbuntuRHEL
Regenerate the GRUB configurationupdate-grubgrub2-mkconfig -o /boot/grub2/grub.cfg
Change a kernel parameter/etc/default/grub + update-grubgrubby (recommended)
initramfsupdate-initramfs -udracut -f
Default kernelGRUB_DEFAULTgrubby --set-default

RHEL 9 uses BLS (the Boot Loader Specification): each kernel's menu entry is in a /boot/loader/entries/*.conf file, and grubby edits these files.

Kernels and the default entry

srv-web01
[ali@srv-web01 ~]$ sudo grubby --info=ALL | grep -E "^(index|kernel|title)"
index=0
kernel="/boot/vmlinuz-5.14.0-427.13.1.el9_4.x86_64"
title="Red Hat Enterprise Linux (5.14.0-427.13.1.el9_4.x86_64) 9.4 (Plow)"
index=1
kernel="/boot/vmlinuz-5.14.0-362.24.1.el9_3.x86_64"
title="Red Hat Enterprise Linux (5.14.0-362.24.1.el9_3.x86_64) 9.3 (Plow)"
index=2
kernel="/boot/vmlinuz-0-rescue-4b1c0e2a9d7f4e3c8a6b5d2e1f0a9c8b"
title="Red Hat Enterprise Linux (0-rescue-4b1c0e2a9d7f4e3c8a6b5d2e1f0a9c8b) 9.4 (Plow)"
[ali@srv-web01 ~]$ sudo grubby --default-kernel
/boot/vmlinuz-5.14.0-427.13.1.el9_4.x86_64

RHEL keeps the last 3 kernels with dnf (installonly_limit=3 in /etc/dnf/dnf.conf), plus a rescue entry — a generic kernel that boots on any hardware.

If a new kernel causes problems, make the old one the default:

srv-web01
[ali@srv-web01 ~]$ sudo grubby --set-default /boot/vmlinuz-5.14.0-362.24.1.el9_3.x86_64
The default is /boot/loader/entries/4b1c0e2a9d7f4e3c8a6b5d2e1f0a9c8b-5.14.0-362.24.1.el9_3.x86_64.conf with index 1 and kernel /boot/vmlinuz-5.14.0-362.24.1.el9_3.x86_64

Changing kernel parameters permanently

srv-web01
[ali@srv-web01 ~]$ cat /proc/cmdline
BOOT_IMAGE=(hd0,gpt2)/vmlinuz-5.14.0-427.13.1.el9_4.x86_64 root=/dev/mapper/rhel-root ro crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M resume=/dev/mapper/rhel-swap rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap
[ali@srv-web01 ~]$ sudo grubby --update-kernel=ALL --args="audit=1 audit_backlog_limit=8192"
[ali@srv-web01 ~]$ sudo grubby --info=DEFAULT | grep args
args="ro crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M resume=/dev/mapper/rhel-swap rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap audit=1 audit_backlog_limit=8192"
[ali@srv-web01 ~]$ sudo grubby --update-kernel=ALL --remove-args="audit_backlog_limit=8192"
ParameterWhat it does
rd.lvm.lv=rhel/rootThe initramfs activates this LV (the root)
crashkernel=...Reserves memory for kdump — a dump is written when the kernel crashes
audit=1Start auditing from boot (unit 11)
systemd.unit=...Which target to boot into
rd.breakStop in the initramfs (next lesson)

If you change GRUB_CMDLINE_LINUX in /etc/default/grub, grub2-mkconfig -o /boot/grub2/grub.cfg is needed — but grubby is more direct and safer.

Targets and recovery modes

TargetWhat comes upWhen
emergency.targetRoot read-only, no services, no networkAn fstab mistake, a file system problem
rescue.targetLocal file systems, basic services, no networkA service breaks the boot
multi-user.targetThe full serverNormal

To enter once — in the GRUB menu:

  1. Select the kernel, press e.
  2. Add systemd.unit=rescue.target at the end of the line starting with linux.
  3. Ctrl+X.

From a running system: systemctl isolate rescue.target (SSH will drop — from the console only).

In emergency mode the root is read-only:

srv-web01
[root@srv-web01 ~]# mount -o remount,rw /
[root@srv-web01 ~]# vi /etc/fstab
[root@srv-web01 ~]# systemctl daemon-reload && mount -a
[root@srv-web01 ~]# systemctl default

systemctl default switches to the default target (multi-user) — no reboot needed.

dracut: the initramfs

srv-web01
[ali@srv-web01 ~]$ lsinitrd /boot/initramfs-$(uname -r).img | grep -c lvm
37
[ali@srv-web01 ~]$ sudo dracut -f

The initramfs is rebuilt after a new storage driver, encryption or a change of the root file system. lsinitrd shows what is inside.

Lab: a kernel parameter and recovery mode

On your own VM (the GRUB menu needs a console):

  1. Find the kernels and the default with grubby --info=ALL.
  2. Add the audit=1 parameter permanently to all kernels, reboot and see it in /proc/cmdline.
  3. In the GRUB menu, press e, add systemd.unit=rescue.target, enter rescue mode, and leave with systemctl default.
  4. (In the simulator) look at the traces of the boot with cat /proc/cmdline, systemctl get-default and ls /boot.
srv-web01
[ali@srv-web01 ~]$ sudo grubby --update-kernel=ALL --args="audit=1"
[ali@srv-web01 ~]$ sudo reboot
[ali@srv-web01 ~]$ grep -o "audit=1" /proc/cmdline
audit=1

Check: after a reboot /proc/cmdline contains audit=1.

Check yourself

5 questions · answers are shown instantly · 3 correct answers complete the lesson

1Which command is recommended on RHEL to add a permanent parameter to all kernels?

grubby edits the BLS entries directly.

2What is run on RHEL after changing /etc/default/grub?

update-grub is an Ubuntu command.

3Which command rebuilds the initramfs on RHEL?

lsinitrd shows what is inside.

4The server does not boot because of an fstab mistake. Which mode does it drop into, and what is the first step?

In emergency mode root is read-only.

5How do you switch from recovery mode to normal mode without rebooting?

It switches to the default target.
Was this lesson useful?

Comments

Sign in to comment.