Kernel Boot Parameter Reference

The following table describes some commonly used kernel boot parameters.

Option

Description

0, 1, 2, 3, 4, 5, or 6, or systemd.unit=runlevelN.target

Specifies the nearest systemd-equivalent system-state target to match a legacy SysV run level. N can take an integer value between 0 and 6.

Systemd maps system-state targets to mimic the legacy SysV init system.

For a description of system-state targets, see Systemd Targets.

1, s, S, single, or systemd.unit=rescue.target

Specifies the rescue shell. The system boots to single-user mode prompts for the root password.

3 or systemd.unit=multi-user.target

Specifies the systemd target for multiuser, nongraphical login.

5 or systemd.unit=graphical.target

Specifies the systemd target for multiuser, graphical login.

-b, emergency, or systemd.unit=emergency.target

Specifies emergency mode. The system boots to single-user mode and prompts for the root password. Fewer services are started than when in rescue mode.

KEYBOARDTYPE=kbtype

Specifies the keyboard type, which is written to /etc/sysconfig/keyboard in the initramfs.

KEYTABLE=kbtype

Specifies the keyboard layout, which is written to /etc/sysconfig/keyboard in the initramfs.

LANG=language_territory.codeset

Specifies the system language and code set, which is written to /etc/sysconfig/i18n in the initramfs.

max_loop=N

Specifies the number of loop devices (/dev/loop*) that are available for accessing files as block devices. The default and maximum values of N are 8 and 255.

nouptrack

Disables Ksplice Uptrack updates from being applied to the kernel.

quiet

Reduces debugging output.

rd_LUKS_UUID=UUID

Activates an encrypted Linux Unified Key Setup (LUKS) partition with the specified UUID.

rd_LVM_VG=vg/lv_vol

Specifies an LVM volume group and volume to be activated.

rd_NO_LUKS

Disables detection of an encrypted LUKS partition.

rhgb

Specifies to use the Red Hat graphical boot display to indicate the progress of booting.

rn_NO_DM

Disables Device-Mapper (DM) RAID detection.

rn_NO_MD

Disables Multiple Device (MD) RAID detection.

ro root=/dev/mapper/vg-lv_root

Specifies that the root file system is to be mounted read-only, and specifies the root file system by the device path of its LVM volume (where vg is the name of the volume group).

rw root=UUID=UUID

Specifies that the root (/) file system is to be mounted read-writable at boot time, and specifies the root partition by its UUID.

selinux=0

Disables SELinux and touches the /.autorelabel file so that SELinux file contexts are automatically relabeled the next time you boot with SELinux enabled.

Don't disable SELinux in production environments. Rather, set SELinux to permissive mode.

enforcing=0 Sets SELinux to permissive mode until next rebooted. In permissive mode, file contexts are automatically labeled and denials are logged, but applications can continue to function.

Use SELinux permissive mode to debug SELinux issues.

SYSFONT=font

Specifies the console font, which is written to /etc/sysconfig/i18n in the initramfs.

Parameters That Control System Performance

The following parameters control various aspects of system performance:

Parameter Description
fs.file-max

Specifies the maximum number of open files for all processes. Increase the value of this parameter if you see messages about running out of file handles.

kernel.io_uring_disabled

Specifies the disabled setting for creating io_uring instances. io_uring provides an interface to handle asynchronous I/O operations that can improve performance for storage and networking. io_uring is supported with UEK and is enabled by default when running UEK on Oracle Linux.

You can set the following values for the io_uring parameter:

  • kernel.io_uring_disabled=0 (default). This setting specifies all processes can create io_uring instances.
  • kernel.io_uring_disabled=1. This setting specifies only processes with CAP_SYS_ADMIN privileges can create io_uring instances.
  • kernel.io_uring_disabled=2. This setting specifies that io_uring instance creation is disabled for all users.
net.core.netdev_max_backlog

Specifies the size of the receiver backlog queue, which is used if an interface receives packets faster than the kernel can process them. If this queue is too small, packets are lost at the receiver, rather than on the network.

net.core.rmem_max

Specifies the maximum read socket buffer size. To minimize network packet loss, this buffer must be large enough to handle incoming network packets.

net.core.wmem_max

Specifies the maximum write socket buffer size. To minimize network packet loss, this buffer must be large enough to handle outgoing network packets.

net.ipv4.tcp_available_congestion_control

Displays the TCP congestion avoidance algorithms that are available for use. Use the modprobe command if you need to load additional modules such as tcp_htcp to implement the htcp algorithm.

net.ipv4.tcp_congestion_control

Specifies which TCP congestion avoidance algorithm is used.

net.ipv4.tcp_max_syn_backlog

Specifies the number of outstanding SYN requests that are allowed. Increase the value of this parameter if you see synflood warnings in the logs that are caused by the server being overloaded by legitimate connection attempts.

net.ipv4.tcp_rmem

Specifies minimum, default, and maximum receive buffer sizes that are used for a TCP socket. The maximum value can't be larger than net.core.rmem_max.

net.ipv4.tcp_wmem

Specifies minimum, default, and maximum send buffer sizes that are used for a TCP socket. The maximum value can't be larger than net.core.wmem_max.

vm.swappiness

Specifies how likely the kernel is to write loaded pages to swap rather than drop pages from the system page cache. When set to 0, swapping only occurs to avoid an out of memory condition. When set to 100, the kernel swaps aggressively. For a desktop system, setting a lower value can improve system responsiveness by decreasing latency. The default value is 60.

This parameter is intended for use with laptop computers to reduce power consumption by the hard disk. Don't adjust this value on server systems.

Parameters That Control Kernel Panics

The following parameters control the circumstances under which a kernel panic can occur.

Parameter Description
kernel.hung_task_panic

If set to 1, the kernel panics if any kernel or user thread sleeps in the TASK_UNINTERRUPTIBLE state (D state) for more than kernel.hung_task_timeout_secs seconds. A process remains in D state while waiting for I/O to complete. You can't stop or interrupt a process in this state.

The default value is 0, which disables the panic.

To diagnose a hung thread, you can examine /proc/PID/stack, which displays the kernel stack for both kernel and user threads.

kernel.hung_task_timeout_secs

Specifies how long a user or kernel thread can remain in D state before a warning message is generated or the kernel panics, if the value of kernel.hung_task_panic is 1. The default value is 120 seconds. A value of 0 disables the timeout.

kernel.nmi_watchdog

If set to 1 (default), enables the nonmaskable interrupt (NMI) watchdog thread in the kernel. To use the NMI switch or the OProfile system profiler to generate an undefined NMI, set the value of kernel.nmi_watchdog to 0.

kernel.panic

Specifies the number of seconds after a panic before a system automatically resets itself.

If the value is 0, which is the default value, the system becomes suspended, and you can collect detailed information about the panic for troubleshooting.

To enable automatic reset, set a nonzero value. If you require a memory image (vmcore), leave enough time for Kdump to create this image. The suggested value is 30 seconds, although large systems require a longer time.

kernel.panic_on_io_nmi

If set to 0 (default), the system tries to continue operations if the kernel detects an I/O channel check (IOCHK) NMI that typically indicates a uncorrectable hardware error. If set to 1, the system panics.

kernel.panic_on_oops

If set to 0, the system tries to continue operations if the kernel detects an oops or BUG condition. If set to 1 (default), the system delays a few seconds to give the kernel log daemon, klogd, time to record the oops output before the panic occurs.

In an OCFS2 cluster. set the value to 1 to specify that a system must panic if a kernel oops occurs. If a kernel thread required for cluster operation fails, the system must reset itself. Otherwise, another node might not detect whether a node is slow to respond or unable to respond, causing cluster operations to halt.

kernel.panic_on_unrecovered_nmi

If set to 0 (default), the system tries to continue operations if the kernel detects an NMI that might indicate an uncorrectable parity or ECC memory error. If set to 1, the system panics.

kernel.softlockup_panic

If set to 0 (default), the system tries to continue operations if the kernel detects a soft-lockup error that causes the NMI watchdog thread to fail to update its timestamp for more than twice the value of kernel.watchdog_thresh seconds. If set to 1, the system panics.

kernel.unknown_nmi_panic

If set to 1, the system panics if the kernel detects an undefined NMI. You can generate an undefined NMI by manually pressing an NMI switch. As the NMI watchdog thread also uses the undefined NMI, set the value of kernel.unknown_nmi_panic to 0 if you set kernel.nmi_watchdog to 1.

kernel.watchdog_thresh

Specifies the interval between generating an NMI performance monitoring interrupt that the kernel uses to check for hard-lockup and soft-lockup errors. A hard-lockup error is assumed if a CPU is unresponsive to the interrupt for more than kernel.watchdog_thresh seconds. The default value is 10 seconds. A value of 0 disables the detection of lockup errors.

vm.panic_on_oom

If set to 0 (default), the kernel’s OOM-killer scans through the entire task list and stops a memory-hogging process to avoid a panic. If set to 1, the kernel panics but can survive under certain conditions. If a process limits allocations to certain nodes by using memory policies or cpusets, and those nodes reach memory exhaustion status, the OOM-killer can stop one process. No panic occurs in this case because other nodes’ memory might be free and the system as a whole might not yet be out of memory. If set to 2, the kernel always panics when an OOM condition occurs. Settings of 1 and 2 are for intended for use with clusters, depending on the defined failover policy.