Andrew Clayton | 9b9355a | 2017-04-20 14:04:15 +0100 | [diff] [blame] | 1 | .. _kernelparameters: |
| 2 | |
Jonathan Corbet | 7358bb2 | 2016-10-26 16:14:52 -0600 | [diff] [blame] | 3 | The kernel's command-line parameters |
| 4 | ==================================== |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5 | |
Randy Dunlap | 81e7906 | 2020-12-26 09:44:33 -0800 | [diff] [blame] | 6 | The following is a consolidated list of the kernel parameters as implemented |
| 7 | by the __setup(), early_param(), core_param() and module_param() macros |
Rusty Russell | 5888bcc | 2014-05-14 10:33:45 +0930 | [diff] [blame] | 8 | and sorted into English Dictionary order (defined as ignoring all |
| 9 | punctuation and sorting digits before letters in a case insensitive |
| 10 | manner), and with descriptions where known. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 11 | |
Stephen Kitt | 62ee81b | 2019-06-27 15:59:38 +0200 | [diff] [blame] | 12 | The kernel parses parameters from the kernel command line up to "``--``"; |
Rusty Russell | 5888bcc | 2014-05-14 10:33:45 +0930 | [diff] [blame] | 13 | if it doesn't recognize a parameter and it doesn't contain a '.', the |
| 14 | parameter gets passed to init: parameters with '=' go into init's |
| 15 | environment, others are passed as command line arguments to init. |
Stephen Kitt | 62ee81b | 2019-06-27 15:59:38 +0200 | [diff] [blame] | 16 | Everything after "``--``" is passed as an argument to init. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 17 | |
Rusty Russell | 5888bcc | 2014-05-14 10:33:45 +0930 | [diff] [blame] | 18 | Module parameters can be specified in two ways: via the kernel command |
Mauro Carvalho Chehab | 684adc0 | 2016-09-21 09:48:55 -0300 | [diff] [blame] | 19 | line with a module name prefix, or via modprobe, e.g.:: |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 20 | |
Rusty Russell | 5888bcc | 2014-05-14 10:33:45 +0930 | [diff] [blame] | 21 | (kernel command line) usbcore.blinkenlights=1 |
| 22 | (modprobe command line) modprobe usbcore blinkenlights=1 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 23 | |
Rusty Russell | 5888bcc | 2014-05-14 10:33:45 +0930 | [diff] [blame] | 24 | Parameters for modules which are built into the kernel need to be |
| 25 | specified on the kernel command line. modprobe looks through the |
| 26 | kernel command line (/proc/cmdline) and collects module parameters |
| 27 | when it loads a module, so the kernel command line can be used for |
| 28 | loadable modules too. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 29 | |
Mauro Carvalho Chehab | 684adc0 | 2016-09-21 09:48:55 -0300 | [diff] [blame] | 30 | Hyphens (dashes) and underscores are equivalent in parameter names, so:: |
| 31 | |
Randy Dunlap | ca1eda2 | 2009-05-06 16:02:58 -0700 | [diff] [blame] | 32 | log_buf_len=1M print-fatal-signals=1 |
Mauro Carvalho Chehab | 684adc0 | 2016-09-21 09:48:55 -0300 | [diff] [blame] | 33 | |
| 34 | can also be entered as:: |
| 35 | |
Randy Dunlap | ca1eda2 | 2009-05-06 16:02:58 -0700 | [diff] [blame] | 36 | log-buf-len=1M print_fatal_signals=1 |
| 37 | |
Mauro Carvalho Chehab | 684adc0 | 2016-09-21 09:48:55 -0300 | [diff] [blame] | 38 | Double-quotes can be used to protect spaces in values, e.g.:: |
| 39 | |
Rusty Russell | 5888bcc | 2014-05-14 10:33:45 +0930 | [diff] [blame] | 40 | param="spaces in here" |
Randy Dunlap | ca1eda2 | 2009-05-06 16:02:58 -0700 | [diff] [blame] | 41 | |
Noam Camus | 2d13e6c | 2016-10-11 13:51:35 -0700 | [diff] [blame] | 42 | cpu lists: |
| 43 | ---------- |
| 44 | |
| 45 | Some kernel parameters take a list of CPUs as a value, e.g. isolcpus, |
| 46 | nohz_full, irqaffinity, rcu_nocbs. The format of this list is: |
| 47 | |
| 48 | <cpu number>,...,<cpu number> |
| 49 | |
| 50 | or |
| 51 | |
| 52 | <cpu number>-<cpu number> |
| 53 | (must be a positive range in ascending order) |
| 54 | |
| 55 | or a mixture |
| 56 | |
| 57 | <cpu number>,...,<cpu number>-<cpu number> |
| 58 | |
| 59 | Note that for the special case of a range one can split the range into equal |
| 60 | sized groups and for each group use some amount from the beginning of that |
| 61 | group: |
| 62 | |
Wolfram Sang | 187623b | 2021-01-27 11:43:43 +0100 | [diff] [blame] | 63 | <cpu number>-<cpu number>:<used size>/<group size> |
Noam Camus | 2d13e6c | 2016-10-11 13:51:35 -0700 | [diff] [blame] | 64 | |
| 65 | For example one can add to the command line following parameter: |
| 66 | |
| 67 | isolcpus=1,2,10-20,100-2000:2/25 |
| 68 | |
| 69 | where the final item represents CPUs 100,101,125,126,150,151,... |
| 70 | |
Paul Gortmaker | 2c4885d | 2021-02-21 03:08:25 -0500 | [diff] [blame] | 71 | The value "N" can be used to represent the numerically last CPU on the system, |
| 72 | i.e "foo_cpus=16-N" would be equivalent to "16-31" on a 32 core system. |
| 73 | |
| 74 | Keep in mind that "N" is dynamic, so if system changes cause the bitmap width |
| 75 | to change, such as less cores in the CPU list, then N and any ranges using N |
| 76 | will also change. Use the same on a small 4 core system, and "16-N" becomes |
| 77 | "16-3" and now the same boot input will be flagged as invalid (start > end). |
Noam Camus | 2d13e6c | 2016-10-11 13:51:35 -0700 | [diff] [blame] | 78 | |
Yury Norov | b18def1 | 2021-04-20 20:13:25 -0700 | [diff] [blame] | 79 | The special case-tolerant group name "all" has a meaning of selecting all CPUs, |
| 80 | so that "nohz_full=all" is the equivalent of "nohz_full=0-N". |
| 81 | |
| 82 | The semantics of "N" and "all" is supported on a level of bitmaps and holds for |
| 83 | all users of bitmap_parse(). |
Noam Camus | 2d13e6c | 2016-10-11 13:51:35 -0700 | [diff] [blame] | 84 | |
Stefan Richter | a901ebb | 2006-04-01 01:43:18 +0200 | [diff] [blame] | 85 | This document may not be entirely up to date and comprehensive. The command |
| 86 | "modinfo -p ${modulename}" shows a current list of all parameters of a loadable |
| 87 | module. Loadable modules, after being loaded into the running kernel, also |
| 88 | reveal their parameters in /sys/module/${modulename}/parameters/. Some of these |
| 89 | parameters may be changed at runtime by the command |
Mauro Carvalho Chehab | 684adc0 | 2016-09-21 09:48:55 -0300 | [diff] [blame] | 90 | ``echo -n ${value} > /sys/module/${modulename}/parameters/${parm}``. |
Stefan Richter | a901ebb | 2006-04-01 01:43:18 +0200 | [diff] [blame] | 91 | |
Stefan Richter | 6585fa8 | 2006-04-01 01:44:30 +0200 | [diff] [blame] | 92 | The parameters listed below are only valid if certain kernel build options were |
| 93 | enabled and if respective hardware is present. The text in square brackets at |
| 94 | the beginning of each description states the restrictions within which a |
Mauro Carvalho Chehab | 684adc0 | 2016-09-21 09:48:55 -0300 | [diff] [blame] | 95 | parameter is applicable:: |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 96 | |
| 97 | ACPI ACPI support is enabled. |
Chuck Ebbert | c99c108 | 2007-07-27 10:46:20 +1000 | [diff] [blame] | 98 | AGP AGP (Accelerated Graphics Port) is enabled. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 99 | ALSA ALSA sound support is enabled. |
| 100 | APIC APIC support is enabled. |
| 101 | APM Advanced Power Management support is enabled. |
Randy Dunlap | 1629024 | 2011-08-13 12:34:52 -0700 | [diff] [blame] | 102 | ARM ARM architecture is enabled. |
Josh Poimboeuf | 4ad499c | 2019-04-12 22:56:21 -0500 | [diff] [blame] | 103 | ARM64 ARM64 architecture is enabled. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 104 | AX25 Appropriate AX.25 support is enabled. |
Olof Johansson | 1e43525 | 2013-04-27 14:10:18 -0700 | [diff] [blame] | 105 | CLK Common clock infrastructure is enabled. |
Robert Tivy | 5c71d61 | 2013-03-28 18:41:46 -0700 | [diff] [blame] | 106 | CMA Contiguous Memory Area support is enabled. |
Alan Cox | 9cfe268 | 2011-01-25 14:18:38 +0000 | [diff] [blame] | 107 | DRM Direct Rendering Management support is enabled. |
| 108 | DYNAMIC_DEBUG Build in debug messages and enable them at runtime |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 109 | EDD BIOS Enhanced Disk Drive Services (EDD) is enabled |
| 110 | EFI EFI Partitioning (GPT) is enabled |
| 111 | EIDE EIDE/ATAPI support is enabled. |
Mimi Zohar | 7102ebc | 2011-05-12 18:33:20 -0400 | [diff] [blame] | 112 | EVM Extended Verification Module |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 113 | FB The frame buffer device is enabled. |
Randy Dunlap | 1629024 | 2011-08-13 12:34:52 -0700 | [diff] [blame] | 114 | FTRACE Function tracing enabled. |
Peter Oberparleiter | 2521f2c | 2009-06-17 16:28:08 -0700 | [diff] [blame] | 115 | GCOV GCOV profiling is enabled. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 116 | HW Appropriate hardware is enabled. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 117 | IA-64 IA-64 architecture is enabled. |
Mimi Zohar | 6146f0d | 2009-02-04 09:06:57 -0500 | [diff] [blame] | 118 | IMA Integrity measurement architecture is enabled. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 119 | IOSCHED More than one I/O scheduler is enabled. |
Adrian Bunk | 41e2e8b | 2005-07-12 13:58:33 -0700 | [diff] [blame] | 120 | IP_PNP IP DHCP, BOOTP, or RARP is enabled. |
Brian Haley | b0f83b2 | 2010-02-04 13:36:50 -0800 | [diff] [blame] | 121 | IPV6 IPv6 support is enabled. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 122 | ISAPNP ISA PnP code is enabled. |
| 123 | ISDN Appropriate ISDN support is enabled. |
Frederic Weisbecker | d94d105 | 2017-12-14 19:18:27 +0100 | [diff] [blame] | 124 | ISOL CPU Isolation is enabled. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 125 | JOY Appropriate joystick support is enabled. |
Jason Wessel | 84c08fd | 2010-05-20 21:04:24 -0500 | [diff] [blame] | 126 | KGDB Kernel debugger support is enabled. |
Andre Przywara | fef07aa | 2009-07-10 14:20:35 +0200 | [diff] [blame] | 127 | KVM Kernel Virtual Machine support is enabled. |
Kristen Carlson Accardi | 11ef697 | 2006-09-28 11:29:01 -0700 | [diff] [blame] | 128 | LIBATA Libata driver is enabled |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 129 | LP Printer support is enabled. |
| 130 | LOOP Loopback device support is enabled. |
| 131 | M68k M68k architecture is enabled. |
| 132 | These options have more detailed description inside of |
Mauro Carvalho Chehab | 23e0242 | 2019-04-14 08:27:15 -0300 | [diff] [blame] | 133 | Documentation/m68k/kernel-options.rst. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 134 | MDA MDA console support is enabled. |
Randy Dunlap | 1629024 | 2011-08-13 12:34:52 -0700 | [diff] [blame] | 135 | MIPS MIPS architecture is enabled. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 136 | MOUSE Appropriate mouse support is enabled. |
Matthew Wilcox | 309e57d | 2006-03-05 22:33:34 -0700 | [diff] [blame] | 137 | MSI Message Signaled Interrupts (PCI). |
Randy Dunlap | c8facbb | 2007-07-31 00:37:40 -0700 | [diff] [blame] | 138 | MTD MTD (Memory Technology Device) support is enabled. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 139 | NET Appropriate network support is enabled. |
| 140 | NUMA NUMA support is enabled. |
| 141 | NFS Appropriate NFS support is enabled. |
Saravana Kannan | a3e1d1a | 2019-09-04 14:11:22 -0700 | [diff] [blame] | 142 | OF Devicetree is enabled. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 143 | OSS OSS sound support is enabled. |
Randy Dunlap | c8facbb | 2007-07-31 00:37:40 -0700 | [diff] [blame] | 144 | PV_OPS A paravirtualized kernel is enabled. |
| 145 | PARIDE The ParIDE (parallel port IDE) subsystem is enabled. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 146 | PARISC The PA-RISC architecture is enabled. |
| 147 | PCI PCI bus support is enabled. |
Randy Dunlap | 7f78576 | 2007-10-05 13:17:58 -0700 | [diff] [blame] | 148 | PCIE PCI Express support is enabled. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 149 | PCMCIA The PCMCIA subsystem is enabled. |
| 150 | PNP Plug & Play support is enabled. |
| 151 | PPC PowerPC architecture is enabled. |
| 152 | PPT Parallel port support is enabled. |
| 153 | PS2 Appropriate PS/2 support is enabled. |
| 154 | RAM RAM disk support is enabled. |
Barry Song | 00b072c | 2021-03-02 21:41:59 +1300 | [diff] [blame] | 155 | RISCV RISCV architecture is enabled. |
Tony Luck | 1d9807f | 2017-08-24 09:26:51 -0700 | [diff] [blame] | 156 | RDT Intel Resource Director Technology. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 157 | S390 S390 architecture is enabled. |
| 158 | SCSI Appropriate SCSI support is enabled. |
Randy Dunlap | 163475f | 2010-08-14 12:36:14 -0700 | [diff] [blame] | 159 | A lot of drivers have their options described inside |
| 160 | the Documentation/scsi/ sub-directory. |
James Morris | 20510f2 | 2007-10-16 23:31:32 -0700 | [diff] [blame] | 161 | SECURITY Different security models are enabled. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 162 | SELINUX SELinux support is enabled. |
John Johansen | c1c124e | 2010-07-29 14:48:09 -0700 | [diff] [blame] | 163 | APPARMOR AppArmor support is enabled. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 164 | SERIAL Serial support is enabled. |
Paul Mundt | e523d93 | 2007-02-28 18:30:01 +0900 | [diff] [blame] | 165 | SH SuperH architecture is enabled. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 166 | SMP The kernel is an SMP kernel. |
| 167 | SPARC Sparc architecture is enabled. |
David Brownell | 77437fd | 2008-07-23 21:28:33 -0700 | [diff] [blame] | 168 | SWSUSP Software suspend (hibernation) is enabled. |
| 169 | SUSPEND System suspend states are enabled. |
Rajiv Andrade | 225a9be | 2010-03-25 00:55:32 -0300 | [diff] [blame] | 170 | TPM TPM drivers are enabled. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 171 | TS Appropriate touchscreen support is enabled. |
Alan Stern | d4f373e | 2008-11-10 14:07:45 -0500 | [diff] [blame] | 172 | UMS USB Mass Storage support is enabled. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 173 | USB USB support is enabled. |
| 174 | USBHID USB Human Interface Device support is enabled. |
| 175 | V4L Video For Linux support is enabled. |
Pawel Moll | 81a054c | 2012-05-09 18:30:16 +0100 | [diff] [blame] | 176 | VMMIO Driver for memory mapped virtio devices is enabled. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 177 | VGA The VGA console has been enabled. |
| 178 | VT Virtual terminal support is enabled. |
| 179 | WDT Watchdog support is enabled. |
| 180 | XT IBM PC/XT MFM hard disk support is enabled. |
Alan Cox | cd4f0ef | 2007-07-31 00:37:59 -0700 | [diff] [blame] | 181 | X86-32 X86-32, aka i386 architecture is enabled. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 182 | X86-64 X86-64 architecture is enabled. |
| 183 | More X86-64 boot options can be found in |
Mauro Carvalho Chehab | cb1aaeb | 2019-06-07 15:54:32 -0300 | [diff] [blame] | 184 | Documentation/x86/x86_64/boot-options.rst. |
Randy Dunlap | 1629024 | 2011-08-13 12:34:52 -0700 | [diff] [blame] | 185 | X86 Either 32-bit or 64-bit x86 (same as X86-32+X86-64) |
Alex Thorlton | 1c532e0 | 2016-03-31 14:18:29 -0500 | [diff] [blame] | 186 | X86_UV SGI UV support is enabled. |
Stefano Stabellini | c1c5413 | 2010-05-14 12:44:30 +0100 | [diff] [blame] | 187 | XEN Xen support is enabled |
Barry Song | 4c8e3de | 2020-11-29 08:51:21 +1300 | [diff] [blame] | 188 | XTENSA xtensa architecture is enabled. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 189 | |
Mauro Carvalho Chehab | 684adc0 | 2016-09-21 09:48:55 -0300 | [diff] [blame] | 190 | In addition, the following text indicates that the option:: |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 191 | |
| 192 | BUGS= Relates to possible processor bugs on the said processor. |
| 193 | KNL Is a kernel start-up parameter. |
| 194 | BOOT Is a boot loader parameter. |
| 195 | |
| 196 | Parameters denoted with BOOT are actually interpreted by the boot |
| 197 | loader, and have no meaning to the kernel directly. |
| 198 | Do not modify the syntax of boot loader parameters without extreme |
Mauro Carvalho Chehab | cb1aaeb | 2019-06-07 15:54:32 -0300 | [diff] [blame] | 199 | need or coordination with <Documentation/x86/boot.rst>. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 200 | |
Karsten Weiss | 5558870 | 2007-02-13 13:26:21 +0100 | [diff] [blame] | 201 | There are also arch-specific kernel-parameters not documented here. |
Mauro Carvalho Chehab | cb1aaeb | 2019-06-07 15:54:32 -0300 | [diff] [blame] | 202 | See for example <Documentation/x86/x86_64/boot-options.rst>. |
Karsten Weiss | 5558870 | 2007-02-13 13:26:21 +0100 | [diff] [blame] | 203 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 204 | Note that ALL kernel parameters listed below are CASE SENSITIVE, and that |
| 205 | a trailing = on the name of any parameter states that that parameter will |
| 206 | be entered as an environment variable, whereas its absence indicates that |
| 207 | it will appear as a kernel argument readable via /proc/cmdline by programs |
| 208 | running once the system is up. |
| 209 | |
jens m. noedler | 9c4751f | 2006-09-29 02:00:27 -0700 | [diff] [blame] | 210 | The number of kernel parameters is not limited, but the length of the |
| 211 | complete command line (parameters including spaces etc.) is limited to |
| 212 | a fixed number of characters. This limit depends on the architecture |
| 213 | and is between 256 and 4096 characters. It is defined in the file |
| 214 | ./include/asm/setup.h as COMMAND_LINE_SIZE. |
| 215 | |
Ahmed S. Darwish | 7a19a23 | 2011-02-20 20:08:35 -0800 | [diff] [blame] | 216 | Finally, the [KMG] suffix is commonly described after a number of kernel |
| 217 | parameter values. These 'K', 'M', and 'G' letters represent the _binary_ |
Tamara Diaconita | 9f02a48 | 2017-03-14 10:38:35 +0200 | [diff] [blame] | 218 | multipliers 'Kilo', 'Mega', and 'Giga', equaling 2^10, 2^20, and 2^30 |
Jani Nikula | e52347b | 2016-11-03 12:10:10 +0200 | [diff] [blame] | 219 | bytes respectively. Such letter suffixes can also be entirely omitted: |
Ahmed S. Darwish | 7a19a23 | 2011-02-20 20:08:35 -0800 | [diff] [blame] | 220 | |
Jani Nikula | e52347b | 2016-11-03 12:10:10 +0200 | [diff] [blame] | 221 | .. include:: kernel-parameters.txt |
| 222 | :literal: |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 223 | |
Mauro Carvalho Chehab | 684adc0 | 2016-09-21 09:48:55 -0300 | [diff] [blame] | 224 | Todo |
| 225 | ---- |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 226 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 227 | Add more DRM drivers. |