Kernel parameters & tuned.
'Kernel parameter' means two different things: boot-time arguments GRUB hands the kernel, and runtime sysctl knobs you can twist while it's running. Learn both, how to make each persist, and how tuned bundles dozens of them into one named profile.
Kernel parameters and tuned animated tutorial. Boot-time kernel command line via GRUB and grubby, runtime sysctl tunables, persistent sysctl in /etc/sysctl.d, and tuned profiles with tuned-adm. RHCSA EX200 ready.Two things wear the name "kernel parameter": boot-time arguments from GRUB, and runtime sysctl knobs. Tell them apart, make each persist, and let tuned bundle the lot.
- Β·The boot-process lesson (where GRUB and the kernel cmdline fit)
- Β·Comfortable editing files and running commands as root
- Β·Helpful: NAT-and-routing (ip_forward is the running example)
Distinguish boot-time cmdline from runtime sysctl, persist each correctly, and switch tuned profiles for the machine's role.
pace: 9 minutes
Two different things called 'kernel parameter'
The phrase is overloaded. (1) BOOT-TIME parameters are arguments GRUB passes to the kernel on the command line β set once, read as the kernel starts (e.g. quiet, rd.break, selinux=0). (2) RUNTIME parameters are sysctl tunables you can read and change while the system runs (e.g. net.ipv4.ip_forward). Different mechanisms, different persistence β don't confuse them.
Persistence is the recurring trap. A GRUB 'e' edit lasts one boot; grubby makes it permanent. A sysctl -w lasts until reboot; a file in /etc/sysctl.d makes it permanent. tuned, by contrast, IS persistent β its daemon re-applies the chosen profile every boot.
$cat /proc/cmdline$grubby --info=ALL$grubby --update-kernel=ALL --args="X"$grubby --update-kernel=ALL --remove-args="X"$/etc/default/grub$grub2-mkconfig -o /boot/grub2/grub.cfg$sysctl -a$sysctl NAME$sysctl -w NAME=VAL$/etc/sysctl.d/99-x.conf$sysctl --system$tuned-adm active$tuned-adm list$tuned-adm profile NAME$tuned-adm recommend$systemctl enable --now tunedYou ran `sysctl -w net.ipv4.ip_forward=1` and routing started working. After a reboot it stopped. How do you make it permanent?
You need to add a kernel boot argument permanently across all installed kernels. Best command?
What's the relationship between a sysctl name like net.ipv4.ip_forward and the filesystem?
What does a tuned profile like 'throughput-performance' actually do?
These aren't graded β they're just for active recall, which is what actually makes the lesson stick.
Linux boot process
GRUB is where the kernel command line is assembled and where the 'e' one-boot edit (rd.break, init=/bin/bash) lives. See the full chain from firmware to systemd.
Read this lesson as text6 chapters Β· quiz answers
01Two different things called 'kernel parameter'
The phrase is overloaded. (1) BOOT-TIME parameters are arguments GRUB passes to the kernel on the command line β set once, read as the kernel starts (e.g. quiet, rd.break, selinux=0). (2) RUNTIME parameters are sysctl tunables you can read and change while the system runs (e.g. net.ipv4.ip_forward). Different mechanisms, different persistence β don't confuse them.
02Boot-time β the kernel command line
What GRUB handed the kernel lives in /proc/cmdline. You can edit it for ONE boot by pressing 'e' in the GRUB menu (great for rescue: add rd.break or init=/bin/bash). To make a change permanent, don't hand-edit grub.cfg β use
grubby --update-kernel=ALL --args="..."(or edit GRUB_CMDLINE_LINUX in /etc/default/grub then regenerate). Common args: quiet, rhgb, selinux=0, systemd.unit=, console=.$ cat /proc/cmdlineβ what THIS boot used$ grubby --info=ALLβ args per kernel entry$ grubby --update-kernel=ALL --args="quiet"β add an arg permanently$ grubby --update-kernel=ALL --remove-args="quiet"β remove one
03Runtime β sysctl tunables
Hundreds of kernel knobs live under /proc/sys and are exposed by
sysctl.sysctl -alists them;sysctl net.ipv4.ip_forwardreads one;sysctl -w net.ipv4.ip_forward=1sets it RIGHT NOW. But -w changes are runtime-only β they vanish on reboot (same trap as setsebool without -P). The dotted name maps to a path: net.ipv4.ip_forward = /proc/sys/net/ipv4/ip_forward.$ sysctl -aβ every tunable (lots)$ sysctl net.ipv4.ip_forwardβ read one$ sysctl -w net.ipv4.ip_forward=1β set now (runtime only)$ cat /proc/sys/net/ipv4/ip_forwardβ same value via the file
04Make sysctl persist
To survive reboots, write the setting to a file in /etc/sysctl.d/ (e.g. /etc/sysctl.d/99-forward.conf containing
net.ipv4.ip_forward = 1). Apply all config files withsysctl --system, or one file withsysctl -p <file>. /etc/sysctl.conf still works but a drop-in file in sysctl.d is the modern, package-friendly way.$ echo 'net.ipv4.ip_forward = 1' > /etc/sysctl.d/99-forward.confβ persist it$ sysctl --systemβ reload all sysctl.d files$ sysctl -p /etc/sysctl.d/99-forward.confβ load one file
05tuned β profiles bundle the knobs
Rather than hand-tune dozens of sysctls and power settings, tuned ships named PROFILES that apply a whole coherent set at once: throughput-performance (servers), virtual-guest (VMs), powersave (laptops), balanced (default).
tuned-adm activeshows the current one;tuned-adm listshows all;tuned-adm profile <name>switches. The tuned daemon must be running.$ tuned-adm activeβ current profile$ tuned-adm listβ available profiles$ tuned-adm profile throughput-performanceβ switch profile
06tuned recommend β let it pick
Not sure which profile?
tuned-adm recommendinspects the hardware/role and suggests one (e.g. virtual-guest on a VM). For the exam and real life: pick the profile that matches the machine's job, verify withtuned-adm active, and remember tuned changes are themselves persistent β it re-applies the chosen profile on every boot via the tuned.service.$ tuned-adm recommendβ suggested profile for this box$ tuned-adm verifyβ are settings still applied?$ systemctl enable --now tunedβ ensure the daemon runs
Quiz β answers
- You ran
sysctl -w net.ipv4.ip_forward=1and routing started working. After a reboot it stopped. How do you make it permanent? - βWrite
net.ipv4.ip_forward = 1to a file in /etc/sysctl.d/ and apply withsysctl --system.-wis runtime-only. A drop-in file under /etc/sysctl.d/ (e.g. 99-forward.conf) makes it persist;sysctl --systemreloads all such files. Editing /proc directly is also runtime-only. - You need to add a kernel boot argument permanently across all installed kernels. Best command?
- βgrubby --update-kernel=ALL --args="..."grubby is the supported tool to manage kernel args across entries. /proc/cmdline is read-only (it just reports the current boot). Hand-editing grub.cfg is fragile β it gets regenerated.
- What's the relationship between a sysctl name like net.ipv4.ip_forward and the filesystem?
- βThe dotted name maps to a path under /proc/sys: net.ipv4.ip_forward = /proc/sys/net/ipv4/ip_forward. Reading/writing the file is the same as sysctl.sysctl is just a friendly front-end to /proc/sys. Dots become slashes.
sysctl -w x.y=1andecho 1 > /proc/sys/x/ydo the same thing (both runtime-only). - What does a tuned profile like 'throughput-performance' actually do?
- βApplies a coherent bundle of pre-set sysctl values, CPU governor, disk, and power settings appropriate for that role β so you don't hand-tune each knob.tuned profiles are curated bundles. throughput-performance favors servers; virtual-guest suits VMs; powersave suits laptops.
tuned-adm recommendsuggests one; the tuned daemon re-applies it each boot.
keep going β these pair well with what you just learned.
SELinux contexts
Why Apache can't read your file. Watch the policy engine decide β and learn the workflow for fixing denials. RHCSA-ready.
Linux boot process
From power button to login prompt. Every stage in the chain β UEFI, GRUB, kernel, initramfs, systemd β with the rescue moves that save you. RHCSA-ready.
LVM stacking
Layer-by-layer build of an LVM stack: disks β PVs β VG β LVs β filesystem. Then extend live and snapshot. RHCSA-ready.