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.
|Making Linux and Android Get Along (It's Not as Hard as It Sounds)||May 16, 2013|
|Drupal Is a Framework: Why Everyone Needs to Understand This||May 15, 2013|
|Home, My Backup Data Center||May 13, 2013|
|Non-Linux FOSS: Seashore||May 10, 2013|
|Trying to Tame the Tablet||May 08, 2013|
|Dart: a New Web Programming Experience||May 07, 2013|
- RSS Feeds
- New Products
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Drupal Is a Framework: Why Everyone Needs to Understand This
- A Topic for Discussion - Open Source Feature-Richness?
- Home, My Backup Data Center
- New Products
- Validate an E-Mail Address with PHP, the Right Way
- Developer Poll
- Trying to Tame the Tablet
- not living upto the mobile revolution
18 min 15 sec ago
- Deceptive Advertising and
53 min 47 sec ago
- Let\'s declare that you have
54 min 44 sec ago
- Alterations in Contest Due
55 min 50 sec ago
- At a numbers mindset, your
57 min 1 sec ago
- Do not get Just Almost any
1 hour 30 sec ago
- A fantastic rule-of-thumb to
1 hour 1 min ago
- Keren mastah..
1 hour 59 min ago
- mini tablet compare
3 hours 18 min ago
- Looking Good
6 hours 51 min ago
Enter to Win an Adafruit Prototyping Pi Plate Kit for Raspberry Pi
It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Prototyping Pi Plate Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- Next winner announced on 5-21-13!
Free Webinar: Linux Backup and Recovery
Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.
In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.