Here are some causes of LILO errors. Step through them (I know you said you've done some, so give the others a try).
Disk error codes can indicate problems such as an open floppy door, a drive timeout, a controller error, a media problem, a BIOS error, or even transient read problems (which can be overcome by rebooting). Overall, some common problems with LILO include
* Not rerunning /sbin/lilo following a kernel change
* Incorrect use of /sbin/lilo in creating a new boot map
* Installing and booting Linux from a very large (2GB+) partition
* Installing another operating system (such as Windows 95, which overwrites the MBR) after installing Linux and LILO
* Errors in /etc/lilo.conf after manual edits
* A corrupted MBR
* Installation of LILO in a Linux swap partition (which should be impossible)
* A missing Linux kernel image (error in /etc/lilo.conf)
* Installing Linux on and booting from a DOS partition and then defragmenting the DOS partition
* Passing incorrect kernel messages at the LILO: prompt
If you run into trouble, definitely peruse Almesberger's readme file, found under the /usr/doc/lilo directory. Take his advice: Don't panic! With a little forethought, detection, and perseverance, you should be able to avoid or overcome problems.
Or, from
http://sunsite.dk/linux-newbie/Linux_LILO.htm :
I quote from my good handbook "Red Hat 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 happend, 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).
2. 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 specifing the option (helpful to overcome the 1024 cyliner limit with larger hardrives 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.
3. 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.
4. 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 hardrives 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").
5. 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.
6. Get rid of LILO and use GRUB. Mandrake 7.2 contains GRUB as the default boot loader.