Kernel boot parameters
- Linux Kernel |
- Boot |
- grub
This is a wiki page. Be bold and improve it!
If you have any questions about the content on this page, don't hesitate to open a new ticket and we'll do our best to assist you.
Official documentation
See: man bootparam
.
For up-to-date information, see the kernel source file Documentation/kernel-parameters.txt (usually within /usr/src/linux/).
Getting started
Understanding your system
There are 3 types of boot parameters:
1) linux kernel parameters, e.g. log_buf_len=1M
2) module parameter, with the module name and the parameter separated by a dot, e.g. nvidia-drm.modeset=1
3) Other parameters that are not recognized by the linux kernel, and which are passed as it to init. Thus, adding a 1 to a boot entry will eventually be interpreted as init 1, which will tell init to start runlevel 1.
See the boot parameters used to boot the currently running system:
$ cat /proc/cmdline
Other kernel configuration options can also be seen in /proc/sys/ and /sys/.
To check kernel options available for specific modules, use modinfo. E.g.:
# modinfo -p nvidia_drm
modeset:Enable atomic kernel modesetting (1 = enable, 0 = disable (default)) (bool)
And to see the current state of that option, see within /sys/module/. E.g.:
# cat /sys/module/nvidia_drm/parameters/modeset
N
Testing new boot parameters
When using grub, learn how to edit the grub command line to test a new boot parameter once.
When you want the boot parameter permanent, you can add it to the relevant boot entry in grub.cfg.
Some parameters can be changed at runtime. See man sysctl.
http://linux.overshoot.tv/wiki/sysctl
See also
https://en.wikipedia.org/wiki/Linux_kernel_boot_parameters
https://wiki.archlinux.org/index.php/Kernel_parameter
https://wiki.gentoo.org/wiki/Complete_Handbook/Configuring_the_boot_proc...
https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Bootloader
https://wiki.gentoo.org/wiki/Handbook:AMD64/Blocks/Booting