Kernel/Command-line parameters
From Gentoo Wiki
< Kernel
Jump to:navigation
Jump to:search
This article mentions some of more commonly useful tuning knobs which can be passed to the Linux kernel at boot time. These are defined by upstream as "command-line parameters".
Configuration
Available options
A full list of parameters for the latest Linux kernel is provided at: https://www.kernel.org/doc/html/latest/admin-guide/kernel-parameters.html
Parameter | Options | Notes |
---|---|---|
debug= |
N/A | Enable kernel debug events. |
mitigations |
off , auto (default option), auto,nosmt |
Disables or adjusts protections against known CPU vulnerabilities, but can provide speed improvements for certain CPUs or systems when trading security for speed is desired. |
loglevel= |
0 (lowest output), 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 (highest output) |
Useful for adjusting the kernel's ring buffer output verbosity. The higher the number, the greater the verbosity. Be careful, high levels of verbosity can quickly consume high amounts of disk space! |
root= |
PARTUUID="<UUID>" , PARTLABEL="<label_name>" , /dev/sda , /dev/sda1 , etc. |
A block device specifier can be passed via this parameter such as a UUID of a device partition label (PARTUUID="<UUID>" ), a partition label (PARTLABEL="<label_name>" ), a device number of a disk (/dev/<disk_name> ), a device number of a partition (/dev/<disk_name><decimal> ), etc. See the full list here.
|
rootdelay= |
N (where N is an integer number) |
A delay in seconds the kernel should wait before attempting to mount the rootfs. Adding a delay here can be very useful for an uncommonly slow drive, like when running the rootfs off a USB drive. |
earlyprintk= |
vga , sclp , serial[,ttySn[,baudrate]] , |
Provides an alternate output location for the kernel's printk messages. Useful in the event at the main display crashes before any kernel messages can be read from the output. |
module_blacklist= |
<module_name> , <module_name_2> , etc. |
A comma separated list of module names to block from loading during the kernel boot process. Useful if a certain module is causing a problem; such as accidentally loading a debug kernel module with spews millions of messages into the printk output, therefore making information difficult to find. |
nomodule |
N/A | An option to prevent all modules from loading during the kernel boot process. |
Usage
Current boot parameters
Command-line parameters for the currently running kernel are exposed via the proc API at /proc/cmdline:
user $
cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-6.3.3-gentoo-x86_64 ro init=/usr/lib/systemd/systemd pcie_aspm=off pcie_port_pm=off pcie_pme=nomsi iommu=1 amd_iommu=on
See also
- Kernel — the core of the operating system.