Projects / LILO


LILO is a Boot loader for Linux/x86 and other PC operating systems. It is responsible for loading your Linux kernel from either a floppy or a hard drive and passing control to it. It is capable of booting beyond cylinder 1024 of a hard disk if the BIOS supports EDD packet call extensions to the int 0x13 interface. LILO can also be used to boot many other operating systems, including DOS, Windows (all versions), OS/2, and the BSD variants. The LILO distribution includes full source, documentation and support files.

Operating Systems

Recent releases

  •  19 Feb 2007 19:30

    Release Notes: A maintenance release to add a DEVMAPPER (device_mapper, or LVM2) compilation option. This support is only compiled if the appropriate library and include files are present. This release allows root directory specification using UUID in addition to LABEL. The keyword "nodevcache" has been added to the configuration file.

    •  12 Aug 2006 08:26

      Release Notes: A fatal boot selection bug on systems without a PC/AT keyboard (primarily newer 64-bit systems) when compiled with the NOKEYBOARD option was fixed along with a known table entry error on major device 253.

      •  07 Jul 2006 20:11

        Release Notes: This is a patch file to fix an incorrect table entry that affects major device 253. This device is used by LVM2. The patch file is in the 'updates' directory at the developer's site.

        •  05 Jul 2006 18:10

          Release Notes: Three keywords are added: noraid, nokbdefault, and nokbdisable. The allowed kernel command line has been increased to 512 bytes (from 256). A write-around for a common USB hard disk BIOS problem (sectors reported as zero) is included.

          •  27 Sep 2005 21:31

            Release Notes: Supports the Enhanced Multi-Disk (RAID) driver, which is still new to the 2.6 kernel. Drives underlying a full-disk RAID-1 (/dev/md_dXX) array are automatically taken to be "inaccessible" to avoid Volume ID conflicts. This action may be suppressed with the keyword "noraid". A command line switch (-H) allows installation of a boot loader on a degraded RAID-1 (/dev/mdXX) array. See the updated man pages for 'lilo' and 'lilo.conf' for additional information.

            Recent comments

            08 Jan 2010 19:30 robertheller

            Does Lilo support multiboot? I have installed CentOS 5.4 with a xen kernel. The grub.conf file that the installer generated looks like:

            title CentOS (2.6.18-164.el5xen)
            root (hd0,0)
            kernel /xen.gz-2.6.18-164.el5
            module /vmlinuz-2.6.18-164.el5xen ro root=LABEL=/c5 irqpoll
            module /initrd-2.6.18-164.el5xen.img

            And I am unsure what I should put in /etc/lilo.conf (I want to use Lilo and not grub, if that is at all possible).

            09 Dec 2007 18:30 johnnynobody

            Re: USB keyboard and LILO

            > LILO contains NO device drivers. All

            > I/O is performed by the BIOS. This

            > includes disk I/O and keyboard I/O.


            > Unless your BIOS provides support on int

            > 16h for the USB keyboard, you will not

            > be able to use it with LILO.



            My BIOS does support USB and the keyboard works (i.e. the Delete key gets me into the BIOS and I can make changes in the BIOS) until I get to LILO where the arrow keys can't select any menu options and the Enter key does not work. LILO auto boots to the linux partition where the keyboard works fine again beginning with the linux bootup process. I hope that there is a fix for this issue. Mandriva 2008.

            04 Jul 2007 02:28 v01dp

            how to install LILO boot loader into a disk image
            It is possible to create a disk image using a file, partition it, create file systems, install a Linux distro, and install the boot loader of choice. This file can then be copied to actual disk, used as a virtual disk with an emulator (such as bochs), etc.

            Below is a short example of how to install LILO into such virtual disk, one that I actually made and using currently.

            Assuming you have created already the disk image file, have partitioned it, and attached it to loopback device(s) appropriately, this is the relevant part of lilo.conf:

            ========lilo.conf =====================

            # You have attached your disk image to the loop0

            # The disk geometry is that how you've defined it

            # when creating your disk image (fdisk .... )

            # Within my disk image, i have 3 partitions.

            # Note the start offsets (fdisk -lu on image)

            # The partitions are attached to other loops,

            # if you need to use them.












            # Some standard lilo things ...



            # MBR to install LILO to: loop0 is the entire disk

            # image, so we install into MBR of that image;

            boot = /dev/loop0

            # the boot partition I have mounted for working at

            # lo_2/boot

            map = /void/wrk/lo_2/boot/.map

            install = /void/wrk/lo_2/boot/boot-menu.b



            delay = 50

            vga = normal


            # I have vmlinuz on the boot partition,

            # which is mounted at lo_2/boot





            ========end lilo.conf ==============

            I have to note that inside my initrd image, my linuxrc

            sets up appropriate root device, then does pivot.

            (actual root device can be say /dev/sda, or /dev/hda).

            In shells like nash, you can run mkrootdev, which can

            create needed device node passed as root=/dev/XXX

            during boot.

            So then you only have to run lilo -v3 -C mylilo.conf -t,

            and if all is oK, remove the '-t' :)

            In case you wanted to see the mounts :

            #loop0 is the entire disk, partitions are mounted

            /dev/loop/2 on /void/wrk/lo_2 type squashfs (rw)

            /dev/loop/1 on /void/wrk/lo_2/boot type ext2 (rw)

            /dev/loop/3 on /void/wrk/lo_2/mnt type ext2 (rw)

            This was my first adventure of this sort, so I can't guarantee

            that installing LILO this way is best and most efficient.

            If you know of a better / alternative / another useful way of installing LILO into a file, or how to improve the above way,

            please post a comment.

            18 Jun 2007 12:32 johncoffman

            Re: Preparing a hd[x] drive for another machine
            If you wish to prepare a disk image and then copy it to a hard drive, I suggest you follow the example in the script "mkrescue --iso --size HD". Normally the "--iso" option creates a bootable floppy image; however, with the 2.6 kernels >1.4Mb this is no longer possible. So the extra size (Hard Disk), allows for very large kernels. Although this script ultimately creates an ISO image, the hard disk image is created along the way.

            The 'mkrescue' script is a part of the LILO source and binary distributions.

            18 Jun 2007 08:24 v01dp

            Re: Preparing a hd[x] drive for another machine

            You wrote that it is possible to contact you directly for more involved case.

            I was wondering about the 'other' ways to create a bootable

            disk for another machine, and what is / not possible with lilo here.

            I was interested if its possible to install lilo without having actual hard drive , only the disk image (which I then would copy to the disk ).

            I have made a disk image, with partitions, file systems, and a linux distro installed. I was trying to install lilo into it, but with no luck. I was trying to install lilo through the use of loopback

            devices, but that seems did not work (installed, but does not boot). Its most likely wrong what I was trying to do.

            I would really appreciate help on this.

            Thank you

            > Make sure you are using LILO 22.5.9 or

            > newer, and that you are using 'lba32'

            > disk addressing. A sector-by-sector

            > copy of a bootable drive (same size)

            > will be bootable:



            > >dd if=/dev/hda of=/dev/hdb



            > Then move hdb to hda on the second

            > machine. This, of course, assumes a

            > compatible BIOS.



            > If /dev/hda1 is the bootable partition

            > on the first machine, and /dev/hdb1 is

            > to be the bootable partition on the

            > second machine (/dev/hda1 after moving

            > the disk), then a simple install of LILO

            > on the second disk (mounted as /mnt/b),

            > would go as follows (identical

            > /etc/lilo.conf files on both disks):



            > > lilo -r /mnt/b -b /dev/hdb



            > At this point, dismount, power down, and

            > move the hdb disk to hda on the second

            > machine. Presumably even the

            > "root=/dev/hda1" specification for hdb

            > will now become valid.



            > There are other ways to create a

            > bootable disk for a second machine, but

            > they quickly increase in complexity from

            > this point. I suggest you contact me

            > directly if your situation is

            > significantly more involved.



            Project Spotlight


            A Fluent OpenStack client API for Java.


            Project Spotlight

            TurnKey TWiki Appliance

            A TWiki appliance that is easy to use and lightweight.