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