Learning Debian GNU/LinuxBy Bill McCarty
1st Edition September 1999
1-56592-705-2, Order Number: 7052
360 pages, $34.95 , Includes CD-ROM
Most PCs can be booted from a floppy drive or hard drive; many recently manufactured PCs can be booted from a CD-ROM drive. The first sector of a disk, diskette, or partition is known as the boot sector. The boot sector associated with a disk or diskette (the first sector of the disk or diskette) is know as the master boot record. In order for a diskette or disk to be bootable, it must contain a boot loader, which can reside in:
The lilo loader, or simply lilo, is a simple boot loader that can load Linux, Microsoft Windows 3.x and 9x, and other popular operating systems. Most users install lilo on the MBR of their system's first hard disk. That way, when the system is started, it boots lilo, which can be used to load Linux, Microsoft Windows, or another operating system.
The Debian GNU/Linux installation procedure automatically installs lilo as part of the base system. Therefore, you don't need to install lilo; you merely need to configure it.
However, before configuring lilo, you should make a fresh startup diskette for your system. If you have more than one operating system on your hard drive, make a startup diskette for each. Then, test each startup diskette. If you have a startup diskette for each operating system on your hard drive, you'll be able to start each operating system even if the MBR becomes damaged.
You can edit lilo's configuration file, /etc/lilo.conf, by using your favorite text editor. The lilo User's Guide, found in the /usr/doc/lilo directory, describes the format of the configuration file directives. Here's a typical lilo.conf file:boot=/dev/hda2 root=/dev/hda2 install=/boot/boot.b map=boot/map vga=normal delay=20 image=/vmlinuz label=Linux read-only
Table D.1 describes the directives used in the example file:
Table D.1: Commonly Used lilo Directives
Specifies the device or partition to which the boot image is written.
Specifies the partition which will be mounted as root when the kernel is loaded.
Specifies the file that is used to create the boot sector. This file normally resides in /boot.
Specifies the file that indicates the location of the kernel. This file normally resides in /boot.
Specifies the video mode set when the kernel is loaded. Possible values are
ask, or a decimal number that gives the video mode.
Specifies the delay (in tenths of a second) before automatically booting the default kernel, which is the first specified in the configuration file.
Specifies the file that contains the kernel image.
Specifies the name by which the kernel image is known.
If present, specifies that the root file system will be mounted read-only.
After revising the configuration file, you run lilo by issuing the command:/sbin/lilo
This causes lilo to update the master boot record or boot sector, according to the information in its configuration file. Then, you can boot your system according to the latest lilo specifications.
To boot your system, lilo uses your system's BIOS, which may not be able to load a Linux kernel (or other program) stored beyond cylinder 1023 of your hard drive. If you're installing Linux to a preexisting hard drive, you may not be able to place your Linux kernel in an appropriate location. In that case, you won't be able to use lilo to boot your system.
Back to: Learning Debian GNU/Linux
© 2001, O'Reilly & Associates, Inc.