next up previous contents
Next: Shutting Down Up: Booting the System Previous: Using a boot

Using LILO

 

    Another method of booting is to use LILO, a program which resides in the boot sector of your hard disk. This program is executed when the system is booted from the hard disk, and can automatically boot up Linux from a kernel image stored on the hard drive itself.

      LILO can also be used as a first-stage boot loader for several operating systems, allowing you to select at boot time which operating system (such as Linux or MS-DOS) to boot. When you boot using LILO, the default operating system is booted unless you press ctrl, alt, or shift during the bootup sequence. If you press any of these keys, you will be provided with a boot prompt, at which you type the name of the operating system to boot (such as `` linux'' or `` msdos''). If you press tab at the boot prompt, a listing of available operating systems will be provided.

  The easy way to install LILO is to edit the configuration file, /etc/lilo.conf, and then run the command

The LILO configuration file contains a ``stanza'' for each operating system that you want to boot. The best way to demonstrate this is with an example LILO config file. The below setup is for a system which has a Linux root partition on /dev/hda1, and an MS-DOS partition on /dev/hda2.

    The first operating system stanza in the config file will be the default OS for LILO to boot. You can select another OS to boot at the LILO boot prompt, as discussed above.

Remember that every time you update the kernel image on disk, you should rerun /sbin/lilo in order for the changes to be reflected on the boot sector of your drive.

Also note that if you use the `` root ='' line, above, there's no reason to use rdev to set the root partition in the kernel image. LILO sets it for you at boot time.

The Linux FAQ (see Appendix A) provides more information on LILO, including how to use LILO to boot with OS/2's Boot Manager.        



next up previous contents
Next: Shutting Down Up: Booting the System Previous: Using a boot



Ross Biro
Tue May 23 13:39:28 PDT 1995