Open Source

Customize Linux with these 10 boot prompt options

Find out about 10 of the most useful Linux prompt options available to you at boot time. These options can be activated by typing them in at the LILO or GRUB boot prompt, with appropriate modifiers as necessary.

One of the reasons Linux-based systems are so popular is their configurability — almost every aspect of the operating system's behavior can be customized, making it a wonderful platform for new application development or for deployment into highly customized networked environments. What most users don't realize, however, is that this customization can begin even before the system starts, at the boot prompt itself.

Ten of the most useful Linux prompt options available to you at boot time are explored in Table A. These options can be activated by typing them in at the LILO or GRUB boot prompt, with appropriate modifiers as necessary.

Note: Because kernel versions change quite rapidly, you should always consult your kernel's documentation before using a particular boot option.

Table A


Options

Description

Usage

root = <filesystem> 

This option defines the Linux root device. It tells the kernel which filesystem should be mounted as the root filesystem (/).

Use this option when you need to force the kernel to mount a different filesystem as root, typically when performing a rescue operation or setting up a multi-boot system.

ro, rw

These options control how the root filesystem is mounted, whether read-only or read-write.

Use these options to control whether programs can write to the root file system. Typically, the ro option is used when the file system is damaged and needs to be examined and repaired.

init = <path>

The init process is the system initialization process — the first process the system runs. This option controls the path to this initialization process.

Use this option to alter the binary used as the initialization process, often used to boot the system without a password or run a custom startup sequence.

initrd = <path to image>

The Linux boot loader has the capability to load a bare-bones system from a RAM disk image. This option tells the boot loader where to find this disk image.

Use this option for dual-phase startup, first using a generic kernel configuration and then loading a customized configuration on top of it. This is most useful when working in environments with wildly different hardware configurations, or when developing a modular kernel, perhaps on low-resource systems.

single

This option forces the system to boot in single-user mode.

Use this option to activate your Linux system without multi-user support, typically for rescue operations or when performing administrative tasks that require exclusive access to system resources.

mem = <size> K|G|M

This option tells the kernel to use only the specified amount of memory. The amount may be specified in kilobytes (K), megabytes (M) or gigabytes (G).

Use this option to restrict the amount of memory available to the kernel, usually for simulating kernel performance on low-resource systems with limited memory.

debug

This option tells the kernel to activate its built-in debugging features. Debugging messages are sent to the appropriate event log.

Use this option when developing new kernel-level code, to test your changes or to view internal status messages sent by the kernel.

vga = <mode>

This option controls the VGA mode the kernel will use.

Use this option to alter the kernel video mode, or to present the user with a list of available video modes to choose from.

panic = <seconds>

Typically, if a critical error occurs, the kernel "panics" and halts the system completely. A manual reboot is required to restart the system. This option alters this behavior, by specifying the number of seconds the kernel should wait before automatically rebooting the system.

Use this option to automatically reboot the system in the event of a critical error, particularly useful in the case of unattended server systems.

profile = <precision>

This option activates kernel profiling, which is a simple way to analyze overhead and understand which kernel functions are consuming the most resources. Profiling information is stored in /proc/profile.

Use this option to analyze kernel internals and performance, typically when developing kernel-level code.

Editor's Picks

Free Newsletters, In your Inbox