Linux Command Line Parameters
If you are using the LILO (LInux LOader) program to boot Linux (usually from hard disk), then you can pass command-line options to the kernel at boot time. Typically these are set in the configuration file /etc/lilo.conf.
This is the most flexible method. It allows you, for example, to boot different kernels or boot the same kernel with different options.
Most options are passed by LILO on to the kernel; one useful option is parsed and handled by LILO itself. ,The console video mode for VGA displays can be set using a command-line option of the form:
where mode can be one of:
“normal” for the default 80-column by 24-line display,
“extended” or “ext” for 80 columns by 50 lines,
“ask” to prompt the user at boot up time for the mode to use, or
a decimal number to select various other modes, dependent on the type of VGA card (for example, on my Trident VGA card, mode 6 is 132x30).
Let's now look at the specific options supported by the Linux kernel. These affect the behavior of the kernel itself and are not passed on to the init program.
Some of these options accept a numeric value, parsed by a simplified version of the strtoul library function. Values can be given in decimal (e.g., 1234), octal (e.g., 01234) or hexadecimal (e.g., 0x1234), and should be separated by spaces. Let's now examine each of the options.
This option sets the root device; the device used as the root (“/”) filesystem; when booting. It accepts a value from a hard-coded list of common devices: /dev/hda..b (IDE hard disks), /dev/sda..e (SCSI disks), /dev/fd (floppy), and /dev/xda..b (XT hard disks). These are mapped into the corresponding major and minor device numbers.
This option indicates that the root filesystem should be mounted readonly. Typically this is done in order to run fsck on bootup.
This option is the converse of the previous one, indicating that the root filesystem should be mounted for both read and write, the normal case once a Linux system has been booted.
This option sets the kernel logging level to 10, rather than the default value of 7. It sets the global variable “console_loglevel”. Currently this make no visible difference; apparently there is no kemel code that displays messages at levels higher than 7.
This sets the global variable “hlt_works_ok” to 0. When Linux is idle, it runs the previously mentioned idle process in a loop (found in kernel/sys.c). Having the idle process periodically execute a hlt (halt) instruction reduces power consumption on some machines, most notably laptops. However, a few users have reported problems with the kilt instruction on certain machines, so it can be disabled with this option.
Incidently, I routinely use this option on my desktop system; I find that it significantly reduces the level of bus noise picked up on my sound card.
This option sets the global variable “hard_math” to 0. It forces the kernel to use co-processor emulation, even if one is installed. This can be useful if you suspect hardware problems with your co-processor or if you want to measure performance without a math chip.
This option specifies to the kernel the highest memory address to use (specified in bytes). Normally Linux uses all of the available memory. This feature can be useful for simulating machines with less memory or debugging cache problems on machines with lots of memory. As an experiment, try booting your machine with less memory, say 2MB, to highlight the difference memory makes. As another experiment, see what happens if you lie and tell Linux you have more memory than is installed...
reserve=port, size. . .
This option reserves I/O ports; it marks them as used so they will not be probed by device drivers that do autoprobing. This may be needed on certain systems that have unusual hardware or device conflicts.
This option sets the size of the RAM disk, in bytes.
Fast/Flexible Linux OS Recovery
On Demand Now
In this live one-hour webinar, learn how to enhance your existing backup strategies for complete disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible full-system recovery solution for UNIX and Linux systems.
Join Linux Journal's Shawn Powers and David Huffman, President/CEO, Storix, Inc.
Free to Linux Journal readers.Register Now!
- Download "Linux Management with Red Hat Satellite: Measuring Business Impact and ROI"
- Back to Backups
- A New Version of Rust Hits the Streets
- Google's Abacus Project: It's All about Trust
- Secure Desktops with Qubes: Introduction
- Seeing Red and Getting Sleep
- Fancy Tricks for Changing Numeric Base
- Secure Desktops with Qubes: Installation
- Working with Command Arguments
- CentOS 6.8 Released
Until recently, IBM’s Power Platform was looked upon as being the system that hosted IBM’s flavor of UNIX and proprietary operating system called IBM i. These servers often are found in medium-size businesses running ERP, CRM and financials for on-premise customers. By enabling the Power platform to run the Linux OS, IBM now has positioned Power to be the platform of choice for those already running Linux that are facing scalability issues, especially customers looking at analytics, big data or cloud computing.
￼Running Linux on IBM’s Power hardware offers some obvious benefits, including improved processing speed and memory bandwidth, inherent security, and simpler deployment and management. But if you look beyond the impressive architecture, you’ll also find an open ecosystem that has given rise to a strong, innovative community, as well as an inventory of system and network management applications that really help leverage the benefits offered by running Linux on Power.Get the Guide