Did You Know?
Donate to TecMint

We are pleased to announce our new TecMint Q/A section to submit your Linux questions

11 Linux Kernel Boot-time Parameters Explained

Download Your Free eBooks NOW - 10 Free Linux eBooks for Administrators

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.

I am a major in computer science, love to research nix. I love to write codes and scripts, review distros, experiment Foss Technologies, write technical articles, Hack, of course Ethically. I am working as System Administrator (nix) for a NGO.

Linux Services & Free WordPress Setup

Our post is simply ‘DIY’ aka ‘Do It Yourself, still you may find difficulties and want us to help you out. We offer wide range of Linux and Web Hosting Solutions at fair minimum rates. Please submit your orders by Clicking Here.

3 Responses

  1. shrikant says:

    Thank you :-)

  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:


    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. Pandu says:

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

Leave a Reply

This work is licensed under a (cc) BY-NC | TecMint uses cookies. By using our services, you comply to use of our cookies. More info: Privacy Policy.
© 2012-2014 All Rights Reserved.