Difference between revisions of "Kernel parameters"
(→Parameters list: remove outdated bugfix (by the way, I also removed SysV boot parameters in my last edit, since it has been deprecated for a while)) |
(→Parameters list) |
||
Line 75: | Line 75: | ||
== Parameters list == | == Parameters list == | ||
+ | |||
+ | Parameters always come in {{ic|parameter}} or {{ic|parameter=value}}. All of these parameters are case-sensitive. | ||
{{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 built in. They also depend on the presence of the hardware they are associated with.}} | {{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 built in. They also depend on the presence of the hardware they are associated with.}} | ||
Line 100: | Line 102: | ||
|- | |- | ||
|} | |} | ||
− | |||
− | |||
For a complete list of all known options, please see the [https://www.kernel.org/doc/Documentation/kernel-parameters.txt kernel documentation]. | For a complete list of all known options, please see the [https://www.kernel.org/doc/Documentation/kernel-parameters.txt kernel documentation]. |
Revision as of 20:00, 7 August 2013
zh-CN:Kernel parameters There are three ways to pass options to the kernel and thus control its behaviour:
- When building the kernel.
- When starting the kernel (usually, when invoked from a boot loader).
- At runtime (through the files in
/proc
and/sys
).
This page now explains in more detail the second method and shows a list of most used kernel parameters in Arch Linux.
Contents
Configuration
Kernel parameters can be set either temporarily by editing the boot menu when it shows up, or by modifying the boot loader's configuration file.
Here we are adding the parameters quiet
and splash
to Syslinux, GRUB, GRUB Legacy and LILO.
Syslinux
- Press Template:Keypress when the menu shows up and add them at the end of the string:
-
linux /boot/vmlinuz-linux root=/dev/sda3 initrd=/boot/initramfs-linux.img quiet splash
- Press Template:Keypress to boot with these parameters.
- To make the change persistent after reboot, edit
/boot/syslinux/syslinux.cfg
and add them to theAPPEND
line:
-
APPEND root=/dev/sda3 quiet splash
For more information on configuring Syslinux, see the Syslinux article.
GRUB
- Press Template:Keypress when the menu shows up and add them on the
linux
line:
-
linux /boot/vmlinuz-linux root=UUID=978e3e81-8048-4ae1-8a06-aa727458e8ff quiet splash
- Press Template:Keypress to boot with these parameters.
- To make the change persistent after reboot, while you could manually edit
/boot/grub/grub.cfg
with the exact line from above, for beginners it's recommended to:
- Edit
/etc/default/grub
and append your kernel options to theGRUB_CMDLINE_LINUX_DEFAULT
line:
-
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
-
- And then automatically re-generate the
grub.cfg
file with:
-
# grub-mkconfig -o /boot/grub/grub.cfg
-
For more information on configuring GRUB, see the GRUB article.
GRUB Legacy
- Press Template:Keypress when the menu shows up and add them on the
kernel
line:
-
kernel /boot/vmlinuz-linux root=/dev/sda3 quiet splash
- Press Template:Keypress to boot with these parameters.
- To make the change persistent after reboot, edit
/boot/grub/menu.lst
and add them to thekernel
line, exactly like above.
For more information on configuring GRUB Legacy, see the GRUB Legacy article.
LILO
- Add them to
/etc/lilo.conf
:
-
image=/boot/vmlinuz-linux ... quiet splash
For more information on configuring LILO, see the LILO article.
Parameters list
Parameters always come inparameter
or
. All of these parameters are case-sensitive.
parameter | Description |
---|---|
root= |
Root filesystem. |
ro |
Mount root device read-only on boot. |
rw |
Mount root device read-write on boot (default). |
initrd= |
Specify the location of the initial ramdisk. |
init= |
Run specified binary instead of /sbin/init (symlinked to systemd in Arch) as init process.
|
init=/bin/sh |
Boot to shell. |
systemd.unit=multi-user |
Boot to a specified runlevel. |
systemd.unit=rescue |
Boot to single-user mode (root). |
nomodeset |
Disable Kernel Mode Setting. |
For a complete list of all known options, please see the kernel documentation.