11 Linux Kernel Boot-time Parameters Explained

Linux booting is a complex process as compared to booting processes in any other distribution. The Linux Kernel accepts a lot of parameters at booting, in command-line. This command-Line boot time parameter passes several kind of information to Linux Kernel at System Startup.

Kernel Boot Time Parameters

Kernel Boot Time Parameters

Booting a Linux kernel directly from BIOS using the kernel on cd (/dev/cdrom), don’t allow assigning parameter directly. For this we need a special program called bootloader. Two Most widely used Boot Loaders in Linux are:

  1. GNU GRUB (GNU GRand Unified Bootloader)
  2. LILO (LInux LOader)

GNU GRUB is a boot-loader package from the GNU project which is capable of booting one of the multiple kernel or any specific kernel configuration on Unix and Linux System.

LILO has the capability to boot various kernels and store their configuration in plain text file. LILO is capable of booting Windows, Unix, BSD, Linux and all other known platform with various options.

The Linux Kernel boot arguments are passed into a list of strings separated with white spaces. The conventional approach to pass boot arguments to kernel is in the form of:

name[=value_1] [,value_2]........[,value_10]

Where ‘name=unique keyword‘ it defines the part of kernel where the value is to be associated. The value it can hold is 10, maximum. The present code only handles 10 comma separated parameters per keywords.

Here, in this article we are going to cover some of the common kernel boot-time parameters in Linux, that you should know.

1. init

This sets the initial command that needs to be executed by kernel. If ‘init‘ is not set, it searches for the ‘init‘ in the following respective locations before the kernel lands into panic mode.

  1. /sbin/init
  2. /etc/init
  3. /bin/init
  4. /bin/sh

2. nfsaddrs

The above parameter sets nfs boot address to a string which is useful in case of net boot.

3. nfsroot

The ‘nfsroot’ parameter sets nfs root name to a string which is useful in case of net boot. The string name is prefixed by ‘/tftpboot‘ if it does not begin with ‘/‘ , ‘,‘ or any digit.

4. root

Passing root parameter at booting time sets the system to be used as root file system.

5. single

The ‘single‘ parameter which guides ‘init‘ to the start computer in single user mode and disable starting all the daemons.

6. ro

This parameter tells the boot loader to mount root file system in read-only mode. So, that fsck program can perform a file system scan, you do not issue fsck on a read/write file system.

7. rw

This parameter forces bootloader to mount root file system in read-write mode.

8. Hdx

Adjust IDE driver Geometry, the ‘Hdx‘ argument is very handy if BIOS is generating irrelevant and incorrect Information.

9. reserve

This argument is very useful in protecting I/O ports regions from probes.

10. console

Defines a serial port console to kernel with serial console support.

11. mem

Defines the total amount of available system memory, helpful while using large RAM.

The Linux kernel accepts loads of parameters at boot. We would be covering the rest of parameters in upcoming article.

That’s all for now. I’ll soon be here with another article, till then stay tuned and connected to Tecmint.

Best Affordable Linux and WordPress Services For Your Business
Outsource Your Linux and WordPress Project and Get it Promptly Completed Remotely and Delivered Online.

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

4 Responses

  1. Pandu says:

    Thank you for this post.. We learnt some useful kernel parameters through this..

  2. Roberto C. Sanchez says:

    A few things:

    * Your option #9 “revese” is not actually an option that can be passed to the kernel (I htink you mean “reserve”)

    * Booting from BIOS, regardless of where the kernel is located (CD-ROM, hard drive, floppy, tape, etc.) requires the use of a boot loader because the kernel is too large to fit entirely into the space which the BIOS can see

    * The article does not explain how someone would actually go about passing these options (e.g., edit the kernel command line at the boot loader prompt, edit the configuration and re-install the boot loader)

    * The explanations don’t provide any useful examples (like the mem, console, and reserve options)

    * The explanations leave out relevatively important uses (like using mem to limit the amount of memoery used in a VM host to leave the rest free for guests, like in Xen)

    * You don’t cover how to get the current kernel command line (cat /proc/cmdline)

    The article has potential, but appears to be hastily written and incomplete. Here is an excerpt from an O’Reilly book, which is more complete:

    http://oreilly.com/linux/excerpts/9780596100797/kernel-boot-command-line-parameter-reference.html

    Of course, the best place to look for information on this is the file Documentation/kernel-parameters.txt in the kernel source distribution, which provides the comprehensive list of hundreds of kernel command line options, along with the format for specifying each one.

  3. shrikant says:

    Thank you :-)

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.