Begin with next version
[rrq/maintain_lilo.git] / man / lilo.pod
1 =for header
2 manpage:  LILO
3 section:  8
4 title:    lilo documentation
5 version:  23.3
6 datum:    2013-05-01
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 an extended partition depends on the characteristics
53 of the OS. LILO boot records for Linux may be booted from an extended 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 extended 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 extended 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 =item B<-s> I<save-file>
211
212 When lilo writes a new boot sector, it preserves the former contents of the boot
213 sector in a file, named by default /boot/boot.NNNN, where NNNN is the hexadecimal
214 representation of the major and minor device numbers of the drive/partition.
215
216 This option defines the backup save file in one of three ways: a save directory
217 (default is '/boot') using the default filename 'boot.NNNN' in the defined
218 directory; a pathname template to which '.NNNN' is appended (default would be
219 '/boot/boot'); or the full pathname of the file, which must include the correct
220 '.NNNN' suffix. When used with the -u option, the full file pathname must be set.
221
222 =item B<-S> I<save-file>
223
224 Normally lilo will not overwrite an existing boot sector save file. This options
225 says that overwriting is to be forced. As with -s, the setting may be of a save
226 directory, pathname template, or full pathname (which includes the '.NNNN' suffix).
227
228 =item B<-t>
229
230 Test only. Do not really write a new boot sector or map file. Use together with
231 B<-v> to find out what lilo is about to do.
232
233 =item B<-T> I<option>
234
235 Print out system information, some of it extracted from system bios. This is more
236 convenient than booting the LILO diagnostic floppy on problem systems. B<option>
237 may be any one of the following:
238
239  help          print a list of available diagnostics
240  ChRul         list the partition types subject to
241                  Change-Rules
242  EBDA          list Extended BIOS Data Area information
243  geom=<drive>  list drive geometry for bios drive;
244                  e.g. geom=0x80
245  geom          list drive geometry for all drives
246  table=<drive> list the primary partition table;
247                  e.g. table=/dev/sda
248  video         list graphic modes available to boot
249                  loader
250
251 =item B<-u> I<[device-name]>
252
253 Uninstall lilo by copying the saved boot sector back. The B<-s> and B<-C> switches
254 may be used with this option. The device-name is optional. A time-stamp is
255 checked.
256
257 =item B<-U> I<[device-name]>
258
259 The same as '-u', but do not check the time-stamp.
260
261 =item B<-v> I<[number]>
262
263 Increase verbosity. Giving one to five B<-v> options will make lilo more verbose.
264 The B<number> (range 1..5) set verbosity level.
265
266 =item B<-V>
267
268 Print version number.
269
270 =item B<-w>I<[+|-]>
271
272 Used as B<-w> or B<-w-> to suppress warning messages. Used as '-w+' to override
273 I<'nowarn'> in the configuration file and show warning messages.
274
275 =item B<-x> I<option>
276
277 For RAID installations  only. The option may be any of the keywords: I<none>,
278 I<auto>, I<mbr>, I<mbr-only>, or a comma separated list of additional boot
279 devices (no spaces allowed in the list).
280
281 RAID installations write the boot record to the RAID partition. Conditional
282 writing of MBRs may occur to aid in making the RAID set bootable in a recovery
283 situation, but all default actions may be overridden. Action similar to previous
284 versions is achieved using the I<'-x mbr-only'> switch.
285
286 =item B<-X>
287
288 Reserved for LILO internal use. May produce different output for different LILO
289 versions. The line beginning "CFLAGS=" will contain the compiler options used to
290 generate this version of LILO.
291
292 =item B<-z>
293
294 When used with the '-M' switch, clears the Volume-ID.  Usually used in the 
295 following sequence to generate a new Volume-ID:
296
297     lilo -z -M /dev/hda
298     lilo -M /dev/hda
299
300 =item B<-Z> I<option>
301
302 Tells the boot installer whether special precautions need to be taken because
303 the BIOS fails to pass the correct device code in DL (-Z0). Or may specify
304 that the BIOS always gets DL right (-Z1). Corresponds to, and overrides, the
305 configuration file option 'bios-passes-dl='.
306
307 =back
308
309 =head1 CONFIG OPTIONS
310
311 The above command line options correspond to the key words in the config file
312 indicated below.
313
314               -b bootdev       boot=bootdev
315
316               -B file.bmp      bitmap=file.bmp
317               -c               compact
318               -d dsec          delay=dsec
319               -D label         default=label
320               -f file          disktab=file
321               -g               geometric
322               -l               linear
323               -L               lba32
324               -m mapfile       map=mapfile
325               -P fix           fix-table
326               -P ignore        ignore-table
327               -s file          backup=file
328               -S file          force-backup=file
329               -v [N]           verbose=N
330               -w               nowarn
331               -x option        raid-extra-boot=option
332               -Z option        bios-passes-dl=option
333
334
335 =head1 BOOT OPTIONS
336
337 The  options  described  here may be specified at boot time on the command line
338 when a kernel image is booted. These options are processed by LILO, and are
339 removed from the command line before it is passed to the kernel, unless otherwise
340 noted.
341
342 =over 4
343
344 =item B<lock>
345
346 Locks the command line, as though 'lock' had been defined in F</etc/lilo.conf>.
347
348 =item B<mem=###[,K,M,G]>
349
350 Set the maximum memory in the system in bytes, kilobytes, megabytes or gigabytes.
351 This option is not removed from the command line, and is always passed to the
352 kernel.
353
354 =item B<nobd>
355
356 Suppresses the BIOS data check. This option is reserved for use with
357 non-IBM-compliant BIOS's which hang with the lines:
358
359     Loading...............
360     BIOS data check
361
362 =item B<vga=[ASK,EXT,EXTENDED,NORMAL,###,0x###]>
363
364 Allows overriding the default video mode upon kernel startup.
365
366 =back
367
368 =head1 BOOT ERRORS
369
370 The  boot process takes place in two stages. The first stage loader is a single
371 sector, and is loaded by the BIOS or by the loader in the MBR. It loads the
372 multi-sector second stage loader, but is very space limited. When the first
373 stage  loader  gets  control, it types  the  letter 'L'; when it is ready to
374 transfer control to the second stage loader it types the letter 'I'. If any
375 error occurs, like a disk read error, it will put out a hexadecimal error code
376 and then re-try the operation.  All hex error codes are BIOS return values,
377 except for the lilo-generated codes: 40, 99 and 9A. A partial list of error
378 codes follows:
379
380     00  no error
381     01  invalid disk command
382     02  address mark not found
383     03  disk write-protected
384     04  sector not found
385     06  floppy disk removed
386     08  DMA overrun
387     0A  bad sector flag
388     0B  bad track flag
389     20  controller failure
390     40  seek failure (BIOS)
391     40  cylinder>1023 (LILO)
392     99  invalid second stage index sector (LILO)
393     9A  no second stage loader signature (LILO)
394     AA  drive not ready
395     FF  sense operation failed
396
397 Error code 40 is generated by the BIOS, or by LILO during the conversion of a
398 linear (24-bit) disk address to a geometric (C:H:S) address. On older systems
399 which do not support lba32 (32-bit) addressing, this error may also be generated.
400 Errors 99 and 9A usually mean the map file ('-m' or 'map=') is not readable,
401 likely because LILO was not re-run after some system change, or there is a
402 geometry mismatch between what LILO used (lilo -v3 to display) and what is
403 actually being used by the BIOS (one of the lilo diagnostic  disks, available
404 in the source distribution, may be needed to diagnose this problem).
405
406 When  the second stage loader has received control from the first stage, it
407 prints the letter 'L', and when it has initialized itself, including verifying
408 the "Descriptor Table" - the list of kernels/others to boot - it will print
409 the letter "O", to form the full word "LILO", in uppercase.
410
411 All second stage loader error messages are English text and try to pinpoint,
412 more or less successfully, the point of failure.
413
414 =head1 BUGS
415
416 Configuration file options 'backup' and 'force-backup' should specify a backup
417 directory or backup file pathname template on all RAID installations. Use of an
418 explicit filename may not allow multiple backup files to be created correctly.
419 It is best to use the  default mechanism, as it works correctly in all cases.
420
421 =head1 COPYRIGHT and LICENSE
422
423  Copyright (C) 1992-1998 Werner Almesberger
424  Copyright (C) 1999-2007 John Coffman
425  Copyright (C) 2009-2013 Joachim Wiedorn
426
427 Redistribution and use in source and binary forms, with or without 
428 modification, are permitted under the terms of the BSD license found in 
429 the COPYING file.
430
431 =head1 AUTHOR
432
433 B<lilo> was written by:
434
435  Werner Almesberger (version 0 to 21),
436  John Coffman (version 21.2 to 22.8),
437  Joachim Wiedorn (since version 23.0).
438
439 This manual page was written by Werner Almesberger and Joachim Wiedorn
440 <ad_debian at joonet.de>.
441
442 =head1 SEE ALSO
443
444 B<lilo.conf>(5),
445 B<liloconfig>(8), 
446 B<lilo-uuid-diskid>(8),
447 B<mkrescue>(8), 
448 B<fdisk>(8),
449 B<mkinitrd>(8)
450
451 =cut