4 title: lilo documentation
12 lilo - install boot loader of LiLO
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
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.
44 =item B<-A> I<master-device [N]>
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.
55 =item B<-b> I<bootdev>
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
62 =item B<-B> I<bitmap-file>
64 Define a bitmap file for the boot-time graphics screen, preferably one already
65 pre-processed with the I<-E> option.
69 Enable map compaction. This will merge read requests from adjacent sectors.
70 Speeds up the booting especially from floppy.
72 =item B<-C> I<config-file>
74 Set another pathname and filename for the configuration file. The default
75 configuration file is F</etc/lilo.conf>.
77 =item B<-d> I<delay-time>
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.
84 This switch will be overridden by the appearance of I<prompt> in the
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.
92 =item B<-E> I<filename.xxx>
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)>.)
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
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.
108 =item B<-f> I<disk-tab>
110 Set another disk geometry parameter file. The default is F</etc/disktab>.
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.
118 Compare with I<-P ignore>, which bypasses certain partition table checks.
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)>.
127 Override fatal halt if a RAID array does not have all disks active.
129 =item B<-I> I<label [D|a|i|k|r|R]>
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.
140 Generate 24-bit linear sector addresses instead of cylinder/head/sector addresses.
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).
148 =item B<-m> I<map-file>
150 Use another map file instead of the default file /boot/map.
152 =item B<-M> I<master-device> B<{mbr|ext}>
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.
166 Require interactive entry of all passwords set as "" in the configuration file.
168 =item B<-P> I<{fix|ignore|<global-option>}>
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.
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
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).
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.
196 =item B<-r> I<root-directory>
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.
202 =item B<-R> I<command-line>
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.
210 =item B<-s> I<save-file>
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.
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.
222 =item B<-S> I<save-file>
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).
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.
233 =item B<-T> I<option>
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:
239 help print a list of available diagnostics
240 ChRul list the partition types subject to
242 EBDA list Extended BIOS Data Area information
243 geom=<drive> list drive geometry for bios drive;
245 geom list drive geometry for all drives
246 table=<drive> list the primary partition table;
248 video list graphic modes available to boot
251 =item B<-u> I<[device-name]>
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
257 =item B<-U> I<[device-name]>
259 The same as '-u', but do not check the time-stamp.
261 =item B<-v> I<[number]>
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.
268 Print version number.
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.
275 =item B<-x> I<option>
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).
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.
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.
294 When used with the '-M' switch, clears the Volume-ID. Usually used in the
295 following sequence to generate a new Volume-ID:
300 =item B<-Z> I<option>
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='.
309 =head1 CONFIG OPTIONS
311 The above command line options correspond to the key words in the config file
314 -b bootdev boot=bootdev
316 -B file.bmp bitmap=file.bmp
319 -D label default=label
324 -m mapfile map=mapfile
326 -P ignore ignore-table
328 -S file force-backup=file
331 -x option raid-extra-boot=option
332 -Z option bios-passes-dl=option
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
346 Locks the command line, as though 'lock' had been defined in F</etc/lilo.conf>.
348 =item B<mem=###[,K,M,G]>
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
356 Suppresses the BIOS data check. This option is reserved for use with
357 non-IBM-compliant BIOS's which hang with the lines:
359 Loading...............
362 =item B<vga=[ASK,EXT,EXTENDED,NORMAL,###,0x###]>
364 Allows overriding the default video mode upon kernel startup.
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
381 01 invalid disk command
382 02 address mark not found
383 03 disk write-protected
385 06 floppy disk removed
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)
395 FF sense operation failed
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).
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.
411 All second stage loader error messages are English text and try to pinpoint,
412 more or less successfully, the point of failure.
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.
421 =head1 COPYRIGHT and LICENSE
423 Copyright (C) 1992-1998 Werner Almesberger
424 Copyright (C) 1999-2007 John Coffman
425 Copyright (C) 2009-2013 Joachim Wiedorn
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
433 B<lilo> was written by:
435 Werner Almesberger (version 0 to 21),
436 John Coffman (version 21.2 to 22.8),
437 Joachim Wiedorn (since version 23.0).
439 This manual page was written by Werner Almesberger and Joachim Wiedorn
440 <ad_debian at joonet.de>.
446 B<lilo-uuid-diskid>(8),