Translation(s): English - Fran├žais - Italiano


BootLoader > Lilo


Lilo is the Linux Loader, a BootLoader for x86 systems.

How LILO Works

LILO can be thought of as consisting of two parts: an installer and a runtime module.

The installer resides somewhere in your Linux file system and is run from a command prompt. The installer will place the runtime on the disk Master Boot Record or on the Partition Boot Record, whichever you choose. The runtime module is binary code that will run to boot the system.

Installation

This section is about installing LILO on a disk or Partition boot record, not how to install the LILO package on your system (for that check Synaptic or apt-get).

To install LILO, at a root command prompt enter:

   lilo

The above command will use the default configuration file /etc/lilo.conf. To specify another configuration file enter:

   lilo -C lilo.conf

In the above command, you can change the file name to any LILO configuration file. The configuration file is a text file that you can edit to change LILO options as needed. See LILO Configuration.

Other Installation Information



Configuration

Or, how to build a LILO configuration file.


Installer Operation Options

   verbose=2            # increase information displayed when lilo runs


Installation Target Options

These options control where the LILO runtime files are installed.

Installing on the Master Boot Record

   boot=/dev/hda                # the target drive or partition
   map=/mnt/hda2/boot/map       # sector address map file to be created by lilo (mount dependent)
   lba32                        # allows addressing the disk above the 1024th cylinder

Installing on the Partition Boot Record

   boot=/dev/hda2               # the target drive or partition
   map=/mnt/hda2/boot/map       # sector address map file to be created by lilo (mount dependent)
   lba32                        # allows addressing the disk above the 1024th cylinder

Installing on a Floppy Disk

You must mount the floppy: mount /dev/fd0 /floppy

   boot=/dev/fd0
   map=/floppy/boot/map


Display Options

These options control what is displayed to the user at runtime

Text Menu

   install=text              # selects menu presentation mode
   prompt                    # show a prompt
   timeout=100               # timeout in tenths of a second (150 = 15 sec)
   message="message.hdb5"    # A file containing the choices to be displayed
   default=linux             # default to boot after timeout, the word corresponds
                             # to a __label__ in the OS options section (below)

Graphic Menu

(Put an example here)


OS Options

These control individual operating systems options

Linux

   image=/mnt/hda2/vmlinuz   # kernel image location (mount dependent)
   initrd=/mnt/hda2/initrd.img  # initrd image location (mount dependent)
   root=/dev/hda2            # root for this kernel
   label=linux               # menu entry for this OS
   read-only                 # initially mount filesystems read-only

Non-Linux (Windows)

   other=/dev/hda1           # boot from specified partition boot record
   label=["OtherOS"]         # menu entry for this OS

Change Options

These options make changes to the partition table when an OS is booted.

   change
      partition=/dev/hda1
         set=["FAT32"]_hidden    # hide hda1 so windows will boot on hda2

or

   change
      partition=/dev/hda1
         set=["FAT32"]_normal

-

   automatic                 # (what does this do?)

More Options

   optional                  # ignore this option if it does not exist
   unsafe                    # don't do any checks to see if it is bootable

Example Configuration File

lilo.conf:

   verbose=2                 # increase information displayed when lilo runs

   #*******''' Installation Target Options '''******#

   boot=/dev/hda             # the target drive or partition
   map=/mnt/hda3/boot/map    # sector address map file to be created by lilo (mount dependent)
   lba32                     # allows addressing the disk above the 1024th cylinder

   # For floppy installation:
   # you must mount floppy: mount /dev/fd0 /floppy
   # boot=/dev/fd0
   # map=/floppy/boot/map

   #********''' Menu Presentation Options '''*******#

   install=text              # selects menu presentation mode
   prompt                    # show a prompt
   timeout=150               # timeout in tenths of a second (150 = 15 sec)
   message="message.hda"     # A file containing the choices to be displayed
   default=3                 # default to boot after timeout

   #***************''' OS Options '''***************#

   # generic 1
   other=/dev/hda6           # boot from specified partition boot record
   label=1                   # menu entry for this OS

   # generic 2
   other=/dev/hda11          # boot from specified partition boot record
   label=2                   # menu entry for this OS

   # kernel 1
   image=/mnt/hda6/vmlinuz   # kernel image location (mount dependent)
   initrd=/mnt/hda6/initrd.img   # initrd image location (mount dependent)
   root=/dev/hda6            # root for this kernel
   label=k1                  # menu entry for this OS
   read-only                 # initially mount filesystems read-only
   #   optional              # ignore this option if it does not exist

   # kernel 2
   image=/mnt/hda11/vmlinu   # kernel image location (mount dependent)
   initrd=/mnt/hda11/initrd.img # initrd image location (mount dependent)
   root=/dev/hda11           # root for this kernel
   label=k2                  # menu entry for this OS
   read-only                 # initially mount filesystems read-only
   #   optional              # ignore this option if it does not exist

   # Boot from Floppy
   other=/dev/fd0
   label=fd
   unsafe                    # don't do any checks to see if it is bootable

   #--------------------------------------------

   # Windows 1
   other=/dev/hda1
   label=3
   table=/dev/hda
   change
   #  automatic
      partition=/dev/hda1
         set=["FAT32"]_normal

   # Windows 2
   other=/dev/hda2
   label=4
   table=/dev/hda
   change
   #  automatic
      partition=/dev/hda1
         set=["FAT32"]_hidden    # hide hda1 so windows will boot on hda2

   # Hard Disk #2 (hdb)
   other=/dev/hdb            # boot from specified partition boot record
   label=b                   # menu entry for this OS

   # generic 11
   other=/dev/hdb5           # boot from specified partition boot record
   label=11                  # menu entry for this OS

   # generic 12
   other=/dev/hdb11          # boot from specified partition boot record
   label=12                  # menu entry for this OS

message.hda:

               ************************************************
               *                                              *
               *               Larry's Computer               *
               *                  Start Menu                  *
               *                                              *
               ************************************************

                   1  Linux 1
                   2  Linux 2
                   3  Windows 1  (Default)
                   4  Windows 2

                   Please enter a number from the list.
                   Or wait 15 seconds for default.

Error Messages

Wikipedia LILO page has the list of error messages.

See Also


CategoryBootProcess