Troubleshooting LILO

Troubleshooting LILO can be a bit of a nightmare for newbies. Because LILO has to fit in the boot block or master boot record, it was coded to have an extremely small footprint. And part of what was sacrificed to make it so small is descriptive error messages.

A normal boot up with LILO looks like this:
LILO 22.5.9 Loading Linux-2.4.26......

If all is well, you should now see your operating system booting.

The four letters (L I L O ) actually correspond to the four stages the boot loader passes through before chaining the operating system. As it passes each stage, it writes out the corresponding letter. If it fails at a particular point it will not advance to the next stage, so this way you can tell where it's barfing.

Here I will list the different levels, additional error messages you might see, and where to start looking for how to debug the fault. Let us begin.

  • L : LILO has reached the first stage boot loader (located on master boot record). This basically exists only to load and pass control to the second stage boot loader. If this is all you get, then something has gone amiss when LILO attempts to load the secondary boot loader.
    A common fault that occurs here is the BIOS mapping of the drives does not match LILO's perception of them because the BIOS enumerates drive controllers in a different order than the operating system LILO was run from. This error can be fixed by manually specifying disk= in lilo.conf.

    A single L may be followed by a two digit error code, indicating an additional error condition:

    0x00 Internal Error: This code is generated by the sector read routine of the LILO boot loader whenever an internal inconsistency is detected. This might be caused by corrupt files. Try re-building the map file. Another possible cause for this error are attempts to access cylinders beyond 1024 while using the linear option.

    0x01 Illegal Command: This shouldn't happen, but if it does, it may indicate an attempt to access a disk which is not supported by the BIOS.

    0x02 Address mark not found: This usually indicates a media problem. Try again several times.

    0x03 Write-protected disk: This should only occur on write operations.

    0x04 Sector not found: This typically indicates a geometry mismatch. If you're booting a raw-written disk image, verify whether it was created for disks with the same geometry as the one you're using. If you're booting from a SCSI disk or a large IDE disk, you should check whether LILO has obtained correct geometry data from the kernel or whether the geometry definition corresponds to the real disk geometry. Removing compact may help too. So may adding lba32 or linear.

    0x06 Change line active: This means the disk is locked in write open state. Try booting a second time.

    0x07 Invalid initialization: The BIOS failed to properly initialize the disk controller. Check the BIOS setup parameters. A warm boot might help too. (Boot a rescue disc and rerun LILO.)

    0x08 DMA overrun: This shouldn't happen. Try booting again.

    0x09 DMA attempt across 64k boundary: This shouldn't happen, but may inicate a disk geometry mismatch. If applicable, try omitting the COMPACT option. You may need to specify the disk geometry yourself.

    0x0C Invalid media: This shouldn't happen and might be caused by a media error, such as a bad CD. Try booting again.

    0x10 CRC error: A media error has been detected. This is usally uncorrectable on CDs and indicates the media is flawed or not bootable on your hardware. If you get this error on a hard disk, it usually means you have a bad sector on the boot block (Very Bad). Try booting several times, running the map installer (make bzImage install) a second time, mapping out the bad sectors/tracks and, if all else fails, replace the disk.

    0x11 ECC correction successful: A read error occurred, but was corrected. LILO does not recognize this condition and aborts the load process anyway. A reboot should succeed.

    0x20 Controller error: This shouldn't happen. If you keep getting it there may be a fault in your IO controller.

    0x40 Seek failure: This might be a media problem. Try booting again. If it keeps happening it could be the BIOS incorrectly detecting the disk geometry.

    0x80 Disk timeout: The disk or the drive isn't waking up in time. Either the media is bad or the disk isn't spinning. If you're booting from a floppy, you might not have closed the drive door. Otherwise, trying to boot again might help.

    0xBB BIOS error: This shouldn't happen. Try booting again. If the problem persists, removing the compact option or adding/removing linear or lba32 might help.


  • LI : Second stage boot loader (located on partition 'boot' block). This reads information on the partitions from the MBR and what was written out to disk when LILO was installed.
    If LILO fails here it means it has loaded the second stage boot loader into RAM, but failed at some point in executing it. This usually means it was unable to calculate the correct address to read from (due to bung data from bios or lilo.conf) and jumped into a sea of zeroes or other bad data. Check BIOS settings and geometry definitions in lilo.conf.

  • LIL : The second stage boot loader has been started, but it can't load the descriptor table from the map file. This is typically caused by a media failure or by bad disk parameters in the IPCop PC's BIOS. It can also be caused by a bung boot= directive in lilo.conf.
    Under rare circumstances, you may also see one of the following:
    LIL- indicates the descriptor table is corrupt. This can be caused by bad BIOS parameters, or a bad partition table.
    LIL? indicates the destination address for loading the secondary boot loader was invalid. This can be caused by faulty RAM, or bad BIOS parameters.

  • LILO of course indicates a successful load and initialisation of the boot loader.
This information has been gleaned from the Linux Documentation Project, man pages and my personal experience. Much of it was ripped from the LILO users guide at www-user.tu-chemnitz.de/~mibe/linux/lilo/user.