Difference between revisions of "Kernel parameters"
Thestinger (talk | contribs) (rm unrelated stuff) |
Thestinger (talk | contribs) (→GRUB: rm extra spacing) |
||
Line 25: | Line 25: | ||
The resulting line in {{ic|/boot/grub/grub.cfg}} will look like: | The resulting line in {{ic|/boot/grub/grub.cfg}} will look like: | ||
{{hc|/boot/grub/grub.cfg|2= | {{hc|/boot/grub/grub.cfg|2= | ||
− | linux /vmlinuz-linux root=/dev/sda3 quiet}} | + | linux /vmlinuz-linux root=/dev/sda3 quiet}} |
==== [[GRUB Legacy]] ==== | ==== [[GRUB Legacy]] ==== |
Revision as of 02:39, 27 September 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, 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. For a complete list of all known options, please see the kernel documentation.
Contents
Configuration
When building the kernel
When starting the kernel
Kernel parameters can be set by modifying boot loader configuration file. You can also set them manually for current boot when the boot loader menu shows up.
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
GRUB Legacy
For GRUB Legacy the kernel parameters go into the kernel line of menu.lst
.
/boot/grub/menu.lst
kernel /vmlinuz-linux root=/dev/sda3 ro quiet
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
At runtime
Parameters list
All of these parameters are case-sensitive.
Parameter | Example | Description |
---|---|---|
Init | 1 | change to specified runlevel(1-6) |
SystemD | systemd.unit = $target | boot to $target |
You can find a list of kernel parameters here: https://www.kernel.org/doc/Documentation/kernel-parameters.txt