LILO : The "linear" option

Support knowledgebase (kgw_lilo_linear)

Symptom:

LILO cannot find the boot kernels when booting from the hard drive and stops at LI (or another incomplete part of the word LILO, see also LILO fails: Error messages and their interpretation (kgw_lilo_errmsg.html)). This happens even though you have respected the 1024 cylinder limit (Linux above 1024 cylinders and LILO(1024_Zylinder.html)))

This happens, in particular, if you have installed another operating system in the beginning of your hard drive (e.g., Windows NT).

Cause:

One possible cause is that LILO was installed with the option "linear" enabled.

Solution:

Deactivate the option "linear" in /etc/lilo.conf by erasing it or by putting a comment sign in front of that line:

# linear
Reinstall lilo: as root, run the command /sbin/lilo

Background:

Effect of the "linear" option: All references (pointers) to hard drive sectors of /boot/boot.b, /boot/map, kernel, etc., are stored in the LILO boot sector and in /boot/map as logical sector adresses instead of physical (cylinder-head-sector) addresses.

At boot time the LILO boot sector determines the geometry of the hard drive by calling a BIOS function. It then converts the logical sector addresses back to physical addresses. The real access to the hard drives is done using the physical sector addresses.

Purpose: The "linear" option is useful when the BIOS "sees" a particular hard drive with a geometry different than the one Linux uses. The logical sector addresses remain correct independent of the geometry of the hard drive.

This is a rare case, so the "linear" option is not really necessary most of the time. It is nevertheless activated by default in all cases when LILO was installed with YaST (in S.u.S.E. Linux until version 5.2).

Update: The following limitation concerns older LILO versions prior to v21 only (SuSE Linux 6.0 and older). LILO v21 and newer calculates the address conversion in another way that avoids 16-bit overflows.

Difficulty: When using the "linear" option, another limitation (so far undocumented) must be taken into account (besides the 1024 cylinder limitation). It comes into effect in particular for large modern hard drives: "linear" only works

   with 16 sectors/track     below 512 MB
   with 32 sectors/track     below   1 GB
   with 63 sectors/track     below  ~2 GB
This limitation is more restrictive than the 1024 cylinder limitation when there are more than 64 heads. Nowadays, geometries with 128 or 255 heads are very common.

The reason: One of the auxiliary results during the conversion into physical addresses at boot time is the track of the particular sector and this conversion is done with 16 bit arithmetics. Thus track must be < 65536.


See also:
o Linux on 1024 cylinder
o LILO fails: Error messages and their interpretation
o LILO: examples of the configuration

Keywords: BOOTING, BOOT PROBLEMS, LILO, LINEAR, 1024, CYLINDER, INSTALLATION

Categories: LILO

SDB-kgw_lilo_linear, Copyright SuSE Linux AG, Nürnberg, Germany - Version: 21. Apr 1998
SuSE Linux AG - Last generated: 09. Oct 2002 by kgw (sdb_gen 1.40.0)