Imported Upstream version 24.2
[rrq/maintain_lilo.git] / readme / README
1 LILO - Generic Boot Loader for Linux ("LInux LOader") by Werner Almesberger
2 ===========================================================================
3
4    NOTE:  This document is no longer maintained.  However, it is
5    still current.  Changes to LILO for versions 21.2 and later are
6    documented in detail in the 'man' pages for 'lilo' and 'lilo.conf'.
7    Refer to them first, then to this document.
8
9   
10 Version 21-4 (release) -- John Coffman <johninsd@san.rr.com>
11
12 Minor changes suggested by Werner to show that this release is derived
13 from the source code to his version 21.  Added VERSION_MAJOR and 
14 VERSION_MINOR to replace VERSION.  The file VERSION is replaced by 
15 'version.h'.
16
17 The first and second stage loaders have been modified so that ONLY
18 'lba32' will use EDD packet calls.  'linear' will now always ask the
19 BIOS for the disk geometry, and then use C:H:S addressing.
20
21
22 Version 21-2  -- John Coffman <johninsd@san.rr.com>
23
24 This version was created to allow booting on disks larger than 8.4Gb using
25 the Enhanced BIOS call (int 0x13, AH=0x42) and the packet-call interface.
26 These calls are supported on post-1998 systems, and through software BIOS
27 extensions such as EZ-DRIVE(tm).  
28
29 My primary objective in making these changes to LILO, is not to break any-
30 thing.  Hence, the 32-bit direct addressing of sectors is supported by a
31 new keyword in the 'lilo.conf' file:  "lba32".  This keyword is mutually
32 exclusive with the keyword "linear".  On the command line, these options
33 are invoked with the new "-L" switch, or the old "-l" switch, respectively.
34
35 Apologies to Werner Almesberger for not communicating these changes/addi-
36 tions to him directly; but I have not been able to contact him by e-mail
37 at the address he provided in the latest 'lilo.lsm' file.  I do not want
38 versions of LILO to get out-of-step.
39
40 Disk sector addresses are conveyed from the Map Installer (lilo executable)
41 to the boot loaders, first- and second-stages through a 5 byte structure:
42
43      sector    [1..63] plus 2 high bits of Cylinder
44      cylinder  [0..1023] low eight bits in this byte
45      device    [0..3] for floppies, [0x80..0x8F] for hard disks
46      head      [0..254] no, the max is 254, not 255
47      count     [1...] number of sectors to transfer
48      
49 The first two bytes are normally loaded into the CX register, the second 
50 two
51 bytes into the DX register, and the last byte into the AL register.  This 
52 is
53 the call used for the C:H:S addressing scheme of the original IBM-PC BIOS.
54 LILO checks that the 64Kb DMA boundary is never crossed by a call, and that
55 the count never exceeds the sector count of one track on the disk.
56
57 When 'linear' is specified, a 24-bit, 0 based addressing scheme is 
58 employed.
59 The low 8 bits are in 'sector'; the middle 8 bits in 'cylinder'; and the 
60 high
61 8 bits are in 'head'.  To flag this as a 'linear' address, the 'device' 
62 byte
63 has bit 6 set (mask 0x40 or'ed in).  The count field is a maximum of 128,
64 since anything greater would cross a 64Kb DMA boundary.  It is up to the 
65 loader code (second stage only), to check that no track boundary is 
66 crossed.
67
68 The situation is more complicated with 'lba32' addressing.  It is flagged 
69 with
70 bit 5 of the 'device' byte being set (mask 0x20 or'ed in).  The 32-bit 
71 address
72 is spread over the 'sector', 'cylinder', 'head', and 'count' fields, from 
73 low
74 byte to high byte, respectively.  Whenever this full 32-bit address is
75 specified explicitly, the actual sector count to transfer is implied to be
76 one (1), and this fact is flagged in the 'device' byte by setting bit 5
77 (mask 0x10 or'ed in).  When a multi-sector transfer is called for, the high
78 8-bits of the address are NOT specified explicitly, but are assumed to be
79 the same as the previous transfer, the 'count' of sectors to transfer will
80 be in the range [2..127], and bit 5 (mask 0x10) of the 'device' byte will 
81 be
82 clear.
83
84 The first-stage loader uses single sector transfers only, so it uses a
85 simplified disk read routine, always assumes a sector transfer count of 1,
86 and always assumes that the full 32-bit address of the sector is specified
87 when 'lba32' mode is detected in the 'device' byte.  However, the second-
88 stage loader is capable of multi-sector transfers when map-compaction has
89 been used (-c switch, or 'compact' global option), so it uses the fully
90 capable read routine to load the -initrd- image, and the -kernel- image.
91
92 Both 'linear' and 'lba32' will use the Enhanced BIOS packet calls, if they
93 are available.  Otherwise, the disk address is converted to C:H:S, using 
94 the
95 disk geometry returned by (int 0x13, AH=8).  If cylinder overflow occurs --
96 i.e., cylinder > 1023, then error code '9f' is issued.
97
98 The BIOS calls used to implement large disk booting conform to the Enhanced
99 Disk Drive Specification, version 3.0, rev 0.8, dated March 12, 1998.  This
100 document is available on-line from Phoenix Technologies Ltd., at:
101    
102    http://www.phoenix.com/products/specs.html
103
104 Known bugs:
105    The chain loader, 'os2_d.b', still will not boot OS2 4.0 from a 
106 secondary
107    partition on my "D:" drive.  Boot Manager can, and I am still working on
108    the problem.
109 ----------------------------------------------------------------------------
110
111
112 Version 21
113
114 Important: The file INCOMPAT contains vital (in)compatibility information
115            for this release of LILO. Read it before proceeding.
116
117 Installing boot loaders is inherently dangerous. Be sure to have some means
118 to boot your system from a different media if you install LILO on your hard
119 disk.
120
121
122 There is also a LaTeX version of this document in the "doc" directory.
123 It is much nicer to read than pure ASCII.
124
125
126 Installation
127 ------------
128
129 Please read the file INCOMPAT for compatibility notes.
130
131 The installation procedure is described in the section "Normal first-time
132 installation". Please read "Booting basics" for the whole story.
133
134 *** QUICK INSTALLATION ***
135
136     If you want to install LILO on your hard disk and if you don't want
137     to use all its features, you can use the quick installation script.
138     Read QuickInst for details.
139
140
141  
142  LILO is a versatile boot loader for Linux. It does not depend on a 
143 specific file system, can boot Linux kernel images from floppy disks and 
144 from hard disks and can even act as a "boot manager" for other operating 
145 systems.*
146
147   *  PC/MS-DOS, DR DOS, OS/2, Windows 95, Windows NT, 386BSD, SCO UNIX, 
148     Unixware, ...
149
150 One of up to sixteen different images can be selected at boot time. Various 
151 parameters, such as the root device, can be set independently for each 
152 kernel. LILO can even be used as the master boot record.
153
154 This document introduces the basics of disk organization and booting, 
155 continues with an overview of common boot techniques and finally describes 
156 installation and use of LILO in greater detail. The troubleshooting section 
157 at the end describes diagnostic messages and contains suggestions for most 
158 problems that have been observed in the past.
159
160 Please read at least the sections about installation and configuration if 
161 you're already using an older version of LILO. This distribution is 
162 accompanied by a file named INCOMPAT that describes further 
163 incompatibilities to older versions.
164
165 For the impatient: there is a quick-installation script to create a simple 
166 but quite usable installation. See section "Quick installation" for 
167 details.
168
169 But wait ... here are a few easy rules that will help you to avoid most 
170 problems people experience with LILO:
171
172   - _Don't panic._ If something doesn't work, try to find out what is 
173     wrong, try to verify your assumption and only then attempt to fix it. 
174   - Read the documentation. Especially if what the system does doesn't 
175     correspond to what you think it should do. 
176   - Make sure you have an emergency boot disk, that you know how to use it, 
177     and that it is always kept up to date. 
178   - Run /sbin/lilo _whenever_ the kernel or any part of LILO, including its 
179     configuration file, has changed. When in doubt, run it. You can't run 
180     /sbin/lilo too many times. 
181   - If performing a destructive upgrade and/or erasing your Linux 
182     partitions, de-install LILO _before_ that if using it as the MBR. 
183   - Don't trust setup scripts. Always verify the /etc/lilo.conf they create 
184     before booting. 
185   - If using a big disk, be prepared for inconveniences: you may have to 
186     use the LINEAR option. 
187
188
189 System overview
190 ---------------
191
192 LILO is a collection of several programs and other files:
193
194   The map installer  is the program you run under Linux to put all files 
195     belonging to LILO at the appropriate places and to record information 
196     about the location of data needed at boot time. This program normally 
197     resides in /sbin/lilo. It has to be run to refresh that information 
198     whenever any part of the system that LILO knows about changes, e.g. 
199     after installing a new kernel. 
200   Various files  contain data LILO needs at boot time, e.g. the boot 
201     loader. Those files normally reside in /boot. The most important files 
202     are the boot loader (see below) and the map file (/boot/map), where the 
203     map installer records the location of the kernel(s).* Another important 
204     file is the configuration file, which is normally called /etc/lilo.conf 
205   The boot loader  is the part of LILO that is loaded by the BIOS and that 
206     loads kernels or the boot sectors of other operating systems. It also 
207     provides a simple command-line interface to interactively select the 
208     item to boot and to add boot options. 
209
210   *  LILO does not know how to read a file system. Instead, the map 
211     installer asks the kernel for the physical location of files (e.g. the 
212     kernel image(s)) and records that information. This allows LILO to work 
213     with most file systems that are supported by Linux.
214
215 LILO primarily accesses the following parts of the system:
216
217   The root file system partition is important for two reasons: first, LILO 
218     sometimes has to tell the kernel where to look for it. Second, it is 
219     frequently a convenient place for many other items LILO uses, such as 
220     the boot sector, the /boot directory, and the kernels. 
221   The boot sector contains the first part of LILO's boot loader. It loads 
222     the much larger second-stage loader.
223   The kernel is loaded and started by the boot loader. Kernels typically 
224     reside in the root directory or in /boot. 
225
226 Note that many of the files LILO needs at boot time have to be accessible 
227 with the BIOS. This creates certain restrictions, see section "BIOS 
228 restrictions".
229
230
231 Introduction
232 ============
233
234 The following sections describe how PCs boot in general and what has to be 
235 known when booting Linux and using LILO in particular.
236
237
238 Disk organization
239 -----------------
240
241 When designing a boot concept, it is important to understand some of the 
242 subtleties of how PCs typically organize disks. The most simple case are 
243 floppy disks. They consist of a boot sector, some administrative data (FAT 
244 or super block, etc.) and the data area. Because that administrative data 
245 is irrelevant as far as booting is concerned, it is regarded as part of the 
246 data area for simplicity.
247
248             +---------------------------+
249             |Boot sector|               |
250             |-----------+               |
251             |                           |
252             |         Data area         |
253             |                           |
254             |                           |
255             +---------------------------+
256
257 The entire disk appears as one device (e.g. /dev/fd0) on Linux.
258
259 The MS-DOS boot sector has the following structure:
260
261                     +------------------------+
262               0x000 |Jump to the program code|
263                     |------------------------|
264               0x003 |                        |
265                     |    Disk parameters     |
266                     |                        |
267                     |------------------------|
268         0x02C/0x03E |                        |
269                     |      Program code      |
270                     |                        |
271                     |                        |
272                     |------------------------|
273               0x1FE | Magic number (0xAA55)  |
274                     +------------------------+
275
276 LILO uses a similar boot sector, but it does not contain the disk 
277 parameters part. This is no problem for Minix, Ext2 or similar file 
278 systems, because they don't look at the boot sector, but putting a LILO 
279 boot sector on an MS-DOS file system would make it inaccessible for MS-DOS.
280
281 Hard disks are organized in a more complex way than floppy disks. They 
282 contain several data areas called partitions. Up to four so-called primary 
283 partitions can exist on an MS-DOS hard disk. If more partitions are needed, 
284 one primary partition is used as an extended partition that contains 
285 several logical partitions.
286
287 The first sector of each hard disk contains a partition table, and an 
288 extended partition and _each_ logical partition contains a partition table 
289 too.
290
291         +--------------------------------------------+
292         | Partition table                  /dev/hda  |
293         | +------------------------------------------|
294         | | Partition 1                    /dev/hda1 |
295         | |                                          |
296         | |------------------------------------------|
297         | | Partition 2                    /dev/hda2 |
298         | |                                          |
299         +--------------------------------------------+
300
301 The entire disk can be accessed as /dev/hda, /dev/hdb, /dev/sda, etc. The 
302 primary partitions are /dev/hda1 ... /dev/hda4.
303
304         +--------------------------------------------+
305         | Partition table                  /dev/hda  |
306         | +------------------------------------------|
307         | | Partition 1                    /dev/hda1 |
308         | |                                          |
309         | |------------------------------------------|
310         | | Partition 2                    /dev/hda2 |
311         | |                                          |
312         | |------------------------------------------|
313         | | Extended partition             /dev/hda3 |
314         | | +----------------------------------------|
315         | | | Extended partition table               |
316         | | |----------------------------------------|
317         | | | Partition 3                  /dev/hda5 |
318         | | |                                        |
319         | | |----------------------------------------|
320         | | | Extended partition table               |
321         | | |----------------------------------------|
322         | | | Partition 4                  /dev/hda6 |
323         | | |                                        |
324         +--------------------------------------------+
325
326 This hard disk has two primary partitions and an extended partition that 
327 contains two logical partitions. They are accessed as /dev/hda5 ...
328
329 Note that the partition tables of logical partitions are not accessible as 
330 the first blocks of some devices, while the main partition table, all boot 
331 sectors and the partition tables of extended partitions are.
332
333 Partition tables are stored in partition boot sectors. Normally, only the 
334 partition boot sector of the entire disk is used as a boot sector. It is 
335 also frequently called the master boot record (MBR). Its structure is as 
336 follows:
337
338                     +------------------------+
339               0x000 |                        |
340                     |      Program code      |
341                     |                        |
342                     |                        |
343                     |------------------------|
344               0x1BE |    Partition table     |
345                     |                        |
346                     |------------------------|
347               0x1FE | Magic number (0xAA55)  |
348                     +------------------------+
349
350 The LILO boot sector is designed to be usable as a partition boot sector. 
351 (I.e. there is room for the partition table.) Therefore, the LILO boot 
352 sector can be stored at the following locations:
353
354   - boot sector of a Linux floppy disk. (/dev/fd0, ...) 
355   - MBR of the first hard disk. (/dev/hda, /dev/sda, ...) 
356   - boot sector of a primary Linux file system partition on the first hard 
357     disk. (/dev/hda1, ...) 
358   - partition boot sector of an extended partition on the first hard disk. 
359     (/dev/hda1, ...)* 
360
361   *  Most FDISK-type programs don't believe in booting from an extended 
362     partition and refuse to activate it. LILO is accompanied by a simple 
363     program (activate) that doesn't have this restriction. Linux fdisk also 
364     supports activating extended partitions.
365
366 It _can't_ be stored at any of the following locations:
367
368   - boot sector of a non-Linux floppy disk or primary partition. 
369   - a Linux swap partition. 
370   - boot sector of a logical partition in an extended partition.* 
371   - on the second hard disk. (Unless for backup installations, if the 
372     current first disk will be removed or disabled, or if some other boot 
373     loader is used, that is capable of loading boot sectors from other 
374     drives.) 
375
376   *  LILO can be forced to put the boot sector on such a partition by using 
377     the  -b  option or the BOOT variable. However, only few programs that 
378     operate as master boot records support booting from a logical 
379     partition.
380
381 Although LILO tries to detect attempts to put its boot sector at an invalid 
382 location, you should not rely on that.
383
384
385 Booting basics
386 --------------
387
388 When booting from a floppy disk, the first sector of the disk, the 
389 so-called boot sector, is loaded. That boot sector contains a small program 
390 that loads the respective operating system. MS-DOS boot sectors also 
391 contain a data area, where disk and file system parameters (cluster size, 
392 number of sectors, number of heads, etc.) are stored.
393
394 When booting from a hard disk, the very first sector of that disk, the 
395 so-called master boot record (MBR) is loaded. This sector contains a loader 
396 program and the partition table of the disk. The loader program usually 
397 loads the boot sector, as if the system was booting from a floppy.
398
399 Note that there is no functional difference between the MBR and the boot 
400 sector other than that the MBR contains the partition information but 
401 doesn't contain any file system-specific information (e.g. MS-DOS disk 
402 parameters).
403
404 The first 446 (0x1BE) bytes of the MBR are used by the loader program. They 
405 are followed by the partition table, with a length of 64 (0x40) bytes. The 
406 last two bytes contain a magic number that is sometimes used to verify that 
407 a given sector really is a boot sector.
408
409 There is a large number of possible boot configurations. The most common 
410 ones are described in the following sections.
411
412
413 MS-DOS alone
414 - - - - - -
415
416         +-------------------------------------------------------+
417         | Master Boot Record    Boot sector    Operating system |
418         |-------------------------------------------------------|
419         | DOS-MBR ------------> MS-DOS ------> COMMAND.COM      |
420         +-------------------------------------------------------+
421
422 This is what usually happens when MS-DOS boots from a hard disk: the 
423 DOS-MBR determines the active partition and loads the MS-DOS boot sector. 
424 This boot sector loads MS-DOS and finally passes control to COMMAND.COM. 
425 (This is greatly simplified.)
426
427
428 LOADLIN
429 - - - -
430
431     +------------------------------------------------------------+
432     | Master Boot Record    Boot sector    Operating system      |
433     |------------------------------------------------------------|
434     | DOS-MBR ------------> MS-DOS ------> COMMAND.COM           |
435     |                                 ---> LOADLIN ------> Linux |
436     +------------------------------------------------------------+
437
438 A typical LOADLIN setup: everything happens like when booting MS-DOS, but 
439 in CONFIG.SYS or AUTOEXEC.BAT, LOADLIN is invoked. Typically, a program 
440 like BOOT.SYS is used to choose among configuration sections in CONFIG.SYS 
441 and AUTOEXEC.BAT. This approach has the pleasant property that no boot 
442 sectors have to be altered.
443
444 Please refer to the documentation accompanying the LOADLIN package for 
445 installation instructions and further details.
446
447
448 LILO started by DOS-MBR
449 - - - - - - - - - - - -
450
451         +-------------------------------------------------------+
452         | Master Boot Record    Boot sector    Operating system |
453         |-------------------------------------------------------|
454         | DOS-MBR ------------> LILO --------> Linux            |
455         |                  ---> other OS                        |
456         +-------------------------------------------------------+
457
458 This is a "safe" LILO setup: LILO is booted by the DOS-MBR. No other boot 
459 sectors have to be touched. If the other OS (or one of them, if there are 
460 several other operating systems being used) should be booted without using 
461 LILO, the other partition has to be marked "active" with fdisk or activate.
462
463 Installation: 
464
465   - install LILO with its boot sector on the Linux partition. 
466   - use fdisk or activate to make that partition active. 
467   - reboot. 
468
469 Deinstallation: 
470
471   - make a different partition active. 
472   - install whatever should replace LILO and/or Linux. 
473
474
475 Several alternate branches
476 - - - - - - - - - - - - -
477
478     +------------------------------------------------------------+
479     | Master Boot Record    Boot sector    Operating system      |
480     |------------------------------------------------------------|
481     | DOS-MBR ------------> MS-DOS ------> COMMAND.COM           |
482     |                                 ---> LOADLIN ------> Linux |
483     |                  ---> LILO --------> Linux                 |
484     |                                 ---> MS-DOS --- ...        |
485     +------------------------------------------------------------+
486
487 An extended form of the above setup: the MBR is not changed and both 
488 branches can either boot Linux or MS-DOS. (LILO could also boot other 
489 operating systems.)
490
491
492 LILO started by BOOTACTV*
493 - - - - - - - - - - - - -
494
495   *  Other, possibly better known boot switchers, e.g. OS/2 BootManager 
496     operate in a similar way. The installation procedures typically vary.
497
498         +-------------------------------------------------------+
499         | Master Boot Record    Boot sector    Operating system |
500         |-------------------------------------------------------|
501         | BOOTACTV -----------> LILO --------> Linux            |
502         |                  ---> other OS                        |
503         +-------------------------------------------------------+
504
505 Here, the MBR is replaced by BOOTACTV (or any other interactive boot 
506 partition selector) and the choice between Linux and the other operating 
507 system(s) can be made at boot time. This approach should be used if LILO 
508 fails to boot the other operating system(s).*
509
510   *  And the author would like to be notified if booting the other 
511     operating system(s) doesn't work with LILO, but if it works with an 
512     other boot partition selector.
513
514 Installation: 
515
516   - boot Linux. 
517   - make a backup copy of your MBR on a floppy disk, e.g.
518      dd if=/dev/hda of=/fd/MBR bs=512 count=1 
519   - install LILO with the boot sector on the Linux partition. 
520   - install BOOTACTV as the MBR, e.g.
521      dd if=bootactv.bin of=/dev/hda bs=446 count=1 
522   - reboot. 
523
524 Deinstallation: 
525
526   - boot Linux. 
527   - restore the old MBR, e.g.
528      dd if=/MBR of=/dev/hda bs=446 count=1
529      or FDISK /MBR under MS-DOS. 
530
531 If replacing the MBR appears undesirable and if a second Linux partition 
532 exists (e.g. /usr, _not_ a swap partition), BOOTACTV can be merged with the 
533 partition table and stored as the "boot sector" of that partition. Then, 
534 the partition can be marked active to be booted by the DOS-MBR.
535
536 Example:
537
538 # dd if=/dev/hda of=/dev/hda3 bs=512 count=1
539 # dd if=bootactv.bin of=/dev/hda3 bs=446 count=1
540
541 _WARNING:_ Whenever the disk is re-partitioned, the merged boot sector on 
542 that "spare" Linux partition has to be updated too.
543
544
545 LILO alone
546 - - - - -
547
548             +----------------------------------------+
549             | Master Boot Record    Operating system |
550             |----------------------------------------|
551             | LILO ---------------> Linux            |
552             |                  ---> other OS         |
553             +----------------------------------------+
554
555 LILO can also take over the entire boot procedure. If installed as the MBR, 
556 LILO is responsible for either booting Linux or any other OS. This approach 
557 has the disadvantage, that the old MBR is overwritten and has to be 
558 restored (either from a backup copy, with FDISK /MBR on recent versions of 
559 MS-DOS or by overwriting it with something like BOOTACTV) if Linux should 
560 ever be removed from the system.
561
562 You should verify that LILO is able to boot your other operating system(s) 
563 before relying on this method.
564
565 Installation: 
566
567   - boot Linux. 
568   - make a backup copy of your MBR on a floppy disk, e.g.
569      dd if=/dev/hda of=/fd/MBR bs=512 count=1 
570   - install LILO with its boot sector as the MBR. 
571   - reboot. 
572
573 Deinstallation: 
574
575   - boot Linux. 
576   - restore the old MBR, e.g.
577      dd if=/fd/MBR of=/dev/hda bs=446 count=1 
578
579 If you've installed LILO as the master boot record, you have to explicitly 
580 specify the boot sector (configuration variable BOOT=...) when updating the 
581 map. Otherwise, it will try to use the boot sector of your current root 
582 partition, which will usually work, but it will probably leave your system 
583 unbootable.
584
585
586 Names
587 - - -
588
589 The following names have been used to describe boot sectors or parts of 
590 operating systems:
591
592   "DOS-MBR"  is the original MS-DOS MBR. It scans the partition table for a 
593     partition that is marked "active" and loads the boot sector of that 
594     partition. Programs like MS-DOS' FDISK, Linux fdisk or activate 
595     (accompanies LILO) can change the active marker in the partition table. 
596   "MS-DOS"  denotes the MS-DOS boot sector that loads the other parts of 
597     the system (IO.SYS, etc.). 
598   "COMMAND.COM"  is the standard command interpreter of MS-DOS. 
599   "LOADLIN"  is a program that loads a Linux kernel image from an MS-DOS 
600     partition into memory and executes it. It is usually invoked from 
601     CONFIG.SYS and is used in combination with a CONFIG.SYS configuration 
602     switcher, like BOOT.SYS.* 
603   "LILO"  can either load a Linux kernel or the boot sector of any other 
604     operating system. It has a first stage boot sector that loads the 
605     remaining parts of LILO from various locations.** 
606   "BOOTACTV"  permits interactive selection of the partition from which the 
607     boot sector should be read. If no key is pressed within a given 
608     interval, the partition marked active is booted. BOOTACTV is included 
609     in the pfdisk package. There are also several similar programs, like 
610     PBOOT and OS-BS.*** 
611
612   *  LOADLIN is available for anonymous FTP from
613      ftp://tsx-11.mit.edu/pub/linux/dos_utils/lodlin<n>.tar.gz
614      ftp://sunsite.unc.edu/pub/Linux/system/boot/dualboot/lodlin<n>.tgz
615      BOOT.SYS is available for anonymous FTP from
616      ftp://ftp.funet.fi/pub/Linux/tools/boot142.zip
617
618   **  LILO can be found in
619      ftp://tsx-11.mit.edu/pub/linux/packages/lilo/lilo-<n>.tar.gz
620      ftp://sunsite.unc.edu/pub/Linux/system/boot/lilo/lilo-<n>.tar.gz
621      ftp://lrcftp.epfl.ch/pub/linux/local/lilo/lilo-<n>.tar.gz
622
623   ***  pfdisk is available for anonymous FTP from
624      ftp://sunsite.unc.edu/pub/Linux/utils/disk-management/pfdisk.tar.Z or
625      ftp://ftp.funet.fi/pub/Linux/tools/pfdisk.tar.Z
626      PBOOT can be found in
627      ftp://ftp.funet.fi/pub/Linux/tools/pboot.zip
628
629
630 Choosing the "right" boot concept
631 -----------------------------------
632
633 Although LILO can be installed in many different ways, the choice is 
634 usually limited by the present setup and therefore, typically only a small 
635 number of configurations which fit naturally into an existing system 
636 remains. The following sections describe various possible cases. See also 
637 section "BIOS restrictions".
638
639 The configuration file /etc/lilo.conf for the examples could look like 
640 this:
641
642 boot = /dev/hda2
643 compact
644 image = /vmlinuz
645 image = /vmlinuz.old
646 other = /dev/hda1
647   table = /dev/hda
648   label = msdos
649
650 It installs a Linux kernel image (/vmlinuz), an alternate Linux kernel 
651 image (/vmlinuz.old) and a chain loader to boot MS-DOS from /dev/hda1. The 
652 option COMPACT on the second line instructs the map installer to optimize 
653 loading.
654
655 In all examples, the names of the IDE-type hard disk devices (/dev/hda...) 
656 are used. Everything applies to other disk types (e.g. SCSI disks; 
657 /dev/sda...) too.
658
659
660 BIOS restrictions
661 - - - - - - - - -
662
663 Nowadays, an increasing number of systems is equipped with comparably large 
664 disks or even with multiple disks. At the time the disk interface of the 
665 standard PC BIOS has been designed (about 16 years ago), such 
666 configurations were apparently considered to be too unlikely to be worth 
667 supporting.
668
669 The most common BIOS restrictions that affect LILO are the limitation to 
670 two hard disks and the inability to access more than 1024 cylinders per 
671 disk. LILO can detect both conditions, but in order to work around the 
672 underlying problems, manual intervention is necessary.
673
674 The drive limit does not exist in every BIOS. Some modern motherboards and 
675 disk controllers are equipped with a BIOS that supports more (typically 
676 four) disk drives. When attempting to access the third, fourth, etc. drive, 
677 LILO prints a warning message but continues. Unless the BIOS really 
678 supports more than two drives, the system will _not_ be able to boot in 
679 that case.*
680
681   *  However, if only "unimportant" parts of the system are located on the 
682     "high" drives, some functionality may be available.
683
684 The cylinder limit is a very common problem with IDE disks. There, the 
685 number of cylinders may already exceed 1024 if the drive has a capacity of 
686 more than 504 MB. Many SCSI driver BIOSes present the disk geometry in a 
687 way that makes the limit occur near 1 GB. Modern disk controllers may even 
688 push the limit up to about 8 GB. All cylinders beyond the 1024th are 
689 inaccessible for the BIOS. LILO detects this problem and aborts the 
690 installation (unless the LINEAR option is used, see section "Global 
691 options").
692
693 Note that large partitions that only partially extend into the "forbidden 
694 zone" are still in jeopardy even if they appear to work at first, because 
695 the file system does not know about the restrictions and may allocate disk 
696 space from the area beyond the 1024th cylinder when installing new kernels. 
697 LILO therefore prints a warning message but continues as long as no 
698 imminent danger exists.
699
700 There are four approaches of how such problems can be solved: 
701
702   - use of a different partition which is on an accessible disk and which 
703     does not exceed the 1024 cylinder limit. If there is only a DOS 
704     partition which fulfills all the criteria, that partition can be used 
705     to store the relevant files. (See section "/boot on a DOS partition".) 
706   - rearranging partitions and disks. This is typically a destructive 
707     operation, so extra care should be taken to make good backups. 
708   - if the system is running DOS or Windows 95, LOADLIN can be used instead 
709     of LILO. 
710   - if all else fails, installation of a more capable BIOS, a different 
711     controller or a different disk configuration. 
712
713 LILO depends on the BIOS to load the following items: 
714
715   - /boot/map (created when running /sbin/lilo) 
716   - all kernels 
717   - the boot sectors of all other operating systems it boots 
718   - the startup message, if one has been defined 
719
720 Normally, this implies that the Linux root file system should be in the 
721 "safe" area. However, it is already sufficient to put all kernels into 
722 /boot and to either mount a "good" partition on /boot or to let /boot be a 
723 symbolic link pointing to or into such a partition.
724
725 See also /usr/src/linux/Documentation/ide.txt (or 
726 /usr/src/linux/drivers/block/README.ide in older kernels) for a detailed 
727 description of problems with large disks.
728
729
730 One disk, Linux on a primary partition
731 - - - - - - - - - - - - - - - - - - -
732
733 If at least one primary partition of the first hard disk is used as a Linux 
734 file system (/, /usr, etc. but _not_ as a swap partition), the LILO boot 
735 sector should be stored on that partition and it should be booted by the 
736 original master boot record or by a program like BOOTACTV.
737
738             +--------------------------+
739             | MBR            /dev/hda  |
740             | +------------------------|
741             | | MS-DOS       /dev/hda1 |
742             | |------------------------|
743         --> | | Linux /      /dev/hda2 |
744             +--------------------------+
745
746 In this example, the BOOT variable could be omitted, because the boot 
747 sector is on the root partition.
748
749
750 One disk, Linux on a logical partition
751 - - - - - - - - - - - - - - - - - - -
752
753 If no primary partition is available for Linux, but at least one logical 
754 partition of an extended partition on the first hard disk contains a Linux 
755 file system, the LILO boot sector should be stored in the partition sector 
756 of the extended partition and it should be booted by the original master 
757 boot record or by a program like BOOTACTV.
758
759             +--------------------------+
760             | MBR            /dev/hda  |
761             | +------------------------|
762             | | MS-DOS       /dev/hda1 |
763             | |------------------------|
764         --> | | Extended     /dev/hda2 |
765             | | +----------------------|
766             | | | Linux      /dev/hda5 |
767             | | |----------------------|
768             | | | ...        /dev/hda6 |
769             +--------------------------+
770
771 Because many disk partitioning programs refuse to make an extended 
772 partition (in our example /dev/hda2) active, you might have to use 
773 activate, which comes with the LILO distribution.
774
775 OS/2 BootManager should be able to boot LILO boot sectors from logical 
776 partitions. The installation on the extended partition itself is not 
777 necessary in this case.
778
779
780 Two disks, Linux (at least partially) on the first disk
781 - - - - - - - - - - - - - - - - - - - - - - - - - - - -
782
783 This case is equivalent to the configurations where only one disk is in the 
784 system. The Linux boot sector resides on the first hard disk and the second 
785 disk is used later in the boot process.
786
787 Only the location of the boot sector matters - everything else (/boot/map,
788 the root file system, a swap partition, other Linux file systems, etc.)
789 can be located anywhere on the second disk, provided that the constraints 
790 described in section "BIOS restrictions" are met.
791
792
793 Two disks, Linux on second disk, first disk has an extended partition
794 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
795
796 If there is no Linux partition on the first disk, but there is an extended 
797 partition, the LILO boot sector can be stored in the partition sector of 
798 the extended partition and it should be booted by the original master boot 
799 record or by a program like BOOTACTV.
800
801                  FIRST DISK                     SECOND DISK
802         +--------------------------+    +--------------------------+
803         | MBR            /dev/hda  |    | MBR            /dev/hdb  |
804         | +------------------------|    | +------------------------|
805         | | MS-DOS       /dev/hda1 |    | | Linux        /dev/hdb1 |
806         | |------------------------|    | |------------------------|
807     --> | | Extended     /dev/hda2 |    | | ...          /dev/hdb2 |
808         | | +----------------------|    | |                        |
809         | | | ...        /dev/hda5 |    | |                        |
810         | | |----------------------|    | |                        |
811         | | | ...        /dev/hda6 |    | |                        |
812         +--------------------------+    +--------------------------+
813
814 The program activate, that accompanies LILO, may have to be used to set the 
815 active marker on an extended partition, because MS-DOS' FDISK and some 
816 older version of Linux fdisk refuse to do that. (Which is generally a good 
817 idea.)
818
819
820 Two disks, Linux on second disk, first disk has no extended partition
821 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
822
823 If there is neither a Linux partition nor an extended partition on the 
824 first disk, then there's only one place left, where a LILO boot sector 
825 could be stored: the master boot record.
826
827 In this configuration, LILO is responsible for booting all other operating 
828 systems too.
829
830                  FIRST DISK                     SECOND DISK
831         +--------------------------+    +--------------------------+
832     --> | MBR            /dev/hda  |    | MBR            /dev/hdb  |
833         | +------------------------|    | +------------------------|
834         | | MS-DOS       /dev/hda1 |    | | Linux        /dev/hdb1 |
835         | |------------------------|    | |------------------------|
836         | | ...          /dev/hda2 |    | | ...          /dev/hdb2 |
837         +--------------------------+    +--------------------------+
838
839 You should back up your old MBR before installing LILO and verify that LILO 
840 is able to boot your other operating system(s) before relying on this 
841 approach.
842
843 The line boot = /dev/hda2 in /etc/lilo.conf would have to be changed to 
844 boot = /dev/hda in this example.
845
846
847 More than two disks
848 - - - - - - - - - -
849
850 On systems with more than two disks, typically only the first two can be 
851 accessed. The configuration choices are therefore the same as with two 
852 disks.
853
854 When attempting to access one of the extra disks, LILO displays a warning 
855 message ( Warning: BIOS drive 0x<number> may not be accessible ) but does 
856 not abort. This is done in order to allow the lucky few whose BIOS (or 
857 controller-BIOS) does support more than two drives to make use of this 
858 feature. By all others, this warning should be considered a fatal error.
859
860 Note that the two disks restriction is only imposed by the BIOS. Linux 
861 normally has no problems using all disks once it is booted.
862
863
864 /boot on a DOS partition
865 - - - - - - - - - - - -
866
867 Recent kernels support all the functions LILO needs to map files also on 
868 MS-DOS (or UMSDOS) file systems. Since DOS partitions tend to occupy 
869 exactly the places where BIOS restrictions (see section "BIOS 
870 restrictions") are invisible, they're an ideal location for /boot if the 
871 native Linux file systems can't be used because of BIOS problems.
872
873 In order to accomplish this, the DOS partition is mounted read-write, a 
874 directory (e.g. /dos/linux) is created, all files from /boot are moved to 
875 that directory, /boot is replaced by a symbolic link to it, the kernels are 
876 also moved to the new directory, their new location is recorded in 
877 /etc/lilo.conf, and finally /sbin/lilo is run.
878
879 From then on, new kernels must always be copied into that directory on the 
880 DOS partition before running /sbin/lilo, e.g. when recompiling a kernel, 
881 the standard procedure changes from
882
883 # make zlilo
884
885 to
886
887 # make zImage
888 # mv /dos/linux/vmlinuz /dos/linux/vmlinuz.old
889 # mv arch/i386/boot/zImage /dos/linux/vmlinuz
890 # /sbin/lilo
891
892 _WARNING:_ De-fragmenting such a DOS partition is likely to make Linux or 
893 even the whole system unbootable. Therefore, the DOS partition should 
894 either not be de-fragmented, or a Linux boot disk should be prepared (and 
895 tested) to bring up Linux and to run /sbin/lilo after the 
896 de-fragmentation.*
897
898   *  Setting the "system" attribute from DOS on the critical files (e.g. 
899     everything in C:\LINUX) may help to protect them from being rearranged. 
900     However, the boot floppy should still be ready, just in case.
901
902
903 The boot prompt
904 ===============
905
906 Immediately after it's loaded, LILO checks whether one of the following is 
907 happening:
908
909   - any of the [Shift], [Control] or [Alt] keys is pressed. 
910   - [CapsLock] or [ScrollLock] is set. 
911
912 If this is the case, LILO displays the boot: prompt and waits for the name 
913 of a boot image (i.e. Linux kernel or other operating system). Otherwise, 
914 it boots the default boot image* or - if a delay has been specified - waits 
915 for one of the listed activities until that amount of time has passed.
916
917   *  The default boot image is either the first boot image, the image 
918     specified with the DEFAULT variable, or the image that has been 
919     selected at the boot prompt.
920
921 At the boot prompt, the name of the image to boot can be entered. Typing 
922 errors can be corrected with [BackSpace], [Delete], [Ctrl U] and [Ctrl X]. 
923 A list of known images can be obtained by pressing [?] or [Tab].
924
925 If [Enter] is pressed and no file name has been entered, the default image 
926 is booted.
927
928
929 Boot command-line options
930 -------------------------
931
932 LILO is also able to pass command-line options to the kernel. Command-line 
933 options are words that follow the name of the boot image and that are 
934 separated by spaces.
935
936 Example:
937
938 boot: linux single root=200
939
940 This document only gives an overview of boot options. Please consult Paul 
941 Gortmaker's BootPrompt-HOWTO for a more complete and more up to date list. 
942 You can get it from 
943 ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/BootPrompt-HOWTO.gz or from one 
944 of the many mirror sites.
945
946
947 Standard options
948 - - - - - - - -
949
950 Recent kernels recognize a large number of options, among them are  debug ,  
951 no387 ,  no-hlt ,  ramdisk=<size> ,  reserve=<base>,<size>,... ,  
952 root=<device> ,  ro , and  rw . All current init programs also recognize 
953 the option  single . The options  lock  and  vga  are processed by the boot 
954 loader itself. Boot command-line options are always case-sensitive.
955
956  single  boots the system in single-user mode. This bypasses most system 
957 initialization procedures and directly starts a root shell on the console. 
958 Multi-user mode can typically be entered by exiting the single-user shell 
959 or by rebooting.
960
961  root=<device>  changes the root device. This overrides settings that may 
962 have been made in the boot image and on the LILO command line. <device> is 
963 either the hexadecimal device number or the full path name of the device, 
964 e.g. /dev/hda3.*
965
966   *  The device names are hard-coded in the kernel. Therefore, only the 
967     "standard" names are supported and some less common devices may not be 
968     recognized. In those cases, only numbers can be used.
969
970  reserve=<base>,<size>,...  reserves IO port regions. This can be used to 
971 prevent device drivers from auto-probing addresses where other devices are 
972 located, which get confused by the probing.
973
974  ro  instructs the kernel to mount the root file system read-only.  rw  
975 mounts it read-write. If neither  ro  nor  rw  is specified, the setting 
976 from the boot image is used.
977
978  no-hlt  avoids executing a  HLT  instructions whenever the system is idle.  
979 HLT  normally significantly reduces power consumption and therefore also 
980 heat dissipation of the CPU, but may not work properly with some clone 
981 CPUs.  no387  disables using the hardware FPU even if one is present.
982
983  debug  enables more verbose console logging.
984
985 Recent kernels also accept the options  init=<name>  and  noinitrd .  init  
986 specifies the name of the init program to execute. Therefore, if single 
987 mode cannot be entered because init is mis-configured, one may still be 
988 able to reach a shell using init=/bin/sh.  noinitrd  disables automatic 
989 loading of the initial RAM disk. Instead, its content is then available on 
990 /dev/initrd.
991
992  vga=<mode>  alters the VGA mode set at startup. The values  normal ,  
993 extended ,  ask  or a decimal number are recognized. (See also "Booting 
994 kernel images from a file".)
995
996  kbd=<code>,...  preloads a sequence of keystrokes in the BIOS keyboard 
997 buffer. The keystrokes have to be entered as 16 bit hexadecimal numbers, 
998 with the upper byte containing the scan code and the lower byte containing 
999 the ASCII code. Note that most programs only use the ASCII code, so the 
1000 scan code can frequently be omitted. Scan code tables can be found in many 
1001 books on PC hardware. Note that scan codes depend on the keyboard layout.
1002
1003 Finally,  lock  stores the current command-line as the default 
1004 command-line, so that LILO boots the same image with the same options 
1005 (including  lock ) when invoked the next time.
1006
1007
1008 Device-specific options
1009 - - - - - - - - - - - -
1010
1011 There is also a plethora of options to specify certain characteristics 
1012 (e.g. IO and memory addresses) of devices. Some common ones are  ether ,  
1013 floppy ,  hd ,  bmouse , and  sound . The usage of these options is  
1014 <option>=<number>,... . Please consult the corresponding FAQs and HOWTOs 
1015 for details. For an overview of all available options, consult the file 
1016 init/main.c in the kernel source tree.
1017
1018
1019 Other options
1020 - - - - - - -
1021
1022 Options of the type  <variable>=<value>  which are neither standard options 
1023 nor device-specific options, cause the respective variables to be set in 
1024 the environment passed to init. The case of the variable name is preserved, 
1025 i.e. it isn't automatically converted to upper case.
1026
1027 Note that environment variables passed to init are typically available in 
1028 system initialization scripts (e.g. /etc/rc.local), but they're not visible 
1029 from ordinary login sessions, because the login program removes them from 
1030 the user's environment.
1031
1032
1033 Repeating options
1034 - - - - - - - - -
1035
1036 The effect of repeating boot command-line options depends on the options.* 
1037 There are three possible behaviours:
1038
1039   *  Options are frequently repeated when a string defined with APPEND or 
1040     LITERAL is prepended to the parameters typed in by the user. Also, LILO 
1041     implicitly prepends the options  ramdisk ,  ro ,  root , or  rw  when 
1042     RAMDISK, READ-ONLY, READ-WRITE, or ROOT, respectively, are set in the 
1043     configuration file. ( lock  and  vga  are handled by a different 
1044     internal mechanism.)
1045
1046 Options that only enable or disable a certain functionality can be repeated 
1047 any number of times.  debug ,  lock ,  no-hlt , and  no387  fall into this 
1048 category.
1049
1050 Other options change a global setting whenever they appear, so only the 
1051 value or presence of the last option matters. The antagonists  ro  and  rw  
1052 are such options. Also,  ramdisk ,  root , and  vga  work this way. 
1053 Example:  ro rw  would mount the root file system read-write.
1054
1055 Finally, when  reserve  and many device-specific options are repeated, each 
1056 occurrence has its own meaning, e.g.  hd=... hd=...  would configure two 
1057 hard disks, and  reserve=0x300,8 reserve=0x5f0,16  would reserve the ranges 
1058 0x300 to 0x307 and 0x5f0 to 0x5ff (which is equivalent to writing  
1059 reserve=0x300,8,0x5f0,16 ).
1060
1061
1062 Implicit options
1063 - - - - - - - -
1064
1065 LILO always passes the string  BOOT_IMAGE=<name>  to the kernel, where 
1066 <name> is the name by which the kernel is identified (e.g. the label). This 
1067 variable can be used in /etc/rc to select a different behaviour, depending 
1068 on the kernel.
1069
1070 When booting automatically, i.e. without human intervention, the word  auto  
1071 is also passed on the command line. This can be used by init to suppress 
1072 interactive prompts in the boot phase.
1073
1074
1075 Boot image selection
1076 --------------------
1077
1078 The details of selecting the boot image are somewhat complicated. The 
1079 following tables illustrate them. First, if neither PROMPT is set nor a 
1080 shift key is being pressed:
1081
1082 Externally  Command   |  Auto-  Booted image             
1083  provided   line in   |  matic                           
1084 cmd. line* map file** | boot***                          
1085 ---------------------------------------------------------
1086     No         No     |   Yes   Default image            
1087    Yes         -      |   Yes   Specified by external    
1088                       |         command line             
1089     No        Yes     |   Yes   Specified by command line
1090                       |         in map file              
1091        
1092
1093   *  Externally provided command lines could be used to add front-ends to 
1094     LILO. They would pass the respective command string to LILO, which 
1095     would then interpret it like keyboard input. This feature is currently 
1096     not used.
1097
1098   **  This command line is set by invoking the map installer with the  -R  
1099     option, by using the boot command-line option  lock , or if a fallback 
1100     command line is set (with FALLBACK).
1101
1102   ***  I.e. the keyword  auto  is added.
1103
1104 If PROMPT is not set and a shift key is being pressed:
1105
1106  Input  Empty  Extern. Cmd.l. | Auto- Booted image         
1107 timeout cmd.l. cmd.l.  in map | matic                      
1108                         file  | boot                       
1109 -----------------------------------------------------------
1110   No      No      -      -    |  No   Specified by the user
1111   No     Yes      -      -    |  No   Default image        
1112   Yes    n/a      -      -    |  Yes  Default image        
1113
1114 Finally, if the configuration variable PROMPT is set:
1115
1116  Input  Empty  Extern. Cmd.l. | Auto- Booted image         
1117 timeout cmd.l. cmd.l.  in map | matic                      
1118                         file  | boot                       
1119 -----------------------------------------------------------
1120   No      No     No      No   |  No   Specified by the user
1121   No     Yes     No      No   |  No   Default image        
1122   Yes    n/a     No      No   |  Yes  Default image        
1123   n/a    n/a     Yes     -    |  Yes  Specified by external
1124                               |       command line         
1125   n/a    n/a     No     Yes   |  Yes  Specified by command 
1126                               |       line in map file     
1127
1128 Note that LILO pauses for the amount of time specified in DELAY when at the 
1129 end of a default command line. The automatic boot can then be interrupted 
1130 by pressing a modifier key ([Shift], [Ctrl], etc.).
1131
1132 The default image is the first image in the map file or the image specified 
1133 with the DEFAULT variable. However, after an unsuccessful boot attempt, the 
1134 respective image becomes the default image.
1135
1136
1137 Map installer
1138 =============
1139
1140 The map installer program /sbin/lilo updates the boot sector and creates 
1141 the map file. If the map installer detects an error, it terminates 
1142 immediately and does not touch the boot sector and the map file.
1143
1144 Whenever the map installer updates a boot sector, the original boot sector 
1145 is copied to /boot/boot.<number>, where <number> is the hexadecimal device 
1146 number. If such a file already exists, no backup copy is made. Similarly, a 
1147 file  /boot/part.<number>  is created if LILO modifies the partition table. 
1148 (See "General per-image options".)
1149
1150
1151 Command-line options
1152 --------------------
1153
1154 The LILO map installer can be invoked in the following ways:
1155
1156
1157 Show current installation
1158 - - - - - - - - - - - - -
1159
1160 The currently mapped files are listed. With  -v , also many parameters are 
1161 shown.
1162
1163   /sbin/lilo [ -C <config_file> ] -q [ -m <map_file> ] [ -v ... ]  
1164
1165    -C <config_file>    
1166      Specifies the configuration file that is used by the map installer 
1167     (see section "Configuration"). If  -C  is omitted, /etc/lilo.conf is 
1168     used. 
1169    -m <map_file>    
1170      Specifies an alternate map file. See also sections "Options 
1171     corresponding to configuration variables" and "Global options". 
1172    -q    
1173      Lists the currently mapped files. 
1174    -v ...    
1175      Increase verbosity. See also sections "Options corresponding to 
1176     configuration variables" and "Global options". 
1177
1178
1179 Create or update map
1180 - - - - - - - - - -
1181
1182 A new map is created for the images described in the configuration file 
1183 /etc/lilo.conf and they are registered in the boot sector.
1184
1185   /sbin/lilo [ -C <config_file> ] [ -b <boot_device> ] [ -c ] [ -l ] [ -i 
1186     <boot_sector> ] [ -f <disk_tab> ] [ -m <map_file> ] [ -d <delay> ] [ -v 
1187     ... ] [ -t ] [ -s <save_file> | -S <save_file> ] [ -P fix | -P ignore ] 
1188     [ -r <root_dir> ]  
1189
1190    -b <boot_device>    
1191      Specifies the boot device. See also sections "Options corresponding to 
1192     configuration variables" and "Global options". 
1193    -c    
1194      Enables map compaction. See also sections "Options corresponding to 
1195     configuration variables" and "Global options". 
1196    -C <config_file>    
1197      Specifies an alternate configuration file. See also section "Show 
1198     current installation". 
1199    -d <delay>    
1200      Sets the delay before LILO boots the default image. Note that the 
1201     delay is specified in _tenths_ of a second. See also sections "Options 
1202     corresponding to configuration variables" and "Global options". 
1203    -D <name>    
1204      Specifies the default image. See also sections "Options corresponding 
1205     to configuration variables" and "Global options". 
1206    -f <disk_tab>    
1207      Specifies a disk parameter table file. See also sections "Options 
1208     corresponding to configuration variables" and "Global options". 
1209    -i <boot_sector>    
1210      Specifies an alternate boot file. See also sections "Options 
1211     corresponding to configuration variables" and "Global options". 
1212    -L    
1213      Enables lba32 sector addresses. See also sections "Options 
1214     corresponding to configuration variables" and "Global options". 
1215    -l    
1216      Enables linear sector addresses. See also sections "Options 
1217     corresponding to configuration variables" and "Global options". 
1218    -m <map_file>    
1219      Specifies an alternate map file. See also sections "Options 
1220     corresponding to configuration variables" and "Global options". 
1221    -P <mode>    
1222      Specifies how invalid partition table entries should be handled. See 
1223     also sections "Options corresponding to configuration variables" and 
1224     "Global options". 
1225    -r <root_directory>    
1226      Chroots to the specified directory before doing anything else. This is 
1227     useful when running the map installer while the normal root file system 
1228     is mounted somewhere else, e.g. when recovering from an installation 
1229     failure with a recovery disk. The  -r  option is implied if the 
1230     environment variable  ROOT  is set.* The current directory is changed 
1231     to the new root directory, so using relative paths may not work. 
1232    -s <save_file>    
1233      Specifies an alternate boot sector save file. See also sections 
1234     "Options corresponding to configuration variables" and "Global 
1235     options". 
1236    -S <save_file>    
1237      Like  -s , but overwrites old save files. 
1238    -t    
1239      Test only. This performs the entire installation procedure except 
1240     replacing the map file, writing the modified boot sector and fixing 
1241     partition tables. This can be used in conjunction with the  -v  option 
1242     to verify that LILO will use sane values. 
1243    -v ...    
1244      Increase verbosity. See also sections "Options corresponding to 
1245     configuration variables" and "Global options". 
1246
1247   *  E.g. if your root partition is mounted on /mnt, you can update the map 
1248     by simply running  ROOT=/mnt /mnt/sbin/lilo 
1249
1250
1251 Change default command line
1252 - - - - - - - - - - - - - -
1253
1254 Changes LILO's default command line. See also section "Boot image 
1255 selection".
1256
1257   /sbin/lilo [ -C <config_file> ] [ -m <map_file> ] -R [ <word> ... ]  
1258
1259    -C <config_file>    
1260      Specifies an alternate configuration file. See also section "Show 
1261     current installation". 
1262    -m <map_file>    
1263      Specifies an alternate map file. See also sections "Options 
1264     corresponding to configuration variables" and "Global options". 
1265    -R <word ...>    
1266      Stores the specified words in the map file. The boot loader uses those 
1267     words as the default command line when booting the next time. That 
1268     command line is removed from the map file by the boot loader by 
1269     overwriting the sector immediately after reading it. The first word has 
1270     to be the name of a boot image. If  -R  is not followed by any words, 
1271     the current default command line in the map file is erased.* If the 
1272     command line isn't valid, the map installer issues an error message and 
1273     returns a non-zero exit code. 
1274
1275   *   -R  is typically used in reboot scripts, e.g.
1276      #!/bin/sh
1277      cd /
1278      /sbin/lilo -R "$*" && reboot
1279
1280
1281 Kernel name translation
1282 - - - - - - - - - - - -
1283
1284 Determines the path of the kernel.
1285
1286   /sbin/lilo [ -C <config_file> ] -I <name> [ <options> ]  
1287
1288    -C <config_file>    
1289      Specifies an alternate configuration file. See also section "Show 
1290     current installation". 
1291    -I <name> [ <options> ]    
1292      Translates the specified label name to the path of the corresponding 
1293     kernel image and prints that path on standard output. This can be used 
1294     to synchronize files that depend on the kernel (e.g. the ps database). 
1295     The image name can be obtained from the environment variable  
1296     BOOT_IMAGE . An error message is issued and a non-zero exit code is 
1297     returned if no matching label name can be found. The existence of the 
1298     image file is verified if the option character  v  is added. 
1299
1300
1301 De-installation
1302 - - - - - - - -
1303
1304 Restores the boot sector that was used before the installation of LILO. 
1305 Note that this option only works properly if LILO's directories (e.g. 
1306 /boot) have not been touched since the first installation. See also section 
1307 "LILO de-installation".
1308
1309   /sbin/lilo [ -C <config_file> ] [ -s <save_file> ] -u | -U [ 
1310     <boot_device> ]  
1311
1312    -C <config_file>    
1313      Specifies an alternate configuration file. See also section "Show 
1314     current installation". 
1315    -s <save_file>    
1316      Specifies an alternate boot sector save file. See also sections 
1317     "Options corresponding to configuration variables" and "Global 
1318     options". 
1319    -u [ <device_name> ]    
1320      Restores the backup copy of the specified boot sector. If no device is 
1321     specified, the value of the boot variable is used. If this one is also 
1322     unavailable, LILO uses the current root device. The name of the backup 
1323     copy is derived from the device name. The -s option or the backup 
1324     variable can be used to override this. LILO validates the backup copy 
1325     by checking a time stamp. 
1326    -U [ <device_name> ]    
1327      Like -u, but does not check the time stamp. 
1328
1329
1330 Print version number
1331 - - - - - - - - - -
1332
1333   /sbin/lilo -V  
1334
1335    -V    
1336      Print the version number and exit. 
1337
1338
1339 Options corresponding to configuration variables
1340 - - - - - - - - - - - - - - - - - - - - - - - -
1341
1342 There are also many command-line options that correspond to configuration 
1343 variables. See section "Global options" for a description.
1344
1345 Command-line option | Configuration variable    
1346 ------------------------------------------------
1347 -b <boot_device>    | boot=<boot_device>        
1348 -c                  | compact                   
1349 -d <tsecs>          | delay=<tsecs>             
1350 -D <name>           | default=<name>            
1351 -i <boot_sector>    | install=<boot_sector>     
1352 -L                  | lba32                     
1353 -l                  | linear                    
1354 -m <map_file>       | map=<map_file>            
1355 -P fix              | fix-table                 
1356 -P ignore           | ignore-table              
1357 -s <backup_file>    | backup=<backup_file>      
1358 -S <backup_file>    | force-backup=<backup_file>
1359 -v ...              | verbose=<level>           
1360
1361
1362 Configuration
1363 -------------
1364
1365 The configuration information is stored in the file /etc/lilo.conf and 
1366 consists of variable assignments.
1367
1368
1369 Syntax
1370 - - -
1371
1372 The following syntax rules apply:
1373
1374   - flag variables consist of a single word and are followed by whitespace 
1375     or the end of the file. 
1376   - string variables consist of the variable name, optional whitespace, an 
1377     equal sign, optional whitespace, the value and required whitespace, or 
1378     the end of the file. 
1379   - a non-empty sequence of blanks, tabs, newlines and comments counts as 
1380     whitespace. 
1381   - variable names are case-insensitive. Values are usually case-sensitive, 
1382     but there are a few exceptions. (See below.) 
1383   - tabs and newlines are special characters and may not be part of a 
1384     variable name or a value. The use of other control characters and 
1385     non-ASCII characters is discouraged. 
1386   - blanks and equal signs may only be part of a variable name or a value 
1387     if they are escaped by a backslash or if the value is embedded in 
1388     double quotes. An equal sign may not be the only character in a name or 
1389     value. 
1390   - an escaped tab is converted to an escaped blank. An escaped newline is 
1391     removed from the input stream. An escaped backslash (i.e. two 
1392     backslashes) is converted to a backslash. Inside quoted strings, only 
1393     double quotes, backslashes, dollar signs, and newlines can be escaped. 
1394   - quoted strings can be continued over several lines by ending each 
1395     incomplete line with a backslash. A single space is inserted in the 
1396     string for the line end and all spaces or tabs that follow immediately 
1397     on the next line. 
1398   - environment variables can be used by specifying them in the form 
1399     $<name> or ${<name>}. Dollar signs can be escaped. 
1400   - comments begin with a number sign and end with the next newline. All 
1401     characters (including backslashes) until the newline are ignored. 
1402
1403 Example:
1404
1405 boot = $FD
1406 install = menu 
1407 map = $MNT/map
1408 compact
1409 read-only
1410 append = "nfsroot=/home/linux-install/root \
1411   nfsaddrs=128.178.156.28:128.178.156.24::255.255.255.0:lrcinst"
1412 image = $MNT/zImage
1413
1414
1415 Global options
1416 - - - - - - -
1417
1418 /etc/lilo.conf begins with a possibly empty global options section. Many 
1419 global options can also be set from the command line, but storing permanent 
1420 options in the configuration file is more convenient.
1421
1422 The following global options are recognized:
1423
1424   BACKUP=<backup_file>  Copy the original boot sector to <backup_file> 
1425     (which may also be a device, e.g. /dev/null) instead of 
1426     /boot/boot.<number> 
1427   BOOT=<boot_device>  Sets the name of the device (e.g. a hard disk 
1428     partition) that contains the boot sector. If BOOT is omitted, the boot 
1429     sector is read from (and possibly written to) the device that is 
1430     currently mounted as root. 
1431   CHANGE-RULES  Defines partition type numbers. See section "Partition type 
1432     change rules" for details. 
1433   COMPACT  Tries to merge read requests for adjacent sectors into a single 
1434     read request. This drastically reduces load time and keeps the map 
1435     smaller. Using COMPACT is especially recommended when booting from a 
1436     floppy disk. COMPACT may conflict with LINEAR or LBA32, see section 
1437     "Other problems". 
1438   DEFAULT=<name>  Uses the specified image as the default boot image. If 
1439     DEFAULT is omitted, the image appearing first in the configuration file 
1440     is used. 
1441   DELAY=<tsecs>  Specifies the number of _tenths_ of a second LILO should 
1442     wait before booting the first image. This is useful on systems that 
1443     immediately boot from the hard disk after enabling the keyboard. LILO 
1444     doesn't wait if DELAY is omitted or if DELAY is set to zero. 
1445   DISK=<device_name>  Defines non-standard parameters for the specified 
1446     disk. See section "Disk geometry" for details. 
1447   FIX-TABLE  Allows LILO to adjust 3D addresses in partition tables. Each 
1448     partition entry contains a 3D (sector/head/cylinder) and a linear 
1449     32-bit address of the first and the last sector of the partition. If a 
1450     partition is not track-aligned and if certain other operating systems 
1451     (e.g. PC/MS-DOS or OS/2) are using the same disk, they may change the 
1452     3D address. LILO can store its boot sector only on partitions where 
1453     both address types correspond. LILO re-adjusts incorrect 3D start 
1454     addresses if FIX-TABLE is set.
1455
1456      _WARNING:_ This does not guarantee that other operating systems may 
1457     not attempt to reset the address later. It is also possible that this 
1458     change has other, unexpected side-effects. The correct fix is to 
1459     re-partition the drive with a program that does align partitions to 
1460     tracks. Also, with some disks (e.g. some large EIDE disks with address 
1461     translation enabled), under some circumstances, it may even be 
1462     unavoidable to have conflicting partition table entries. 
1463   FORCE-BACKUP=<backup_file>  Like BACKUP, but overwrite an old backup copy 
1464     if it exists. BACKUP=<backup_file> is ignored if FORCE-BACKUP appears 
1465     in the same configuration file. 
1466   IGNORE-TABLE  Tells LILO to ignore corrupt partition tables and to put 
1467     the boot sector even on partitions that appear to be unsuitable for 
1468     that. 
1469   INSTALL=<boot_sector>  Install the specified file as the new boot sector. 
1470     If INSTALL is omitted, install=text is used as the default. 
1471   KEYTABLE=<table_file>  Re-map the keyboard as specified in this file. See 
1472     section "Keyboard translation" for details. 
1473   LBA32  Generate 32-bit Logical Block Addresses instead of 
1474     sector/head/cylinder addresses. If the BIOS supports packet addressing, 
1475     then packet calls will be used to access the disk. This allows booting 
1476     from any partition on disks with more than 1024 cylinders. If the BIOS 
1477     does not support packet addressing, then LBA32 addresses are translated 
1478     to C:H:S, just as for LINEAR. All floppy disk references are retained 
1479     in C:H:S form. Use of LBA32 is recommended on all post-1998 systems. 
1480     LBA32 may conflict with COMPACT, see section "Other problems". 
1481   LINEAR  Generate linear sector addresses instead of sector/head/cylinder 
1482     addresses. Linear addresses are translated at run time and do not 
1483     depend on disk geometry. Note that boot disks may not be portable if 
1484     LINEAR is used, because the BIOS service to determine the disk geometry 
1485     does not work reliably for floppy disks. When using LINEAR with large 
1486     disks, /sbin/lilo may generate references to inaccessible disk areas 
1487     (see section "BIOS restrictions"), because 3D sector addresses are not 
1488     known before boot time. LINEAR may conflict with COMPACT, see section 
1489     "Other problems". 
1490   MAP=<map_file>  Specifies the location of the map file. If MAP is 
1491     omitted, a file /boot/map is used. 
1492   MESSAGE=<message_file>  Specifies a file containing a message that is 
1493     displayed before the boot prompt. No message is displayed while waiting 
1494     for a modifier key ([Shift], etc.) after printing "LILO ". In the 
1495     message, the  FF  character ([Ctrl L]) clears the local screen. The 
1496     size of the message file is limited to 65535 bytes. The map file has to 
1497     be rebuilt if the message file is changed or moved. 
1498   NOWARN  Disables warnings about possible future dangers. 
1499   PROMPT  Forces entering the boot prompt without expecting any prior 
1500     key-presses. Unattended reboots are impossible if PROMPT is set and 
1501     TIMEOUT isn't. 
1502   SERIAL=<parameters>  Enables control from a serial line. The specified 
1503     serial port is initialized and LILO is accepting input from it and from 
1504     the PC's keyboard. Sending a break on the serial line corresponds to 
1505     pressing a shift key on the console in order to get LILO's attention. 
1506     All boot images should be password-protected if the serial access is 
1507     less secure than access to the console, e.g. if the line is connected 
1508     to a modem. The parameter string has the following syntax:
1509       <port>,<bps><parity><bits> 
1510      The components <bps>, <parity> and <bits> can be omitted. If a 
1511     component is omitted, all following components have to be omitted too. 
1512     Additionally, the comma has to be omitted if only the port number is 
1513     specified. 
1514
1515       <port>  the number of the serial port, zero-based. 0 corresponds to 
1516         COM1 alias /dev/ttyS0, etc. All four ports can be used (if 
1517         present). 
1518       <bps>  the baud rate of the serial port. The following baud rates are 
1519         supported: 110, 300, 1200, 2400, 4800, 9600, 19200, and 38400 bps. 
1520         Default is 2400 bps. 
1521       <parity>  the parity used on the serial line. LILO ignores input 
1522         parity and strips the 8th bit. The following (upper or lower case) 
1523         characters are used to describe the parity:  n  for no parity,  e  
1524         for even parity and  o  for odd parity. 
1525       <bits>  the number of bits in a character. Only 7 and 8 bits are 
1526         supported. Default is 8 if parity is "none", 7 if parity is "even" 
1527         or "odd". 
1528
1529     If SERIAL is set, the value of DELAY is automatically raised to 20.
1530
1531      Example: serial=0,2400n8 initializes COM1 with the default parameters. 
1532   TIMEOUT=<tsecs>  Sets a timeout (in tenths of a second) for keyboard 
1533     input. If no key is pressed for the specified time, the first image is 
1534     automatically booted. Similarly, password input is aborted if the user 
1535     is idle for too long. The default timeout is infinite. 
1536   VERBOSE=<level>  Turns on lots of progress reporting. Higher numbers give 
1537     more verbose output. If  -v  is additionally specified on the command 
1538     line, <level> is increased accordingly. The following verbosity levels 
1539     exist: 
1540
1541       <0  only warnings and errors are shown 
1542       0  prints one line for each added or skipped image 
1543       1  mentions names of important files and devices and why they are 
1544         accessed. Also displays informational messages for exceptional but 
1545         harmless conditions and prints the version number. 
1546       2  displays statistics and processing of temporary files and devices 
1547       3  displays disk geometry information and partition table change 
1548         rules 
1549       4  lists sector mappings as they are written into the map file (i.e. 
1550         after compaction, in a format suitable to pass it to the BIOS) 
1551       5  lists the mapping of each sector (i.e. before compaction, raw) 
1552
1553     When using the  -q  option, the levels have a slightly different 
1554     meaning: 
1555
1556       0  displays only image names 
1557       1  also displays all global and per-image settings 
1558       2  displays the address of the first map sector 
1559
1560 Additionally, the kernel configuration parameters APPEND, INITRD, RAMDISK, 
1561 READ-ONLY, READ-WRITE, ROOT and VGA, and the general per-image options 
1562 FALLBACK, LOCK, OPTIONAL, PASSWORD, RESTRICTED, and SINGLE-KEY can be set 
1563 in the global options section. They are used as defaults if they aren't 
1564 specified in the configuration sections of the respective images. See below 
1565 for a description.
1566
1567 The plethora of options may be intimidating at first, but in "normal" 
1568 configurations, hardly any options but BOOT, COMPACT, DELAY, ROOT, and VGA 
1569 are used.
1570
1571
1572 General per-image options
1573 - - - - - - - - - - - - -
1574
1575 The following options can be specified for all images, independent of their 
1576 type: 
1577
1578   ALIAS=<name>  Specifies a second name for the current entry. 
1579   FALLBACK=<command_line>  Specifies a string that is stored as the default 
1580     command line if the current image is booted. This is useful when 
1581     experimenting with kernels which may crash before allowing interaction 
1582     with the system. If using the FALLBACK option, the next reboot (e.g. 
1583     triggered by a manual reset or by a watchdog timer) will load a 
1584     different (supposedly stable) kernel. The command line by the fallback 
1585     mechanism is cleared by removing or changing the default command line 
1586     with the  -R  option, see "Change default command line". 
1587   LABEL=<name>  By default, LILO uses the main file name (without its path) 
1588     of each image specification to identify that image. A different name 
1589     can be used by setting the variable LABEL. 
1590   LOCK  Enables automatic recording of boot command lines as the defaults 
1591     for the following boots. This way, LILO "locks" on a choice until it is 
1592     manually overridden. 
1593   OPTIONAL  Omit this image if its main file is not available at map 
1594     creation time. This is useful to specify test kernels that are not 
1595     always present. 
1596   PASSWORD=<password>  Ask the user for a password when trying to load this 
1597     image. Because the configuration file contains unencrypted passwords 
1598     when using this option, it should only be readable for the super-user. 
1599     Passwords are always case-sensitive. 
1600   RESTRICTED  Relaxes the password protection by requiring a password only 
1601     if parameters are specified on the command line (e.g. single). 
1602     RESTRICTED can only be used together with PASSWORD. 
1603   SINGLE-KEY  Enables booting the image by hitting a single key, without 
1604     the need to press [Enter] afterwards. SINGLE-KEY requires that either 
1605     the image's label or its alias (or both) is a single character. 
1606     Furthermore, no other image label or alias may start with that 
1607     character, e.g. an entry specifying a label  linux  and an alias  l  is 
1608     not allowed with SINGLE-KEY. Note that you can't specify command-line 
1609     parameters for an entry for which only SINGLE-KEYed names exist. 
1610
1611 All general per-image options, with the exception of LABEL and ALIAS, can 
1612 also be set in the global options section as defaults for all images.
1613
1614 Example:
1615
1616 password = Geheim
1617 single-key
1618 image = /vmlinuz
1619   label = linux
1620   alias = 1
1621   restricted
1622 other = /dev/hda1
1623   label = dos
1624   alias = 2
1625
1626
1627 Per-image options for kernels
1628 - - - - - - - - - - - - - - -
1629
1630 Each (kernel or non-kernel) image description begins with a special 
1631 variable (see section "Booting kernel images from a device") which is 
1632 followed by optional variables. The following variables can be used for all 
1633 image descriptions that describe a Linux kernel:
1634
1635   APPEND=<string>  Appends the options specified in <string> to the 
1636     parameter line passed to the kernel. This is typically used to specify 
1637     parameters of hardware that can't be entirely auto-detected, e.g.
1638      append = "aha152x=0x140,11" 
1639   INITRD=<name>  Specifies the file that will be loaded at boot time as the 
1640     initial RAM disk. 
1641   LITERAL=<string>  like APPEND, but removes all other options (e.g. 
1642     setting of the root device). Because vital options can be removed 
1643     unintentionally with LITERAL, this option cannot be set in the global 
1644     options section. 
1645   RAMDISK=<size>  Specifies the size of the optional RAM disk. A value of 
1646     zero indicates that no RAM disk should be created. If this variable is 
1647     omitted, the RAM disk size configured into the boot image is used. 
1648   READ-ONLY  Specifies that the root file system should be mounted 
1649     read-only. Typically, the system startup procedure re-mounts the root 
1650     file system read-write later (e.g. after fsck'ing it). 
1651   READ-WRITE  specifies that the root file system should be mounted 
1652     read-write. 
1653   ROOT=<root_device>  Specifies the device that should be mounted as root. 
1654     If the special name CURRENT is used, the root device is set to the 
1655     device on which the root file system is currently mounted. If the root 
1656     has been changed with  -r , the respective device is used. If the 
1657     variable ROOT is omitted, the root device setting contained in the 
1658     kernel image is used. It can be changed with the rdev program. 
1659   VGA=<mode>   Specifies the VGA text mode that should be selected when 
1660     booting. The following values are recognized (case is ignored): 
1661
1662       NORMAL  select normal 80x25 text mode. 
1663       EXTENDED  select 80x50 text mode. The word EXTENDED can be 
1664         abbreviated to EXT. 
1665       ASK  stop and ask for user input (at boot time). 
1666       <number>  use the corresponding text mode. A list of available modes 
1667         can be obtained by booting with  vga=ask  and pressing [Enter]. 
1668
1669     If this variable is omitted, the VGA mode setting contained in the 
1670     kernel image is used. rdev supports manipulation of the VGA text mode 
1671     setting in the kernel image. 
1672
1673 All kernel per-image options but LITERAL can also be set in the global 
1674 options section as defaults for all kernels.
1675
1676 If one of RAMDISK, READ-ONLY, READ-WRITE, ROOT, or VGA is omitted in the 
1677 configuration file and the corresponding value in the kernel image is 
1678 changed, LILO or the kernel will use the new value.
1679
1680 It is perfectly valid to use different settings for the same image, because 
1681 LILO stores them in the image descriptors and not in the images themselves.
1682
1683 Example:
1684
1685 image = /vmlinuz
1686   label = lin-hd
1687   root = /dev/hda2
1688 image = /vmlinuz
1689   label = lin-fd
1690   root = /dev/fd0
1691
1692
1693 Boot image types
1694 ----------------
1695
1696 LILO can boot the following types of images: 
1697
1698   - kernel images from a file. 
1699   - kernel images from a block device. (E.g. a floppy disk.) 
1700   - the boot sector of some other operating system. 
1701
1702 The image type is determined by the name of the initial variable of the 
1703 configuration section.
1704
1705 The image files can reside on any media that is accessible at boot time. 
1706 There's no need to put them on the root device, although this certainly 
1707 doesn't hurt.
1708
1709
1710 Booting kernel images from a file
1711 - - - - - - - - - - - - - - - - -
1712
1713 The image is specified as follows: IMAGE=<name>
1714
1715 Example:
1716
1717 image = /linux
1718
1719 See sections "Per-image options for kernels" and "Boot image types" for the 
1720 options that can be added in a kernel image section.
1721
1722
1723 Booting kernel images from a device
1724 - - - - - - - - - - - - - - - - - -
1725
1726 The range of sectors that should be mapped has to be specified. Either a 
1727 range ( <start>-<end> ) or a start and a distance ( <start>+<number> ) have 
1728 to be specified. <start> and <end> are zero-based. If only the start is 
1729 specified, only that sector is mapped.
1730
1731 The image is specified as follows: IMAGE=<device_name> Additionally, the 
1732 RANGE variable must be set.
1733
1734 Example:
1735
1736 image = /dev/fd0
1737   range = 1+512
1738
1739 All kernel options can also be used when booting the kernel from a device.
1740
1741
1742 Booting a foreign operating system
1743 - - - - - - - - - - - - - - - - -
1744
1745 LILO can even boot other operating systems, i.e. MS-DOS. To boot an other 
1746 operating system, the name of a loader program, the device or file that 
1747 contains the boot sector and the device that contains the partition table 
1748 have to be specified.
1749
1750 The boot sector is merged with the partition table and stored in the map 
1751 file.
1752
1753 Currently, the loaders chain.b and os2_d.b exist. chain.b simply starts the 
1754 specified boot sector.* os2_d.b it a variant of chain.b that can boot OS/2 
1755 from the second hard disk. The MAP-DRIVE option has to be used with os2_d.b 
1756 to actually swap the drives.
1757
1758   *  The boot sector is loaded by LILO's secondary boot loader before 
1759     control is passed to the code of chain.b.
1760
1761 The image is specified as follows: OTHER=<device_name> or OTHER=<file_name>
1762
1763 In addition to the options listen in section "Per-image options for 
1764 kernels", the following variables are recognized: 
1765
1766   CHANGE  Change the partition table according to the rules specified in 
1767     this CHANGE section. This option is intended for booting systems which 
1768     find their partitions by examining the partition table. See section 
1769     "Partition type changes" for details. 
1770   LOADER=<chain_loader>  Specifies the chain loader that should be used. If 
1771     it is omitted, /boot/chain.b is used. 
1772   MAP-DRIVE=<bios_device_code>  Instructs chain.b to installs a resident 
1773     driver that re-maps the floppy or hard disk drives. This way, one can 
1774     boot any operating system from a hard disk different from the first 
1775     one, as long as that operating system uses _only_ the BIOS to access 
1776     that hard disk.* This is known to work for PC/MS-DOS.
1777
1778       *  So you should be very suspicious if the operating system requires 
1779         any specific configuration or even drivers to use the disk it is 
1780         booted from. Since there is a general trend to use optimized 
1781         drivers to fully exploit the hardware capabilities (e.g. 
1782         non-blocking disk access), booting systems from the second disk may 
1783         become increasingly difficult.
1784
1785      MAP-DRIVE is followed by the variable TO=<bios_device_code> which 
1786     specifies the drive that should effectively be accessed instead of the 
1787     original one. The list of mappings is only searched until the first 
1788     match is found. It is therefore possible to "swap" drives, see the 
1789     second example below. 
1790   TABLE=<device>  Specifies the device that contains the partition table. 
1791     LILO does not pass partition information to the booted operating system 
1792     if this variable is omitted. (Some operating systems have other means 
1793     to determine from which partition they have been booted. E.g. MS-DOS 
1794     usually stores the geometry of the boot disk or partition in its boot 
1795     sector.) Note that /sbin/lilo must be re-run if a partition table 
1796     mapped referenced with TABLE is modified. 
1797   UNSAFE  Do not access the boot sector at map creation time. This disables 
1798     some sanity checks, including a partition table check. If the boot 
1799     sector is on a fixed-format floppy disk device, using UNSAFE avoids the 
1800     need to put a readable disk into the drive when running the map 
1801     installer. UNSAFE and TABLE are mutually incompatible. 
1802
1803 None of these options can be set in the global options section.
1804
1805 Examples:
1806
1807 other = /dev/hda2
1808   label = dos
1809   table = /dev/hda
1810
1811 other = /dev/hdb2
1812   label = os2
1813   loader = /boot/os2_d.b
1814   map-drive = 0x80
1815     to = 0x81
1816   map-drive = 0x81
1817     to = 0x80
1818
1819
1820 Disk geometry
1821 -------------
1822
1823 For floppies and most hard disks, LILO can obtain the disk geometry 
1824 information from the kernel. Unfortunately, there are some exotic disks or 
1825 adapters which may either not supply this information or which may even 
1826 return incorrect information.
1827
1828 If no geometry information is available, LILO reports either the error
1829   geo_query_dev HDIO_GETGEO (dev 0x<number>) 
1830  or
1831   Device 0x<number>: Got bad geometry <sec>/<hd>/<cyl> 
1832
1833 If incorrect information is returned, booting may fail in several ways, 
1834 typically with a partial "LILO" banner message. In this document, that is 
1835 called a "geometry mismatch".
1836
1837 The next step should be to attempt setting the LBA32 or LINEAR 
1838 configuration variable or the  -L  or  -l  command-line option. If this 
1839 doesn't help, the entire disk geometry has to be specified explicitly. Note 
1840 that LINEAR doesn't always work with floppy disks.
1841
1842 Another common use of disk sections is if an (E)IDE and a SCSI drive are 
1843 used in the same system and the BIOS is configured to use the SCSI drive as 
1844 the first drive. (Normally, the (E)IDE drive would be the first drive and 
1845 the SCSI drive would be the second one.) Since LILO doesn't know how the 
1846 BIOS is configured, it needs to be told explicitly about this arrangement. 
1847 (See the second example below.)
1848
1849
1850 Obtaining the geometry
1851 - - - - - - - - - - -
1852
1853 The disk geometry parameters can be obtained by booting MS-DOS and running 
1854 the program DPARAM.COM with the hexadecimal BIOS code of the drive as its 
1855 argument, e.g. dparam 0x80 for the first hard disk. It displays the number 
1856 of sectors per track, the number of heads per cylinder and the number of 
1857 cylinders. All three numbers are one-based.
1858
1859 Alternatively, the geometry may also be determined by reading the 
1860 information presented by the "setup" section of the ROM-BIOS or by using 
1861 certain disk utilities under operating systems accessing the disk through 
1862 the BIOS.
1863
1864
1865 Specifying the geometry
1866 - - - - - - - - - - - -
1867
1868 Disk geometry parameters are specified in the options section of the 
1869 configuration file. Each disk parameter section begins with 
1870 DISK=<disk_device>, similar to the way how boot images are specified. It is 
1871 suggested to group disk parameter sections together, preferably at the 
1872 beginning or the end of the options section.
1873
1874 For each disk, the following variables can be specified: 
1875
1876   BIOS=<bios_device_code>  Is the number the BIOS uses to refer to that 
1877     device. Normally, it's  0x80  for the first hard disk and  0x81  for 
1878     the second hard disk. Note that hexadecimal numbers have to begin with 
1879     "0x". If BIOS is omitted, LILO tries to "guess" that number. 
1880   SECTORS=<sectors>  and 
1881   HEADS=<heads>  specify the number of sectors per track and the number of 
1882     heads, i.e. the number of tracks per cylinder. Both parameters have to 
1883     be either specified together or they have to be entirely omitted. If 
1884     omitted, LILO tries to obtain that geometry information from the 
1885     kernel. 
1886   CYLINDERS=<cylinders>  Specifies the number of cylinders. This value is 
1887     only used for sanity checks. If CYLINDERS is omitted, LILO uses the 
1888     information obtained from the kernel if geometry information had to be 
1889     requested in order to determine some other parameter. Otherwise,* it 
1890     just assumes the number of cylinders to be 1024, which is the cylinder 
1891     limit imposed by the BIOS. 
1892   INACCESSIBLE  Marks the device as inaccessible (for the BIOS). This is 
1893     useful if some disks on the system can't be read by the BIOS, although 
1894     LILO "thinks" they can. If one accidentally tries to use files located 
1895     on such disks for booting, the map installer won't notice and the 
1896     system becomes unbootable. The most likely use of INACCESSIBLE is to 
1897     prevent repetition after experiencing such a situation once. No other 
1898     variables may be specified if a device is configured as INACCESSIBLE. 
1899
1900   *  I.e. if the BIOS device code, the number of sectors, the number of 
1901     heads and the partition start are specified. Note that the number of 
1902     cylinders may appear to vary if CYLINDERS is absent and only some of 
1903     the partition starts are specified.
1904
1905 Additionally, partition subsections can be added with 
1906 PARTITION=<partition_device>. Each partition section can contain only one 
1907 variable: 
1908
1909   START=<partition_offset>  Specifies the zero-based number of the start 
1910     sector of that partition. The whole disk always has a partition offset 
1911     of zero. The partition offset is only necessary when using devices for 
1912     which the kernel does not provide that information, e.g. CD-ROMs. 
1913
1914 Examples:
1915
1916 disk = /dev/sda
1917   bios = 0x80
1918   sectors = 32
1919   heads = 64
1920   cylinders = 632
1921   partition = /dev/sda1
1922     start = 2048
1923   partition = /dev/sda2
1924     start = 204800
1925   partition = /dev/sda3
1926     start = 500000
1927   partition = /dev/sda4
1928     start = 900000
1929
1930 disk = /dev/sda
1931   bios = 0x80
1932 disk = /dev/hda
1933   bios = 0x81
1934
1935
1936 Partition table manipulation
1937 ----------------------------
1938
1939 Some non-Linux operating systems obtain information about their partitions 
1940 (e.g. their equivalent of the root file system) from the partition table. 
1941 If more than one such operating system is installed on a PC, they may have 
1942 conflicting interpretations of the content of the partition table. Those 
1943 problems can be avoided by changing the partition table, depending on which 
1944 operating system is being booted.
1945
1946 Partition table changes are specified in a CHANGE section in the 
1947 configuration file section describing the foreign operating system. Note 
1948 that CHANGE sections are only accepted if the build-time option  
1949 REWRITE_TABLE  is set.
1950
1951 The CHANGE section contains subsections for each partition whose table 
1952 entry needs to be modified. Partitions are specified with 
1953 PARTITION=<device_name>
1954
1955 Changes are applied in the sequence in which they appear in the 
1956 configuration file. Configurations containing changes that are redundant 
1957 either by repeating a previous change or by changing its result further are 
1958 invalid and refused by the map installer.
1959
1960 Internally, all changes are expressed as rules which specify the location 
1961 (disk and offset in the partition table), the value this location must 
1962 contain before the change, and the value that has to be stored. As a safety 
1963 measure, the rule is ignored if the previous value is found to be 
1964 different.
1965
1966
1967 Partition activation
1968 - - - - - - - - - -
1969
1970 This option is intended for booting systems which determine their boot 
1971 partition by examining the active flag in the partition table. The flag is 
1972 enabled with ACTIVATE and disabled with DEACTIVATE. Note that only the 
1973 current partition is affected. LILO does not automatically change the 
1974 active flags of other partitions and it also allows more than one partition 
1975 to be active at the same time.
1976
1977 Example:
1978
1979 other = /dev/sda4
1980   label = sco
1981   change
1982     partition = /dev/sda4
1983       activate
1984     partition = /dev/sda3
1985       deactivate
1986
1987
1988 Partition type change rules
1989 - - - - - - - - - - - - - -
1990
1991 Partition type changes are normally a transition between two possible 
1992 values, e.g. a typical convention is to set the lowest bit in the upper 
1993 nibble of the partition type (i.e. 0x10) in order to "hide", and to clear 
1994 it to "unhide" a partition. LILO performs these changes based on a set of 
1995 rules. Each rule defines the name of a partition type, its normal value, 
1996 and the value when hidden. Those rules are defined in the options section 
1997 of the configuration file. The section defining them begins with 
1998 CHANGE-RULES.
1999
2000 The following options and variables can appear in the section: 
2001
2002   RESET  Removes all previously defined rules. This is needed if a user 
2003     doesn't wish to use the pre-defined rules (see below). 
2004   TYPE=<name>  Adds a rule for the type with the specified name. Type names 
2005     are case-insensitive. The values are defined with NORMAL=<byte> and 
2006     HIDDEN=<byte>. Values can be specified as decimal or as hexadecimal 
2007     numbers with a leading  0x . If only one of the values is present, the 
2008     other value is assumed to be the same number, but with the most 
2009     significant bit inverted. 
2010
2011 LILO pre-defines rules for the three partition types of DOS partitions. The 
2012 following example removes the pre-defined rules and creates them again:
2013
2014 change-rules
2015   reset
2016   type = DOS12
2017     normal = 0x01
2018     hidden = 0x11
2019   type = DOS16_small
2020     normal = 4 # hidden is 0x14
2021   type = DOS16_big
2022     hidden = 0x16
2023
2024
2025 Partition type changes
2026 - - - - - - - - - - -
2027
2028 Partition type changes are specified in the partition section as 
2029 SET=<name>_<state>, where <name> is the name of the partition type, and 
2030 <state> is its state, i.e. NORMAL or HIDDEN.
2031
2032 Example:
2033
2034 other = /dev/sda3
2035   label = dos
2036   change
2037     partition = /dev/sda2
2038       set = dos16_big_normal
2039     partition = /dev/sda3
2040       activate
2041       set = DOS16_big_normal
2042
2043 Only one SET variable is allowed per partition section. In the rare event 
2044 that more than one SET variable is needed, further partition sections can 
2045 be used.
2046
2047
2048 Keyboard translation
2049 --------------------
2050
2051 The PC keyboard emits so-called scan codes, which are basically key 
2052 numbers. The BIOS then translates those scan codes to the character codes 
2053 of the characters printed on the key-caps. By default, the BIOS normally 
2054 assumes that the keyboard has a US layout. Once an operating system is 
2055 loaded, this operating system can use a different mapping.
2056
2057 At boot time, LILO only has access to the basic services provided by the 
2058 BIOS and therefore receives the character codes for an US keyboard. It 
2059 provides a simple mechanism to re-map the character codes to what is 
2060 appropriate for the actual layout.*
2061
2062   *  The current mechanism isn't perfect, because it sits on top of the 
2063     scan code to character code translation performed by the BIOS. This 
2064     means that key combinations that don't produce any useful character on 
2065     the US keyboard will be ignored by LILO. The advantage of this approach 
2066     is its simplicity.
2067
2068
2069 Compiling keyboard translation tables
2070 - - - - - - - - - - - - - - - - - - -
2071
2072 LILO obtains layout information from the keyboard translation tables Linux 
2073 uses for the text console. They are usually stored in 
2074 /usr/lib/kbd/keytables. LILO comes with a program keytab-lilo.pl that reads 
2075 those tables and generates a table suitable for use by the map installer. 
2076 keytab-lilo.pl invokes the program loadkeys to print the tables in a format 
2077 that is easy to parse.*
2078
2079   *  On some systems, only root can execute loadkeys. It is then necessary 
2080     to run keytab-lilo.pl as root too.
2081
2082 keytab-lilo.pl is used as follows:
2083
2084   keytab-lilo.pl [ -p <old_code>=<new_code> ] ... 
2085     [<path>]<default_layout>[.<extension>] ]
2086      [<path>]<kbd_layout>[.<extension>] ]  
2087
2088    -p <old_code>=<new_code>    
2089      Specifies corrections ("patches") to the mapping obtained from the 
2090     translation table files. E.g. if pressing the upper case "A" should 
2091     yield an at sign, -p 65=64 would be used. The  -p  option can be 
2092     repeated any number of times. The codes can also be given as 
2093     hexadecimal or as octal numbers if they are prefixed with 0x or 0, 
2094     respectively. 
2095   <path>  The directory in which the file resides. The default path is 
2096     /usr/lib/kbd/keytables. 
2097   <extension>  Usually the trailing .map, which is automatically added if 
2098     the file name doesn't contain dots. 
2099   <default_layout>  Is the layout which specifies the translation by the 
2100     BIOS. If none is specified, us is assumed. 
2101   <kbd_layout>  Is the actual layout of the keyboard. 
2102
2103 keytab-lilo.pl writes the resulting translation table as a binary string to 
2104 standard output. Such tables can be stored anywhere with any name, but the 
2105 suggested naming convention is /boot/<kbd>.ktl ("Keyboard Table for Lilo"), 
2106 where <kbd> is the name of the keyboard layout.
2107
2108 Example:
2109
2110 keytab-lilo.pl de >/boot/de.ktl
2111
2112
2113 Using keyboard translation tables
2114 - - - - - - - - - - - - - - - - -
2115
2116 The keyboard translation table file is specified with the global 
2117 configuration option  keytable=<table_file> . The complete name of the file 
2118 has to be given.
2119
2120 Example:
2121
2122 keytable = /boot/de.klt
2123
2124
2125 Installation and updates
2126 ========================
2127
2128
2129 Installation
2130 ------------
2131
2132 This section describes the installation of LILO. See section "LILO 
2133 de-installation" for how to uninstall LILO.
2134
2135
2136 Compatibility
2137 - - - - - - -
2138
2139 The kernel header files have to be in /usr/include/linux and the kernel 
2140 usually has to be configured by running  make config  before LILO can be 
2141 compiled.
2142
2143 /bin/sh has to be a real Bourne shell. bash is sufficiently compatible, but 
2144 some ksh clones may cause problems.
2145
2146 A file named INCOMPAT is included in the distribution. It describes 
2147 incompatibilities to older versions of LILO and may also contain further 
2148 compatibility notes.
2149
2150
2151 Quick installation
2152 - - - - - - - - -
2153
2154 If you want to install LILO on your hard disk and if you don't want to use 
2155 all its features, you can use the quick installation script. Read QuickInst 
2156 for details.
2157
2158 QuickInst can only be used for first-time installations or to entirely 
2159 replace an existing installation, _not_ to update or modify an existing 
2160 installation of LILO. Be sure you've extracted LILO into a directory that 
2161 doesn't contain any files of other LILO installations.
2162
2163
2164 Files
2165 - - -
2166
2167 Some of the files contained in lilo-21.tar.gz:
2168
2169   lilo/README   
2170      This documentation in plain ASCII format. Some sections containing 
2171     complex tables are only included in the LaTeX version in doc/user.tex 
2172   lilo/INCOMPAT   
2173      List of incompatibilities to previous versions of LILO. 
2174   lilo/CHANGES   
2175      Change history. 
2176   lilo/VERSION   
2177      The version number of the respective release. 
2178   lilo/QuickInst   
2179      Quick installation script. 
2180   lilo/lilo-<version>.lsm   
2181      The LSM ("Linux Software Map") entry of the respective LILO release. 
2182   lilo/Makefile   
2183      Makefile to generate everything else. 
2184   lilo/*.c, lilo/*.h   
2185      LILO map installer C source and common header files. 
2186   lilo/*.S   
2187      LILO boot loader assembler source. 
2188   lilo/activate.c   
2189      C source of a simple boot partition setter. 
2190   lilo/dparam.s   
2191      Assembler source of a disk parameter dumper. 
2192   lilo/mkdist   
2193      Shell script used to create the current LILO distribution. 
2194   lilo/keytab-lilo.pl   
2195      Perl script to generate keyboard translation tables. 
2196   lilo/doc/README   
2197      Description of how to generate the documentation. 
2198   lilo/doc/Makefile   
2199      Makefile used to convert the LaTeX source into either DVI output or 
2200     the plain ASCII README file. 
2201   lilo/doc/user.tex   
2202      LaTeX source of LILO's user's guide (this document). 
2203   lilo/doc/tech.tex   
2204      LaTeX source of LILO's technical overview. 
2205   lilo/doc/*.fig   
2206      Various xfig pictures used in the technical overview. 
2207   lilo/doc/fullpage.sty   
2208      Style file to save a few square miles of forest. 
2209   lilo/doc/rlatex   
2210      Shell script that invokes LaTeX repeatedly until all references have 
2211     settled. 
2212   lilo/doc/t2a.pl   
2213      Perl script to convert the LaTeX source of the user's guide to plain 
2214     ASCII. 
2215
2216 Files created after  make  in lilo source directory (among others):
2217
2218   lilo/lilo   
2219      LILO (map) installer.  make install  puts this file into /sbin 
2220   lilo/dparam.com   
2221      MS-DOS executable of the disk parameter dumper (optional).
2222
2223
2224 Normal first-time installation
2225 - - - - - - - - - - - - - - -
2226
2227 First, you have to install the LILO files:
2228
2229   - extract all files from lilo-<version>.tar.gz in a new directory.* 
2230   - configure the Makefile (see section "Build-time configuration") 
2231   - run  make  to compile and assemble all parts. 
2232   - run  make install  to copy all LILO files to the directories where 
2233     they're installed. /sbin should now contain the file lilo, /usr/sbin 
2234     should contain keytab-lilo.pl and /boot should contain some image
2235     files (.bmp).
2236
2237   *  E.g. /usr/src/lilo
2238
2239 If you want to use LILO on a non-standard disk, you might have to determine 
2240 the parameters of your disk(s) and specify them in the configuration file. 
2241 See section "Disk geometry" for details. If you're using such a 
2242 non-standard system, the next step is to test LILO with the boot sector on 
2243 a floppy disk:
2244
2245   - insert a blank (but low-level formatted) floppy disk into /dev/fd0. 
2246   - run  echo image=<kernel_image>  |
2247       /sbin/lilo -C - -b /dev/fd0 -v -v -v 
2248      If you've already installed LILO on your system, you might not want to 
2249     overwrite your old map file. Use the  -m  option to specify an 
2250     alternate map file name. 
2251   - reboot. LILO should now load its boot loaders from the floppy disk and 
2252     then continue loading the kernel from the hard disk. 
2253
2254 Now, you have to decide, which boot concept you want to use. Let's assume 
2255 you have a Linux partition on /dev/hda2 and you want to install your LILO 
2256 boot sector there. The DOS-MBR loads the LILO boot sector.
2257
2258   - get a working boot disk, e.g. an install or recovery disk. Verify that 
2259     you can boot with this setup and that you can mount your Linux 
2260     partition(s) with it. 
2261   - if the boot sector you want to overwrite with LILO is of any value 
2262     (e.g. it's the MBR or if it contains a boot loader you might want to 
2263     use if you encounter problems with LILO), you should mount your boot 
2264     disk and make a backup copy of your boot sector to a file on that 
2265     floppy, e.g. dd if=/dev/hda of=/fd/boot_sector bs=512 count=1 
2266   - create the configuration file /etc/lilo.conf, e.g.
2267      <global settings>
2268      <image specification>
2269        <per-image options>
2270      ...
2271      Be sure to use absolute paths for all files. Relative paths may cause 
2272     unexpected behaviour when using the  -r  option. 
2273   - now, you can check what LILO would do if you were about to install it 
2274     on your hard disk:
2275      /sbin/lilo -v -v -v -t 
2276   - if you need some additional boot utility (i.e. BOOTACTV), you should 
2277     install that now 
2278   - run /sbin/lilo to install LILO on your hard disk 
2279   - if you have to change the active partition, use fdisk or activate to do 
2280     that 
2281   - reboot 
2282
2283
2284 Build-time configuration
2285 - - - - - - - - - - - -
2286
2287 Certain build-time parameters can be configured. They can either be edited 
2288 in the top-level Makefile or they can be stored in a file 
2289 /etc/lilo.defines. Settings in the Makefile are ignored if that file 
2290 exists.
2291
2292 The following items can be configured: 
2293
2294    BEEP   Enables beeping after displaying "LILO". This is useful on 
2295     machines which don't beep at the right time when booting and when 
2296     working over a serial console. This option is disabled by default. 
2297    IGNORECASE   Makes image name matching case-insensitive, i.e. "linux" 
2298     and "Linux" are identical. This option is enabled by default. Note that 
2299     password matching is always case-sensitive. 
2300    LARGE_EDBA   Loads LILO at a lower address in order to leave more space 
2301     for the EBDA (Extended BIOS Data Area). This is necessary on some 
2302     recent MP systems. Note that enabling  LARGE_EDBA  reduces the maximum 
2303     size of "small" images (e.g. "Image" or "zImage"). 
2304    NO1STDIAG   Do not generate diagnostics on read errors in the first 
2305     stage boot loader. This avoids possibly irritating error codes if the 
2306     disk controller has transient read problems. This option is disabled by 
2307     default. 
2308    NODRAIN   The boot loader empties the keyboard buffer when starting, 
2309     because it may contain garbage on some systems. Draining the keyboard 
2310     buffer can be disabled by setting the  NODRAIN  option.  NODRAIN  is 
2311     disabled by default. 
2312    NOINSTDEF   If the option INSTALL is omitted, don't install a new boot 
2313     sector, but try to modify the old boot sector instead. This option is 
2314     disabled by default. 
2315    ONE_SHOT   Disables the command-line timeout (configuration variable 
2316     TIMEOUT) if any key is pressed. This way, very short timeouts can be 
2317     used if PROMPT is set.  ONE_SHOT  is disabled by default. 
2318    READONLY   Disallows overwriting the default command line sector of the 
2319     map file. This way, command lines set with  -R  stay in effect until 
2320     they are explicitly removed.  READONLY  also disables LOCK, FALLBACK, 
2321     and everything enabled by  REWRITE_TABLE . This option is disabled by 
2322     default. 
2323    REWRITE_TABLE   Enables rewriting the partition table at boot time. This 
2324     may be necessary to boot certain operating systems who expect the 
2325     active flag to be set on their partition or who need changes in 
2326     partition types. See also section "Partition table manipulation". This 
2327     option is _dangerous_ and it is disabled by default. 
2328    USE_TMPDIR   Use the directory indicated in the  TMPDIR  environment 
2329     variable when creating temporary device files. If  TMPDIR  is not set 
2330     or if LILO is compiled without  USE_TMPDIR , temporary device files are 
2331     created in /tmp.* This option is disabled by default. 
2332    VARSETUP   Enables the use of variable-size setup segments. This option 
2333     is enabled by default and is only provided to fall back to fixed-size 
2334     setup segments in the unlikely case of problems when using prehistoric 
2335     kernels. 
2336    XL_SECS=<sectors>   Enable support for extra large (non-standard) floppy 
2337     disks. The number of sectors is set in the BIOS disk parameter table to 
2338     the specified value. Note that this hack may yield incorrect behaviour 
2339     on some systems. This option is disabled by default. 
2340
2341   *  Note that, while honoring  TMPDIR  is the "right" thing to do, the 
2342     fact that LILO has to create temporary device files at all may indicate 
2343     that the operating environment is not completely set up, so  TMPDIR  
2344     may point to an invalid location.
2345
2346 /etc/lilo.defines should be used if one wishes to make permanent 
2347 configuration changes. The usual installation procedures don't touch that 
2348 file. Example:
2349
2350 -DIGNORECASE -DONE_SHOT
2351
2352 After changing the build-time configuration, LILO has to be recompiled with 
2353 the following commands:
2354
2355 make distclean
2356 make
2357
2358
2359 Floppy disk installation
2360 - - - - - - - - - - - -
2361
2362 In some cases*, it may be desirable to install LILO on a floppy disk in a 
2363 way that it can boot a kernel without accessing the hard disk.
2364
2365   *  E.g. if no hard disk is accessible through the BIOS.
2366
2367 The basic procedure is quite straightforward (see also section "BIOS 
2368 restrictions"): 
2369
2370   - a file system has to be created on the file system 
2371   - the kernel has to be copied to the floppy disk 
2372   - /sbin/lilo has to be run to create the map file 
2373
2374 This can be as easy as
2375
2376 /sbin/mke2fs /dev/fd0
2377 [ -d /fd ] || mkdir /fd
2378 mount /dev/fd0 /fd
2379 cp /zImage /fd
2380 echo image=/fd/zImage label=linux |
2381   /sbin/lilo -C - -b /dev/fd0 -c -m /fd/map
2382 umount /fd
2383
2384 The command line of /sbin/lilo is a little tricky.  -C -  takes the 
2385 configuration from standard input (naturally, one could also write the 
2386 configuration into a file),  -b /dev/fd0  specifies that the boot sector
2387 is written to the floppy disk,  -c  speeds up the load process and  -m 
2388 /fd/map  puts the map file on the floppy too.
2389
2390
2391 Updates
2392 -------
2393
2394 LILO is affected by updates of kernels, the whole system and (trivially) of 
2395 LILO itself. Typically, only /sbin/lilo has to be run after any of those 
2396 updates and everything will be well again (at least as far as LILO is 
2397 concerned).
2398
2399
2400 LILO update
2401 - - - - - -
2402
2403 Before updating to a new version of LILO, you should read at least the file 
2404 INCOMPAT which describes incompatibilities with previous releases.
2405
2406 After that, the initial steps are the same as for a first time 
2407 installation: extract all files, configure the Makefile, run  make  to 
2408 build the executables and run  make install  to install the files.
2409
2410 The old versions of boot.b, chain.b, etc. are automatically renamed to 
2411 boot.old, chain.old, etc. This is done to ensure that you can boot even if 
2412 the installation procedure does not finish. boot.old, chain.old, etc. can 
2413 be deleted after the map file is rebuilt.
2414
2415 Because the locations of boot.b, chain.b, etc. have changed and because the 
2416 map file format may be different too, you have to update the boot sector 
2417 and the map file. Run /sbin/lilo to do this.
2418
2419
2420 Kernel update
2421 - - - - - - -
2422
2423 Whenever any of the kernel files that are accessed by LILO is moved or 
2424 overwritten, the map has to be re-built.* Run /sbin/lilo to do this.
2425
2426   *  It is advisable to keep a second, stable, kernel image that can be 
2427     booted if you forget to update the map after a change to your usual 
2428     kernel image.
2429
2430 The kernel has a make target "zlilo" that copies the kernel to /vmlinuz and 
2431 runs /sbin/lilo.
2432
2433
2434 System upgrade
2435 - - - - - - -
2436
2437 Normally, system upgrades (i.e. installation or removal of packages, 
2438 possibly replacement of a large part of the installed binaries) do not 
2439 affect LILO. Of course, if a new kernel is installed in the process, the 
2440 normal kernel update procedure has to be followed (see section "Kernel 
2441 update"). Also, if kernels are removed or added, it may be necessary to 
2442 update the configuration file.
2443
2444 If LILO is updated by this system upgrade, /sbin/lilo should be run before 
2445 booting the upgraded system. It is generally a good idea not to rely on the 
2446 upgrade procedure to perform this essential step automatically.
2447
2448 However, system upgrades which involve removal and re-creation of entire 
2449 partitions (e.g. /, /usr, etc.) are different. First, they should be 
2450 avoided, because they bear a high risk of losing other critical files, e.g. 
2451 the /etc/XF86Config you've spent the last week fiddling with. If an upgrade 
2452 really has to be performed in such a brute-force way, this is equal with 
2453 total removal of LILO, followed by a new installation. Therefore, the 
2454 procedures described in the sections "LILO de-installation" and "LILO 
2455 update" have to be performed. If you've forgotten to make a backup copy of 
2456 /etc/lilo.conf before the destructive upgrade, you might also have to go 
2457 through section "Normal first-time installation" again.
2458
2459
2460 LILO de-installation
2461 --------------------
2462
2463 In order to stop LILO from being invoked when the system boots, its boot 
2464 sector has to be either removed or disabled. All other files belonging to 
2465 LILO can be deleted _after_ removing the boot sector, if desired.*
2466
2467   *  Backup copies of old boot sectors may be needed when removing the boot 
2468     sector. They are stored in /boot.
2469
2470 Again, _when removing Linux, LILO must be de-installed before (!) its files 
2471 (/boot, etc.) are deleted._ This is especially important if LILO is 
2472 operating as the MBR.
2473
2474 LILO 14 (and newer) can be de-installed with lilo -u. If LILO 14 or newer 
2475 is currently installed, but the first version of LILO installed was older 
2476 than 14, lilo -U may work. When using -U, the warning at the end of this 
2477 section applies.
2478
2479 If LILO's boot sector has been installed on a primary partition and is 
2480 booted by the "standard" MBR or some partition switcher program, it can be 
2481 disabled by making a different partition active. MS-DOS' FDISK, Linux fdisk 
2482 or LILO's activate can do that.
2483
2484 If LILO's boot sector is the master boot record (MBR) of a disk, it has to 
2485 be replaced with a different MBR, typically MS-DOS' "standard" MBR. When 
2486 using MS-DOS 5.0 or above, the MS-DOS MBR can be restored with FDISK /MBR. 
2487 This only alters the boot loader code, not the partition table.
2488
2489 LILO automatically makes backup copies when it overwrites boot sectors. 
2490 They are named /boot/boot.<nnnn>, with <nnnn> corresponding to the device 
2491 number, e.g.  0300  is /dev/hda,  0800  is /dev/sda, etc. Those backups can 
2492 be used to restore the old MBR if no easier method is available. The 
2493 commands are
2494   dd if=/boot/boot.0300 of=/dev/hda bs=446 count=1  or
2495   dd if=/boot/boot.0800 of=/dev/sda bs=446 count=1 
2496  respectively.
2497
2498 _WARNING:_ Some Linux distributions install boot.<nnnn> files from the 
2499 system where the distribution was created. Using those files may yield 
2500 unpredictable results. Therefore, the file creation date should be 
2501 carefully checked.
2502
2503
2504 Installation of other operating systems
2505 ---------------------------------------
2506
2507 Some other operating systems (e.g. MS-DOS 6.0) appear to modify the MBR in 
2508 their install procedures. It is therefore possible that LILO will stop to 
2509 work after such an installation and Linux has to be booted from floppy 
2510 disk. The original state can be restored by either re-running /sbin/lilo 
2511 (if LILO is installed as the MBR) or by making LILO's partition active (if 
2512 it's installed on a primary partition).
2513
2514 It is generally a good idea to install LILO after the other operating 
2515 systems have been installed. E.g. OS/2 is said to cause trouble when 
2516 attempting to add it to an existing Linux system. (However, booting from 
2517 floppy and running /sbin/lilo should get around most interferences.)
2518
2519 Typically, the new operating system then has to be added to LILO's 
2520 configuration (and /sbin/lilo has to be re-run) in order to boot it.
2521
2522 See also section "Other problems" for a list of known problems with some 
2523 other operating systems.
2524
2525
2526 Troubleshooting
2527 ===============
2528
2529 All parts of LILO display some messages that can be used to diagnose 
2530 problems.
2531
2532
2533 Map installer warnings and errors
2534 ---------------------------------
2535
2536 Most messages of the map installer (/sbin/lilo) should be self-explanatory. 
2537 Some messages that indicate common errors are listed below. They are 
2538 grouped into fatal errors and warnings (non-fatal errors).
2539
2540
2541 Fatal errors
2542 - - - - - - 
2543
2544    Boot sector of <device_name> doesn't have a boot signature   
2545    Boot sector of <device_name> doesn't have a LILO signature    
2546      The sector from which LILO should be uninstalled doesn't appear to be 
2547     a LILO boot sector. 
2548    Can't put the boot sector on logical partition <number>    
2549      An attempt has been made to put LILO's boot sector on the current root 
2550     file system partition which is on a logical partition. This usually 
2551     doesn't have the desired effect, because common MBRs can only boot 
2552     primary partitions. This check can be bypassed by explicitly specifying 
2553     the boot partition with the  -b  option or by setting the configuration 
2554     variable BOOT. 
2555    Checksum error    
2556      The descriptor table of the map file has an invalid checksum. Refresh 
2557     the map file _immediately_ ! 
2558    Device 0x<number>: Configured as inaccessible.    
2559      There is a DISK section entry indicating that the device is 
2560     inaccessible from the BIOS. You should check carefully that all files 
2561     LILO tries to access when booting are on the right device. 
2562    Device 0x<number>: Got bad geometry <sec>/<hd>/<cyl>    
2563      The device driver for your SCSI controller does not support geometry 
2564     detection. You have to specify the geometry explicitly (see section 
2565     "Disk geometry"). 
2566    Device 0x<number>: Invalid partition table, entry <number>    
2567      The 3D and linear addresses of the first sector of the specified 
2568     partition don't correspond. This is typically caused by partitioning a 
2569     disk with a program that doesn't align partitions to tracks and later 
2570     using PC/MS-DOS or OS/2 on that disk. LILO can attempt to correct the 
2571     problem, see "General per-image options". 
2572    Device 0x<number>: Partition type 0x<number> does not seem suitable for 
2573   a LILO boot sector    
2574      The location where the LILO boot sector should be placed does not seem 
2575     to be suitable for that. (See also also section "Disk organization"). 
2576     You should either adjust the partition type to reflect the actual use 
2577     or put the boot sector on a different partition. This consistency check 
2578     only yields a warning (i.e. LILO continues) if the option IGNORE-TABLE 
2579     is set. 
2580    <device_name> is not a valid partition device    
2581      The specified device is either not a device at all, a whole disk, or a 
2582     partition on a different disk than the one in whose section its entry 
2583     appears. 
2584    <device_name> is not a whole disk device    
2585      Only the geometry of whole disks (e.g. /dev/hda, /dev/sdb, etc.) can 
2586     be redefined when using DISK sections. 
2587    DISKTAB and DISK are mutually exclusive    
2588      You cannot use a disktab file and disk geometry definitions in the 
2589     configuration file at the same time. Maybe /etc/disktab was 
2590     accidentally used, because that's the default for 
2591     backward-compatibility. You should delete /etc/disktab after completing 
2592     the transition to DISK sections. 
2593    Duplicate entry in partition table    
2594      A partition table entry appears twice. The partition table has to be 
2595     fixed with fdisk. 
2596    Duplicate geometry definition for <device_name>    
2597      A disk or partition geometry definition entry for the same device 
2598     appears twice in the configuration file. Note that you mustn't write a 
2599     partition section for the whole disk - its start sector is always the 
2600     first sector of the disk. 
2601    First sector of <device> doesn't have a valid boot signature    
2602      The first sector of the specified device does not appear to be a valid 
2603     boot sector. You might have confused the device name.* 
2604    geo_comp_addr: Cylinder <number> beyond end of media (<number>)    
2605      A file block appears to be located beyond the last cylinder of the 
2606     disk. This probably indicates an error in the disk geometry 
2607     specification (see section "Disk geometry") or a file system 
2608     corruption. 
2609    geo_comp_addr: Cylinder number is too big (<number> > 1023)    
2610      Blocks of a file are located beyond the 1024th cylinder of a hard 
2611     disk. LILO can't access such files, because the BIOS limits cylinder 
2612     numbers to the range 0...1023. Try moving the file to a different 
2613     place, preferably a partition that is entirely within the first 1024 
2614     cylinders of the disk. 
2615    Hole found in map file (<location>)    
2616      The map installer is confused about the disk organization. Please 
2617     report this error. 
2618    <item> doesn't have a valid LILO signature    
2619      The specified item has been located, but is not part of LILO. 
2620    <item> has an invalid stage code (<number>)    
2621      The specified item has probably been corrupted. Try re-building LILO. 
2622    <item> is version <number>. Expecting version <number>.    
2623      The specified entity is either too old or too new. Make sure all parts 
2624     of LILO (map installer, boot loaders and chain loaders) are from the 
2625     same distribution. ** 
2626    Kernel <name> is too big    
2627      The kernel image (without the setup code) is bigger than 512 kbytes 
2628     (or 448 kbytes, if built with  LARGE_EDBA ). LILO would overwrite 
2629     itself when trying to load such a kernel. This limitation only applies 
2630     to old kernels which are loaded below 0x10000 (e.g. "Image" or 
2631     "zImage"). Try building the kernel with "bzImage". If this is 
2632     undesirable for some reason, try removing some unused drivers and 
2633     compiling the kernel again. This error may also occur if the kernel 
2634     image is damaged or if it contains trailing "junk", e.g. as the result 
2635     of copying an entire boot floppy to the hard disk. 
2636    LOCK and FALLBACK are mutually exclusive    
2637      Since LOCK and FALLBACK both change the default command line, they 
2638     can't be reasonably used together. 
2639    Map <path> is not a regular file.    
2640      This is probably the result of an attempt to omit writing a map file, 
2641     e.g. with  -m /dev/null . The  -t  option should be used to accomplish 
2642     this. 
2643    Must specify SECTORS and HEADS together    
2644      It is assumed that disks with a "strange" number of sectors will also 
2645     have a "strange" number of heads. Therefore, it's all or nothing. 
2646    No geometry variables allowed if INACCESSIBLE    
2647      If a device is configured as INACCESSIBLE (see section "Specifying the 
2648     geometry"), its DISK section must not contain any geometry variables. 
2649    No image <image> is defined    
2650      The command line specified either with the  -R  option or with 
2651     FALLBACK does not contain the name of a valid image. Note that optional 
2652     images which have not been included in the map file are not considered 
2653     as valid. 
2654    Partition entry not found    
2655      The partition from which an other operating system should be booted 
2656     isn't listed in the specified partition table. This either means that 
2657     an incorrect partition table has been specified or that you're trying 
2658     to boot from a logical partition. The latter usually doesn't work. You 
2659     can bypass this check by omitting the partition table specification 
2660     (e.g. omitting the variable TABLE). 
2661    Single-key clash: "<name>" vs. "<name>"    
2662      The specified image labels or aliases conflict because one of them is 
2663     a single character and has the SINGLE-KEY option set, and the other 
2664     name begins with that character. 
2665    Sorry, don't know how to handle device <number>    
2666      LILO uses files that are located on a device for which there is no 
2667     easy way to determine the disk geometry. Such devices have to be 
2668     explicitly described, see section "Disk geometry". 
2669    This LILO is compiled READONLY and doesn't support ...    
2670      If LILO is not allowed to write to the disk at boot time (see section 
2671     "Build-time configuration"), options like LOCK and FALLBACK are 
2672     unavailable. 
2673    This LILO is compiled without REWRITE_TABLE and doesn't support ...    
2674      If LILO is not allowed to rewrite partition tables at boot time (see 
2675     section "Partition table manipulation"), options like ACTIVATE and SET 
2676     (in a CHANGE section) are unavailable. You may also get this error if 
2677     LILO is compiled with  READONLY  enabled. 
2678    Timestamp in boot sector of <device> differs from date of <file>    
2679      The backup copy of the boot sector does not appear to be an ancestor 
2680     of the current boot sector. If you are absolutely sure that the boot 
2681     sector is indeed correct, you can bypass this check by using  -U  
2682     instead of  -u . 
2683    Trying to map files from unnamed device 0x<number> (NFS ?)    
2684      This is probably the same problem as described below, only with the 
2685     root file system residing on NFS. 
2686    Trying to map files from your RAM disk. Please check -r option or ROOT 
2687   environment variable.    
2688      Most likely, you or some installation script is trying to invoke LILO 
2689     in a way that some of the files is has to access reside on the RAM 
2690     disk. Normally, the  ROOT  environment variable should be set to the 
2691     mount point of the effective root device if installing LILO with a 
2692     different root directory. See also sections "Create or update map" and 
2693     "Normal first-time installation". 
2694    VGA mode presetting is not supported by your kernel.    
2695      Your kernel sources appear to be very old ('93 ?). LILO may work on 
2696     your system if you remove the VGA option. 
2697    write <item>: <error_reason>    
2698      The disk is probably full or mounted read-only. 
2699
2700   *  Because different partition programs may display the partitions in a 
2701     different order, it is possible that what you think is your first 
2702     partition isn't /dev/hda1, etc. A good method to verify the content of 
2703     a partition is to try to mount it.
2704
2705   **  The expected version number may be different from the version number 
2706     of the LILO package, because file version numbers are only increased 
2707     when the file formats change.
2708
2709
2710 Warnings
2711 - - - -
2712
2713 Messages labeled with "Warning" can be turned off with the NOWARN option.
2714
2715    FIGETBSZ <file_name>: < error_reason>    
2716      The map installer is unable to determine the block size of a file 
2717     system. It assumes a block size of two sectors (1kB). 
2718    Ignoring entry '<variable_name>'    
2719      The command-line option corresponding to the specified variable is 
2720     set. Therefore, the configuration file entry is ignored. 
2721    Setting DELAY to 20 (2 seconds)    
2722      Because accidentally booting the wrong kernel or operating system may 
2723     be very inconvenient on systems that are not run from a local display, 
2724     the minimum delay is two seconds if the SERIAL variable is set. 
2725    (temp) <item>: <error_reason>    
2726      Deleting a temporary file has failed for the specified reason. 
2727    Warning: BIOS drive 0x<number> may not be accessible    
2728      Because most BIOS versions only support two floppies and two hard 
2729     disks, files located on additional disks may be inaccessible. This 
2730     warning indicates that some kernels or even the whole system may be 
2731     unbootable. 
2732    Warning: COMPACT may conflict with LINEAR on some systems    
2733      Please see section "Other problems" for a description of this problem. 
2734    Warning: <config_file> should be owned by root    
2735      In order to prevent users from compromising system integrity, the 
2736     configuration file should be owned by root and write access for all 
2737     other users should be disabled. 
2738    Warning: <config_file> should be readable only for root if using 
2739   PASSWORD    
2740      Users should not be allowed to read the configuration file when using 
2741     the PASSWORD option, because then, it contains unencrypted passwords. 
2742    Warning: <config_file> should be writable only for root    
2743      See " Warning: <config_file> should be owned by root ". 
2744    Warning: device 0x<number> exceeds 1024 cylinder limit    
2745      A disk or partition exceeds the 1024 cylinder limit imposed by the 
2746     BIOS. This may result in a fatal error in the current installation run 
2747     or in later installation runs. See " geo_comp_addr: Cylinder number is 
2748     too big (<number> > 1023) " for details. 
2749    Warning: <device> is not on the first disk    
2750      The specified partition is probably not on the first disk. LILO's boot 
2751     sector can only be booted from the first disk unless some special boot 
2752     manager is used. 
2753    WARNING: The system is unbootable !    
2754      One of the last installation steps has failed. This warning is 
2755     typically followed by a fatal error describing the problem. 
2756
2757
2758 Boot loader messages
2759 --------------------
2760
2761 The boot loader generates three types of messages: progress and error 
2762 messages while it is loading, messages indicating disk access errors, and 
2763 error messages in response to invalid command-line input. Since messages of 
2764 the latter type are usually self-explanatory, only the two other categories 
2765 are explained.
2766
2767
2768 LILO start message
2769 - - - - - - - - -
2770
2771 When LILO loads itself, it displays the word "LILO". Each letter is printed 
2772 before or after performing some specific action. If LILO fails at some 
2773 point, the letters printed so far can be used to identify the problem. This 
2774 is described in more detail in the technical overview.
2775
2776 Note that some hex digits may be inserted after the first "L" if a 
2777 transient disk problem occurs. Unless LILO stops at that point, generating 
2778 an endless stream of error codes, such hex digits do not indicate a severe 
2779 problem.
2780
2781   (<nothing>)  No part of LILO has been loaded. LILO either isn't installed 
2782     or the partition on which its boot sector is located isn't active. 
2783    L <error> ...   The first stage boot loader has been loaded and started, 
2784     but it can't load the second stage boot loader. The two-digit error 
2785     codes indicate the type of problem. (See also section "Disk error 
2786     codes".) This condition usually indicates a media failure or a geometry 
2787     mismatch (e.g. bad disk parameters, see section "Disk geometry"). 
2788    LI   The first stage boot loader was able to load the second stage boot 
2789     loader, but has failed to execute it. This can either be caused by a 
2790     geometry mismatch or by moving /boot/boot.b without running the map 
2791     installer. 
2792    LIL   The second stage boot loader has been started, but it can't load 
2793     the descriptor table from the map file. This is typically caused by a 
2794     media failure or by a geometry mismatch. 
2795    LIL?   The second stage boot loader has been loaded at an incorrect 
2796     address. This is typically caused by a subtle geometry mismatch or by 
2797     moving /boot/boot.b without running the map installer. 
2798    LIL-   The descriptor table is corrupt. This can either be caused by a 
2799     geometry mismatch or by moving /boot/map without running the map 
2800     installer. 
2801    LILO   All parts of LILO have been successfully loaded. 
2802
2803
2804 Disk error codes
2805 - - - - - - - -
2806
2807 If the BIOS signals an error when LILO is trying to load a boot image, the 
2808 respective error code is displayed. The following BIOS error codes are 
2809 known:
2810
2811    0x00   "Internal error". This code is generated by the sector read 
2812     routine of the LILO boot loader whenever an internal inconsistency is 
2813     detected. This might be caused by corrupt files. Try re-building the 
2814     map file. Another possible cause for this error are attempts to access 
2815     cylinders beyond 1024 while using the LINEAR option. See section "BIOS 
2816     restrictions" for more details and for how to solve the problem. 
2817    0x01   "Illegal command". This shouldn't happen, but if it does, it may 
2818     indicate an attempt to access a disk which is not supported by the 
2819     BIOS. See also "Warning: BIOS drive 0x<number> may not be accessible" 
2820     in section "Warnings". 
2821    0x02   "Address mark not found". This usually indicates a media problem. 
2822     Try again several times. 
2823    0x03   "Write-protected disk". This should only occur on write 
2824     operations. 
2825    0x04   "Sector not found". This typically indicates a geometry mismatch. 
2826     If you're booting a raw-written disk image, verify whether it was 
2827     created for disks with the same geometry as the one you're using. If 
2828     you're booting from a SCSI disk or a large IDE disk, you should check, 
2829     whether LILO has obtained correct geometry data from the kernel or 
2830     whether the geometry definition corresponds to the real disk geometry. 
2831     (See section "Disk geometry".) Removing COMPACT may help too. So may 
2832     adding LBA32 or LINEAR. 
2833    0x06   "Change line active". This should be a transient error. Try 
2834     booting a second time. 
2835    0x07   "Invalid initialization". The BIOS failed to properly initialize 
2836     the disk controller. You should control the BIOS setup parameters. A 
2837     warm boot might help too. 
2838    0x08   "DMA overrun". This shouldn't happen. Try booting again. 
2839    0x09   "DMA attempt across 64k boundary". This shouldn't happen, but may 
2840     inicate a disk geometry mis-match. Try omitting the COMPACT option. You 
2841     may need to specify the disk geometry yourself. 
2842    0x0C   "Invalid media". This shouldn't happen and might be caused by a 
2843     media error. Try booting again. 
2844    0x10   "CRC error". A media error has been detected. Try booting several 
2845     times, running the map installer a second time (to put the map file at 
2846     some other physical location or to write "good data" over the bad 
2847     spot), mapping out the bad sectors/tracks and, if all else fails, 
2848     replacing the media. 
2849    0x11   "ECC correction successful". A read error occurred, but was 
2850     corrected. LILO does not recognize this condition and aborts the load 
2851     process anyway. A second load attempt should succeed. 
2852    0x20   "Controller error". This shouldn't happen. 
2853    0x40   "Seek failure". This might be a media problem. Try booting again. 
2854    0x80   "Disk timeout". The disk or the drive isn't ready. Either the 
2855     media is bad or the disk isn't spinning. If you're booting from a 
2856     floppy, you might not have closed the drive door. Otherwise, trying to 
2857     boot again might help. 
2858    0xBB   "BIOS error". This shouldn't happen. Try booting again. If the 
2859     problem persists, removing the COMPACT option or adding/removing LINEAR 
2860     or LBA32 might help. 
2861
2862 If the error occurred during a write operation, the error code (two hex 
2863 digits) is prefixed with a "W". Although write errors don't affect the boot 
2864 process, they might indicate a severe problem, because they usually imply 
2865 that LILO has tried to write to an invalid location. If spurious write 
2866 errors occur on a system, it might be a good idea to configure LILO to run 
2867 read-only (see section "Build-time configuration").
2868
2869 Generally, invalid geometry and attempts to use more than two disks without 
2870 a very modern BIOS may yield misleading error codes. Please check carefully 
2871 if /sbin/lilo doesn't emit any warnings. Then try using the LINEAR or LBA32 
2872 option (see section "Global options").
2873
2874
2875 Other problems
2876 --------------
2877
2878 This section contains a collection of less common problems that have been 
2879 observed. See also section "Installation of other operating systems" for 
2880 general remarks on using LILO with other operating systems. Some of the 
2881 problems are obscure and so are the work-arounds.
2882
2883   - If LILO doesn't go away even if you erase its files, format your Linux 
2884     partition, etc., you've probably installed LILO as your MBR and you've 
2885     forgotten to deinstall it before deleting its files. See section "LILO 
2886     de-installation" for what you can do now. 
2887   - For yet unknown reasons, LILO may fail on some systems with AMI BIOS if 
2888     the "Hard Disk Type 47 RAM area" is set to "0:300" instead of "DOS 1K". 
2889   - Some disk controller BIOSes perform disk geometry/address translations 
2890     that are incompatible with the way the device's geometry is seen from 
2891     Linux, i.e. without going through the BIOS. Particularly, large IDE 
2892     disks and some PCI SCSI controllers appear to have this problem. In 
2893     such cases, either the translated geometry has to be specified in a 
2894     DISK section or the sector address translation can be deferred by using 
2895     the LINEAR option. In a setup where floppies are not normally used for 
2896     booting, the LINEAR approach should be preferred, because this avoids 
2897     the risk of specifying incorrect numbers. 
2898   - OS/2 is said to be bootable from a logical partition with LILO acting 
2899     as the primary boot selector if LILO is installed on the MBR, the OS/2 
2900     BootManager is on an active primary partition and LILO boots 
2901     BootManager. Putting LILO on an extended partition instead is said to 
2902     crash the OS/2 FDISK in this scenario.
2903
2904      Note that booting LILO from BootManager (so BootManager is the primary 
2905     selector) or booting OS/2 directly from a primary partition (without 
2906     BootManager) should generally work. See also section "Installation of 
2907     other operating systems". 
2908   - Windows NT is reported to be bootable with LILO when LILO acts as the 
2909     MBR and the Windows NT boot loader is on the DOS partition. However, 
2910     NT's disk manager complains about LILO's MBR when trying to edit the 
2911     partition table. 
2912   - Some PC UNIX systems (SCO and Unixware have been reported to exhibit 
2913     this problem) depend on their partition being active. See section 
2914     "Partition table manipulation" for how this can be accomplished. 
2915   - Future Domain TMC-1680 adapters with the BIOS versions 3.4 and 3.5 
2916     assign BIOS device numbers in the wrong order, e.g. on a two-disk 
2917     system, /dev/sda becomes  0x81  and /dev/sdb becomes  0x80 . This can 
2918     be fixed with the following DISK section:
2919      disk=/dev/sda bios=0x81 disk=/dev/sdb bios=0x80
2920      Note that this is only valid for a two-disk system. In three-disk 
2921     systems, /dev/sdc would become  0x80 , etc. Also, single-disk systems 
2922     don't have this problem (and the "fix" would break them). 
2923   - Some BIOSes don't properly recognize disks with an unusual partition 
2924     table (e.g. without any partition marked active) and refuse to boot 
2925     from them. This can also affect the second hard disk and the problem 
2926     may only occur if the system is booted in a particular way (e.g. only 
2927     after a cold boot). 
2928   - On some systems, using LINEAR and COMPACT or LBA32 and COMPACT together 
2929     leads to a boot failure. The exact circumstances under which this 
2930     happens are still unknown.