Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

D.3 The lilo Loader

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 boot sector of the floppy diskette.

  • The master boot record (MBR) of the first hard disk or the first CD-ROM drive, if the PC supports booting from a CD-ROM diskette.

  • The boot sector of a Linux file system partition on the first hard disk.

  • The boot sector of an extended partition on the first hard disk.

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

Directive

Description

boot=

Specifies the device or partition to which the boot image is written.

root=

Specifies the partition which will be mounted as root when the kernel is loaded.

install=

Specifies the file that is used to create the boot sector. This file normally resides in /boot.

map=

Specifies the file that indicates the location of the kernel. This file normally resides in /boot.

vga=

Specifies the video mode set when the kernel is loaded. Possible values are normal, extended, and ask, or a decimal number that gives the video mode.

delay=

Specifies the delay (in tenths of a second) before automatically booting the default kernel, which is the first specified in the configuration file.

image=

Specifies the file that contains the kernel image.

label=

Specifies the name by which the kernel image is known.

read-only

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.


Previous: D.2 Boot Disks Learning Debian GNU/Linux Next: D.4 The loadlin Loader
D.2 Boot Disks Book Index D.4 The loadlin Loader

 
 
  Published under the terms of the Creative Commons License Design by Interspire