Difference between revisions of "Kernel parameters"

From ArchWiki
Jump to: navigation, search
(Move in link form GRUB Legacy.)
(Add info.)
Line 1: Line 1:
 
[[Category:Kernel]]
 
[[Category:Kernel]]
{{Stub}}
 
This page will explain what is kernel parameters, how to set them and show a list of most used kernel parameters in Arch Linux.
 
  
== Set kernel parameters ==
+
There are three ways to pass options to the kernel and thus control its behavior:
Kernel command line parameters are often supplied by the bootloader. Here we are adding the parameters {{ic|quiet}} and {{ic|splash}} to GRUB, GRUB Legacy, LILO and Syslinux.
+
* When building the kernel.
 +
* When starting the kernel. Usually, parameters are passed to the kernel when it is invoked from a boot loader.
 +
* At runtime, by writing to files in the {{ic|proc}} and {{ic|/sys}} directories.
 +
 
 +
This page will explain the second method and show a list of most used kernel parameters in Arch Linux. For a complete list of all known options, please see the [http://www.kernel.org/doc/Documentation/kernel-parameters.txt kernel documentation].
 +
 
 +
== Configuration ==
 +
Here we are adding the parameters {{ic|quiet}} and {{ic|splash}} to GRUB, GRUB Legacy, LILO and Syslinux.
  
 
==== [[GRUB]] ====
 
==== [[GRUB]] ====
Line 31: Line 36:
 
{{hc|/boot/syslinux/syslinux.cfg|2=
 
{{hc|/boot/syslinux/syslinux.cfg|2=
 
APPEND root=UUID=988d4e11-8237-4af3-5ab6-77627128g9d0 ro vga=current quiet splash}}
 
APPEND root=UUID=988d4e11-8237-4af3-5ab6-77627128g9d0 ro vga=current quiet splash}}
 +
 +
== Parameters list ==
 +
{{Note|Not all of the listed options are always available. Most are associated with subsystems and work only if the kernel is configured with those subsystems build in. They also depend on the presence of the hardware with which they are associated.}}
 +
 +
All of these parameters are case-sensitive.
 +
{{Stub|Add list here.}}
  
 
== See Also ==
 
== See Also ==
 
* [http://www.mjmwired.net/kernel/Documentation/kernel-parameters.txt Linux Kernel Documentation :: kernel-parameters.txt]
 
* [http://www.mjmwired.net/kernel/Documentation/kernel-parameters.txt Linux Kernel Documentation :: kernel-parameters.txt]
 
* [http://files.kroah.com/lkn/lkn_pdf/ch09.pdf List of kernel paramaters with further explanation and grouped by similar options]
 
* [http://files.kroah.com/lkn/lkn_pdf/ch09.pdf List of kernel paramaters with further explanation and grouped by similar options]

Revision as of 07:02, 20 July 2012


There are three ways to pass options to the kernel and thus control its behavior:

  • When building the kernel.
  • When starting the kernel. Usually, parameters are passed to the kernel when it is invoked from a boot loader.
  • At runtime, by writing to files in the proc and /sys directories.

This page will explain the second method and show a list of most used kernel parameters in Arch Linux. For a complete list of all known options, please see the kernel documentation.

Configuration

Here we are adding the parameters quiet and splash to GRUB, GRUB Legacy, LILO and Syslinux.

GRUB

Edit the file /etc/default/grub and append your kernel options to the line GRUB_CMDLINE_LINUX_DEFAULT="":

/etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="ro quiet splash"

Re-generate grub.cfg with:

# grub-mkconfig -o /boot/grub/grub.cfg

The resulting line in /boot/grub/grub.cfg will look like:

/boot/grub/grub.cfg
linux	/vmlinuz-linux root=/dev/sda3 quiet splash

GRUB Legacy

Kernel parameters should be added to the kernel options of bootloader configuration file(/boot/grub/menu.lst).

/boot/grub/menu.lst
kernel /vmlinuz-linux root=/dev/sda3 ro quiet splash

LILO

/etc/lilo.conf
image=/boot/vmlinuz-linux
        [...]
        quiet splash

Syslinux

/boot/syslinux/syslinux.cfg
APPEND root=UUID=988d4e11-8237-4af3-5ab6-77627128g9d0 ro vga=current quiet splash

Parameters list

Note: Not all of the listed options are always available. Most are associated with subsystems and work only if the kernel is configured with those subsystems build in. They also depend on the presence of the hardware with which they are associated.

All of these parameters are case-sensitive.

Tango-document-new.pngThis article is a stub.Tango-document-new.png

Notes: Add list here. (Discuss in Talk:Kernel parameters#)

See Also