Linux Know-How provides a collection of introductory texts on often needed Linux skills.


LILO hangs

I quote from my good handbook "RedHat Linux Unleashed" by Kamran Hussain, Timothy Parker, et al., published by SAMS Publishing:

"When LILO loads itself, it displays the word LILO. Each letter is printed before or after performing some specific action. If LILO fails at some point, the letters printed so far can be used to identify the problem. [...]

LI [...] This is caused either by geometry mismatch or by moving /etc/lilo/boot.b without running the map installer.

LIL [...] This is typically caused by media failure or geometry mismatch."

The geometry means the number of sectors/heads/cylinders used in the hard drive configuration of your BIOS. Hope this helps!

It is a very good idea to have a handbook for Linux or at least a general UNIX handbook. Handbooks for Windows are useless, handbooks for Linux are great! "Red Hat Linux Unleashed" is a very good handbook but I am sure there are many other equally good ones.

With a LILO error like above, you can boot your machine using a Linux or DOS boot floppy. There seems to be several general possibilities to correct such a LILO error, depending on what is wrong:

    1. If LILO simply got corrupted (does not seem very common), you can remove and re-install it. You can remove LILO by running under Linux:

lilo -u /dev/hda

or, under DOS:

FDISK/MBR

which rewrites the hard drive master boot record (MBR), in which LILO resides, and replaces it with "clean" DOS stuff. You will lose access to Linux if you rebooted your computer after removing LILO (if this happened, you can boot Linux from the floppy and re-install LILO on top of the DOS MBR).

To re-install LILO, simply re-run the command lilo (as root).

    1. Specify the option

linear

at the top of your /etc/lilo.conf file. This is particularly useful for large drives (>8 GB). See man lilo.conf for details. The option "linear" is safe--it should not affect a properly working system, so you can specify this option is any case.

You may also want to play with the method by which BIOS accesses your harddrive. Fore example, turn the LBA ("linear or large block access") mode on/off in your BIOS to see if this helps.

Instead of the option "linear" you may try specifying the option (helpful to overcome the 1024 cylinder limit with larger harddrives and newer BIOSes):

lba32

This is a new option so it won't work with the stock LILO supplied with RH6.1 or lower. Use the latest Mandrake or RedHat if having the "LI" kind of problems--hard drives are bigger and bigger, and BIOS makers put new tricks to support them.

    1. Look into your BIOS setup and figure out how the specified hard drive geometry does not match your hard drive. From under Linux, you can display the hard drive geometry using (for example, for the first IDE hard drive):

hdparm -g /dev/hda

You can typically easily find the recommended manufacturer geometry on the web using Google to search for your harddrive model number.

    1. Put LILO on another partition (different hard drive) and, using fdisk, make this partition bootable (if your system supports booting from another drive). Or swap your harddrives so that the one that is better supported by your old BIOS comes as the first hard drive on your first IDE interface (DOS drive "C").

    2. Maybe you prefer to use "loadlin" instead of "lilo". From under DOS, locate your CDROM and see the program /dosutils/loadlin.exe. It boots Linux from DOS.

    3. Get rid of LILO and use GRUB. Mandrake 7.2 contains GRUB as the default boot loader.


Last Update: 2010-12-16