|s i s t e m a o p e r a c i o n a l m a g n u x l i n u x||~/ · documentação · suporte · sobre|
This section gives some examples of software that can be used to pass kernel boot-time arguments to the kernel itself. It also gives you an idea of how the arguments are processed, what limitations there are on the boot args, and how they filter down to each appropriate device that they are intended for.
It is important to note that spaces should not be used in a boot argument, but only between separate arguments. A list of values that are for a single argument are to be separated with a comma between the values, and again without any spaces. See the following examples below.
ether=9,0x300,0xd0000,0xd4000,eth0 root=/dev/hda1 *RIGHT* ether = 9, 0x300, 0xd0000, 0xd4000, eth0 root = /dev/hda1 *WRONG*
Once the Linux kernel is up and running, one can view the command
line arguments that were in place at boot by simply typing
The LILO program (LInux LOader) written by Werner Almesberger is the most commonly used. It has the ability to boot various kernels, and stores the configuration information in a plain text file. Most distributions ship with LILO as the default boot-loader. LILO can boot DOS, OS/2, Linux, FreeBSD, etc. without any difficulties, and is quite flexible.
A typical configuration will have LILO stop and print
LILO: linux root=/dev/hda1
LILO comes with excellent documentation, and for the purposes
of boot args discussed here, the LILO
The other commonly used Linux loader is `LoadLin' which is a DOS program that has the capability to launch a Linux kernel from the DOS prompt (with boot-args) assuming that certain resources are available. This is good for people that use DOS and want to launch into Linux from DOS.
It is also very useful if you have certain hardware which relies
on the supplied DOS driver to put the hardware into a known
state. A common example is `SoundBlaster Compatible' sound
cards that require the DOS driver to set a few proprietary
registers to put the card into a SB compatible mode. Booting
DOS with the supplied driver, and then loading Linux from
the DOS prompt with
There are also other programs that can be used to boot Linux.
For a complete list, please look at the programs available
on your local Linux ftp mirror, under
There are a few of the kernel boot parameters that have their
default values stored in various bytes in the kernel image itself.
There is a utility called
The rdev utility is usually also aliased to swapdev, ramsize, vidmode and rootflags. These are the five things that rdev can change, those being the root device, the swap device, the RAM disk parameters, the default video mode, and the readonly/readwrite setting of root device.
More information on
Most of the boot args take the form of:
where `name' is a unique keyword that is used to identify what part of the kernel the associated values (if any) are to be given to. Multiple boot args are just a space separated list of the above format. Note the limit of 11 is real, as the present code only handles 11 comma separated parameters per keyword. (However, you can re-use the same keyword with up to an additional 11 parameters in unusually complicated situations, assuming the setup function supports it.) Also note that the kernel splits the list into a maximum of ten integer arguments, and a following string, so you can't really supply 11 integers unless you convert the 11th arg from a string to an int in the driver itself.
Most of the sorting goes on in
Then it walks a list of setup functions (contained in the
Anything of the form `foo=bar' that is not accepted as a
setup function as described above is then interpreted as an
environment variable to be set. An example would
be to use
Any remaining arguments that were not picked up by the
kernel and were not interpreted as environment variables
are then passed onto process one, which is usually the
Next Previous Contents