Update of debian/copyright file (DEP-5)
[rrq/maintain_lilo.git] / man / lilo.8
1 '\" t
2 .\" @(#)lilo.8 1.0 950728 aeb
3 .\" This page is based on the lilo docs, which carry the following
4 .\" COPYING condition:
5 .\"
6 .\" LILO program code, documentation and auxiliary programs are
7 .\" Copyright 1992-1998 Werner Almesberger.
8 .\" Extensions to LILO, documentation and auxiliary programs are
9 .\" Copyright 1999-2005 John Coffman.
10 .\" All rights reserved by the respective copyright holders.
11 .\" 
12 .\" Redistribution and use is subject to the terms set forth in
13 .\" the file COPYING in the source directory.
14 .\"
15 .\" Original version, Andries Brouwer (aeb@cwi.nl), 950728
16 .\" Added t directive, as Daniel Quinlan asked, 950824
17 .\" Added L switch, John Coffman, 991118
18 .\" Added T switch, John Coffman, 001001
19 .\" Added p switch, John Coffman, 010402
20 .\" Added x switch, John Coffman, 010409
21 .\" Added A switch, John Coffman, 010417
22 .\" Added M switch, John Coffman, 010417
23 .\" Added g switch, John Coffman, 010526
24 .\" Added z switch, John Coffman, 010829
25 .\" Added E switch, John Coffman, 020409
26 .\" Added B,F & X switches, John Coffman, 020418
27 .\" Added "k" option to I switch, John Coffman, 020609
28 .\" Added Z switch, John Coffman, 030314
29 .\" Added I switch options "D" and "a", John Coffman, 030513
30 .\" Added I switch option "R", John Coffman, 041116
31 .\" Added H switch, John Coffman, 050927
32 .\"
33 .TH LILO 8 "07 Oct 2005"
34 .SH NAME
35 lilo \- install boot loader
36 .SH SYNOPSIS
37 Main function:
38 .LP
39 .B " /sbin/lilo"
40 \- install boot loader
41 .LP
42 Auxiliary uses:
43 .LP
44 .B " /sbin/lilo -A"
45 \- activate/show active partition
46 .br
47 .B " /sbin/lilo -E"
48 \- edit header or update a bitmap file
49 .br
50 .B " /sbin/lilo -I"
51 \- inquire path name of current kernel
52 .br
53 .B " /sbin/lilo -M "
54 \- write a Master Boot Loader on a device
55 .br
56 .B " /sbin/lilo -q"
57 \- query map
58 .br
59 .B " /sbin/lilo -R"
60 \- set default command line for next reboot
61 .br
62 .B " /sbin/lilo -T"
63 \- tell more about specified topic
64 .br
65 .B " /sbin/lilo {-u|-U}"
66 \- uninstall LILO boot loader
67 .SH DESCRIPTION
68 .LP
69 .B lilo
70 installs a boot loader that will be activated the next time you boot your
71 system. The default configuration file
72 .I "/etc/lilo.conf"
73 (see 'man lilo.conf') will contain most options, but many, including
74 those which override the
75 configuration file, may be specified on the command line.
76 .LP
77 .TP
78 .BI "\-\^A " "master-device [ N ]"
79 Used with a single argument, inquire of active partition on device
80 .IR master-device ;
81 e.g., \fI/dev/hda\fP.  With N==0, deactivate all partitions on the device.  With
82 N in the range [1..n], activate the specified partition and deactivate all
83 others.  Normally, only primary partitions [1..4] may be activated, but if
84 the Extended Master Boot Loader is present on the Master Boot Record
85 of the device
86 (see the \fI-M\fP option), any partition may be made active.  Whether the
87 actual OS in the partition will boot from an extended partition depends on
88 the characteristics of the OS.  LILO boot records for Linux
89 may be booted from an extended partition.
90 .TP
91 .BI "\-\^b " bootdev
92 Specify the boot device; i.e., where the boot loader will be installed.
93 "\-b /dev/hda" specifies the Master Boot Record; "\-b /dev/sdb5" specifies
94 the first extended partition on the second SCSI disk.
95 .TP
96 .BI "\-\^B " bitmap-file
97 Specify a bitmap file for the boot-time graphics screen, preferably one
98 already pre-processed with the 'lilo \-E' command.
99 .TP
100 .B "\-\^c"
101 Enable map compaction. This will merge read requests from adjacent
102 sectors. Speeds up the booting (especially from floppy).
103 .TP
104 .BI "\-\^C " config-file
105 .B lilo
106 Specify an alternate pathname for the configuration file.
107 This option overrides the use of the default configuration file,
108 .IR "/etc/lilo.conf" .
109 .TP
110 .BI "\-\^d " delay
111 Specifies the delay time in tenths of a second (20 = 2 sec) before
112 automatically booting the first image.  Gives you time to interrupt the
113 automatic boot process with Shift, Alt, Ctrl, ScrollLock, or CapsLock.  If
114 interrupted, the `boot:' prompt is displayed.  This switch is overridden by
115 the appearance of
116 .I prompt
117 in the configuration file.
118 .TP
119 .BI "\-\^D " label
120 Use the kernel with the given label, instead of the first one
121 in the list, as the default kernel to boot.
122 .TP
123 .BI "\-\^E " filename.ext
124 If \fB.ext\fP is \fB.bmp\fP, then take the file to be a bitmap graphic file
125 for use in the "bitmap=" configuration file directive.  Enter an interactive
126 editor to create or update the color/placement information in the
127 bitmap file LILO header.  (see 'bmp-colors', 'bmp-table', and 'bmp-timer'
128 on the man page for 'lilo.conf(5)'.)
129 .sp
130 If \fB.ext\fP is \fB.dat\fP, then take the file to be a configuration file which
131 specifies bitmap graphic parameters, which are transferred into the LILO
132 header in the bitmap file of the same name.
133 .sp
134 When a \fB.bmp\fP file is modified using a graphics editor (e.g., GIMP), the
135 LILO header will be lost.  It can be restored using the \fB.dat\fP file,
136 which is used as a text-based backup for the LILO header information.
137 .TP
138 .BI "\-\^f " disk-tab
139 Specify disk geometry parameter file. (The default is
140 .IR /etc/disktab .)
141 .TP
142 .BI "\-\^F"
143 Override boot sector check for filesystems (e.g., swap, XFS, ...) which might be
144 destroyed by the installation of the LILO boot sector on the first sector of
145 the partition.  These filesystems use the first sector as a superblock.
146
147 Compare with "\-P ignore", which bypasses certain partition table checks.
148 .TP
149 .BI "\-\^g"
150 Generate cylinder/head/sector (geometric) disk addresses.  Limited to
151 cylinders up to 1023.  Forces compatibility with older versions of LILO.
152 .TP
153 .BI "\-\^H"
154 Override fatal halt when a RAID array does not have all disks active.
155 .TP
156 .BI "\-\^i " boot-loader
157 Specify a file to be used as the new boot loader. (The default is
158 .IR /boot/boot.b .)
159 .TP
160 .BI "\-I " "label [D|a|i|k|r|R]"
161 .B label
162 is taken to be the name of an image specified in the configuration file.
163 This command will print the path name of the corresponding kernel file, keytable
164 file, initial ramdisk file, root specification, or "append="
165 string ("i", "k", "r", "R", or "a" option). 
166 The "D" option ignores the
167 .B label
168 parameter, and prints the default "image=" label, or first "image=" label
169 if no default
170 .BI image
171 is specified.
172 .TP
173 .BI "\-\^l"
174 Generate 24-bit linear sector addresses instead of cylinder/head/sector
175 addresses.
176 .TP
177 .BI "\-\^L"
178 Generate 32-bit Logical Block Addresses instead of cylinder/head/sector
179 addresses, allowing
180 access to all partitions on disks with more than 1024 cylinders.
181 .TP
182 .BI "\-\^m " map-file
183 Use specified map file instead of the default.
184 .TP
185 .BI "\-\^M " "master-device " "[mbr|ext]"
186 Install a Master Boot Record on the device specified as
187 .IR master-device ,
188 selecting the Standard or Extended Master Boot Loader per the option.
189 The primary partition table on
190 .I master-device
191 is undisturbed.  If no valid Volume-ID (serial number)
192 is present, then generate one
193 and write it to the MBR.  If \fBmbr\fP is specified, the Standard Master
194 Boot Loader
195 will search partitions 1-4 for an active flag, and boot the flagged
196 partition.  Only one active flag is allowed.  If \fBext\fP is specified, the
197 search for an active partition will include extended partitions as well. 
198 The presence of the Extended Master Boot Loader on the
199 Master Boot Record (MBR = sector 0) of a disk
200 affects the operation of the \fI-A\fP option.
201 .TP
202 .BI "\-\^p"
203 Require interactive entry of all passwords specified as
204 .B """""" 
205 in the configuration file.
206 .TP
207 .BI "\-\^P " "{fix|ignore|\<global-option\>}"
208 Fix or ignore `corrupt' partition tables, i.e., partition tables
209 with linear and cylinder/head/sector addresses that do not correspond.
210 Always try
211 .I -P ignore
212 first, as
213 .I -P fix
214 will re-write the partition table, possibly destroying all partitions
215 on the disk.
216
217 .I -P ignore
218 is also used to bypass the partition table check for partition types within
219 the partition table which
220 might not allow the installation of a LILO boot sector.  Compare with the
221 "\-F" flag, which overrides the check of the actual boot sector.
222
223 .I "-P <global-option>"
224 allows the passing of any global option which may appear in the global
225 section (top) of the configuration file (/etc/lilo.conf).  For instance,
226 .I -P nowarn
227 will pass the "nowarn" option, just as though "nowarn" appeared in the
228 configuration file (same as the "\-w" switch).  Similarly,
229 .I -P timeout=50
230 will add or override the "timeout=" line in the configuration file.  Note
231 that the general
232 .I -P
233 switch actually duplicates a number of command line option switches. 
234 However, it is not strictly the same as some switches whick cause an
235 override of other options; e.g., "\-g" (\-P geometric), "\-L" (\-P lba32).
236 .TP
237 .B \-\^q
238 List the currently mapped files.
239 .B lilo
240 maintains a file, by default
241 .IR "/boot/map" ,
242 containing the name and location of the kernel(s) to boot.
243 This option will list the names therein.  Use with \fB-v\fP for
244 more detailed information about the installed boot loader.
245 .TP
246 .BI "\-\^r " root-directory
247 Before doing anything else, do a \fIchroot\fP to the indicated
248 directory. The new root directory must contain a
249 .I /dev
250 directory, and may need a
251 .I /boot
252 directory. It may also need an
253 .IR /etc/lilo.conf " file."
254 .TP
255 .BI "\-\^R " "command line"
256 This option sets the default command for the boot loader the next
257 time it executes. The boot loader will then erase this line: this
258 is a once-only command. It is typically used in reboot scripts,
259 just before calling `shutdown \-r'.  Used without any arguments, it will
260 cancel a \fIlock\fP-ed or \fIfallback\fP command line.
261 .TP
262 .BI "\-\^s " save-file
263 When
264 .B lilo
265 writes a new boot sector, it preserves the former contents of the sector
266 in a file, named by default \fI/boot/boot.NNNN\fP,
267 where NNNN is the hexadecimal representation of the major and minor
268 device numbers of the drive/partition. This option specifies the backup
269 save file in one of three ways: a save directory (default is '/boot') using
270 the default filename 'boot.NNNN' in the specified directory; a pathname template
271 to which '.NNNN' is appended (default would be '/boot/boot');
272 or the full pathname of the file, which must include the correct '.NNNN'
273 suffix. When used with the
274 \fB-u\fP option, the full file pathname must be specified.
275 .TP
276 .BI "\-\^S " save-file
277 Normally,
278 .B lilo
279 will not overwrite an existing boot sector save file. This options says
280 that overwriting is to be forced. As with \fB-s\fP, the specification may be of a
281 save directory, pathname template, or full pathname (which includes the '.NNNN'
282 suffix.)
283 .TP
284 .BI "\-\^t "
285 Test only. Do not really write a new boot sector or map file.
286 Use together with \fB-v\fP to find out what
287 .B lilo
288 is about to do.
289 .TP
290 .BI "\-\^T " option
291 Print out system information, some of it extracted from the system
292 bios.  This is more convenient than booting the LILO diagnostic
293 floppy on problem systems.
294 .I option
295 may be any one of the following:
296 .IP
297 .nf
298    help  - print a list of available diagnostics
299    ChRul - list the partition types subject to
300            Change-Rules
301    EBDA  - list Extended BIOS Data Area information
302    geom=<drive> list drive geometry for bios drive;
303            e.g., geom=0x80
304    geom  - list drive geometry for all drives
305    table=<drive> list the primary partition table;
306            e.g., table=/dev/sda
307    video - list graphic modes available to boot
308            loader
309 .fi
310 .TP
311 .BI "\-\^u " [device-name]
312 Uninstall \fIlilo\fP by copying the saved boot sector back.
313 The '\-s' and '\-C' switches may be used with this option.
314 The \fIdevice-name\fP is optional.  A time-stamp is checked.
315 .TP
316 .BI "\-\^U " [device-name]
317 Idem, but do not check the time-stamp.
318 .TP
319 .B "\-\^v"
320 Increase verbosity. Giving one to five \fB-v\fP options
321 will make lilo more verbose, or use, \fB-v\fP \fIn\fP (n=1..5) to
322 set verbosity level '\fIn\fP'.
323 .TP
324 .B "\-\^V"
325 Print version number.
326 .TP
327 .B "\-\^w"
328 Used as \fB-w\fP or \fB-w-\fP, suppress warning messages.
329 Used as \fB-w+\fP, override \fInowarn\fP in
330 the configuration file, and show warning messages.
331 .TP
332 .BI "\-\^x " option
333 For RAID installations only.  The option may be any of the keywords
334 .IR none ,
335 .IR auto ,
336 .IR mbr ,
337 .IR mbr-only ,
338 or a comma separated list of additional boot devices (no spaces allowed in
339 the list).
340 .TP
341 .BI "\-\^X"
342 Reserved for LILO internal use.  May produce different
343 output for different LILO versions. The line beginning "CFLAGS="
344 will contain the compiler options used to generate this version of LILO.
345 .TP
346 .B "\-\^z"
347 When used with the `\-M' switch, clears the Volume-ID.  Usually used
348 in the following sequence to generate a new Volume-ID:
349 .nf
350      lilo \-z \-M /dev/hda
351      lilo \-M /dev/hda
352 .fi
353 .br
354 .TP
355 .BI "\-\^Z " option
356 Tells the boot installer whether special precautions need to be taken
357 because the BIOS fails to pass the correct device code in DL (\-Z0). Or may
358 specify that the BIOS always gets DL right (\-Z1). Corresponds to, and
359 overrides, the configuration file option 'bios-passes-dl='.
360 .LP
361 The above command line options correspond to the key words
362 in the config file indicated below.
363 .IP
364 .TS
365 l l.
366 \-b bootdev     boot=bootdev
367 \-B file.bmp    bitmap=file.bmp
368 \-c     compact
369 \-d dsec        delay=dsec
370 \-D label       default=label
371 \-i boot-loader install=boot-loader
372 \-f file        disktab=file
373 \-g     geometric
374 \-l     linear
375 \-L     lba32
376 \-m mapfile     map=mapfile
377 \-P fix fix-table
378 \-P ignore      ignore-table
379 \-s file        backup=file
380 \-S file        force-backup=file
381 \-v [N] verbose=N
382 \-w     nowarn
383 \-x option      raid-extra-boot=option
384 \-Z option      bios-passes-dl=option
385 .TE
386 .SH "BOOT OPTIONS"
387 The options described here may be specified at boot time on
388 the command line when a
389 kernel image is booted.  These options are processed by LILO, and are
390 removed from the command line before it is passed to the kernel,
391 unless otherwise noted.
392 .LP
393 .TP
394 .BI lock
395 Locks the command line, as though 'lock' had been specified in 'lilo.conf.'
396 .TP
397 .BI "mem=###[,K,M,G]"
398 Specifies the maximum memory in the system in bytes, kilobytes, megabytes,
399 or gigabytes.
400 This option is not removed from the command line, and is always passed to
401 the kernel.
402 .TP
403 .BI nobd
404 Suppresses the BIOS data check.  This option is reserved for use with
405 non-IBM-compliant BIOS's which hang with the lines:
406 .sp
407 .nf
408      Loading...............
409      BIOS data check 
410 .fi
411 .TP
412 .BI "vga=[ASK,EXT,EXTENDED,NORMAL,###,0x###]"
413 Allows overriding the default video mode upon kernel startup.
414 .br
415 .SH BOOT ERRORS
416 The boot process takes place in two stages.  The first stage loader is a
417 single sector, and is loaded by the BIOS or by the loader in the MBR.  It
418 loads the multi-sector second stage loader, but is very space limited.  When
419 the first stage loader gets control, it types the letter "L"; when it is
420 ready to transfer control to the second stage loader it types the letter
421 "I".  If any error occurs, like a disk read error, it will put out a
422 hexadecimal error code, and then it will re-try the operation.  All hex
423 error codes are BIOS return values, except for the lilo-generated 40, 99 and 9A.
424 A partial list of error codes follows:
425 .br
426 .IP
427 .TS
428 l l.
429 00  no error
430 01  invalid disk command
431 02  address mark not found
432 03  disk write-protected
433 04  sector not found
434 06  floppy disk removed
435 08  DMA overrun
436 0A  bad sector flag
437 0B  bad track flag
438 20  controller failure
439 40  seek failure (BIOS)
440 40  cylinder>1023 (LILO)
441 99  invalid second stage index sector (LILO)
442 9A  no second stage loader signature (LILO)
443 AA  drive not ready
444 FF  sense operation failed
445 .TE
446 .br
447 .LP
448 Error code 40 is generated by the BIOS, or by LILO during the conversion of
449 a linear (24-bit) disk address to a geometric (C:H:S) address.  On older
450 systems which do not support lba32 (32-bit) addressing, this error may also
451 be generated.  Errors 99 and 9A usually mean the map file (\-m or map=) is
452 not readable, likely because LILO was not re-run after some system change,
453 or there is a geometry mis-match between what LILO used (lilo \-v3 to
454 display) and what is actually being used by the BIOS (one of the lilo
455 diagnostic disks, available in the source distribution, may be needed to
456 diagnose this problem).
457
458 When the second stage loader has received control from the first stage, it
459 prints the letter "L", and when it has initialized itself, including
460 verifying the "Descriptor Table" \- the list of kernels/others to boot \- it
461 will print the letter "O", to form the full word "LILO", in uppercase.
462
463 All second stage loader error messages are English text, and try to
464 pinpoint, more or less successfully, the point of failure.
465 .br
466 .SH INCOMPATIBILITIES
467 .B lilo
468 is known to have problems with the
469 .I reiserfs
470 introduced with the 2.2.x kernels, unless the file system is
471 mounted with the 'notail' option.  This incompatibility has been
472 resolved with reiserfs 3.6.18 and lilo 21.6.
473 .I reiser4
474 introduced with the 2.5.x kernels requires lilo 22.5.2 or later.
475 .sp
476 Beginning with version 22.0, RAID installations write the boot record to
477 the RAID partition. Conditional writing of MBRs may occur to aid in making
478 the RAID set bootable in a recovery situation, but all default actions may
479 be overridden. Action similar to previous versions is
480 achieved using the `\-x mbr-only' switch.
481 .SH BUGS
482 Configuration file options `backup' and `force-backup'
483 should specify a backup directory or backup file pathname template on
484 all RAID installations. Use of an explicit filename may not allow multiple
485 backup files to be created correctly. It is best to use the default mechanism,
486 as it works correctly in all cases.
487 .SH "SEE ALSO"
488 fdisk(8), lilo.conf(5), mkrescue(8), mkinitrd(8).
489 .sp
490 The lilo distribution comes with very extensive TeX documentation through
491 Version 21.  Text file README's in the source directory provide updates on
492 more recent topics.
493 .SH "AUTHORS"
494 Werner Almesberger <almesber@lrc.epfl.ch> (versions 0 to 21)
495 .br
496 John Coffman <johninsd@san.rr.com> (21.2 to present date)