Manipulate kernel parameters at boot time
As we saw in [Hack #2], it is possible to pass parameters to the kernel
at the LILO prompt allowing you to change the program that is first
called when the system boots. Changing
init=/bin/bash line) is just one of many
useful options that can be set at boot time. Here are more common
Boots up in single user mode.
Changes the device that is mounted as /. For example:
will boot from the fourth partition on the third scsi disk (instead of whatever your boot loader has defined as the default).
Adjusts IDE drive geometry. This is useful if your BIOS reports incorrect information:
This defines the master/primary IDE drive as a 30GB hard drive in LBA mode, and the slave/secondary IDE drive as a CD-ROM.
Defines a serial port console on kernels with serial console support. For example:
Here we're directing the kernel to log boot messages to ttyS0 (the first serial port), at 19200 baud, no parity, 8 data bits, 1 stop bit. Note that to get an actual serial console (that you can log in on), you'll need to add a line to /etc/inittab that looks something like this:
s1:12345:respawn:/sbin/agetty 19200 ttyS0 vt100
Disables SMP on a kernel so enabled. This can help if you suspect kernel trouble on a multiprocessor system.
Defines the total amount of available system memory. See [Hack #21].
Mounts the / partition read-only (this is typically the default, and is remounted read-write after fsck runs).
Mounts the / partition read-write. This is generally a bad idea, unless you're also running the init hack. Pass your init line along with rw, like this:
to eliminate the need for all of that silly
remount,rw / stuff in [Hack #2]. Congratulations, now
you've hacked a hack.
You can also pass parameters for SCSI controllers, IDE devices, sound cards, and just about any other device driver. Every driver is different, and typically allows for setting IRQs, base addresses, parity, speeds, options for auto-probing, and more. Consult your online documentation for the excruciating details.