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 a logical partition depends on the characteristics
53 of the OS. LILO boot records for Linux may be booted from a logical 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 logical 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 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.
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 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.
217 =item B<-s> I<save-file>
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.
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.
229 =item B<-S> I<save-file>
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).
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.
240 =item B<-T> I<option>
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:
246 help print a list of available diagnostics
247 ChRul list the partition types subject to
249 EBDA list Extended BIOS Data Area information
250 geom=<drive> list drive geometry for bios drive;
252 geom list drive geometry for all drives
253 table=<drive> list the primary partition table;
255 video list graphic modes available to boot
258 =item B<-u> I<[device-name]>
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
264 =item B<-U> I<[device-name]>
266 The same as '-u', but do not check the time-stamp.
268 =item B<-v> I<[number]>
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.
275 Print version number.
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.
282 =item B<-x> I<option>
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).
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.
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.
301 When used with the '-M' switch, clears the Volume-ID. Usually used in the
302 following sequence to generate a new Volume-ID:
307 =item B<-Z> I<option>
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='.
316 =head1 CONFIG OPTIONS
318 The above command line options correspond to the key words in the config file
321 -b bootdev boot=bootdev
323 -B file.bmp bitmap=file.bmp
326 -D label default=label
331 -m mapfile map=mapfile
333 -P ignore ignore-table
335 -S file force-backup=file
338 -x option raid-extra-boot=option
339 -Z option bios-passes-dl=option
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
353 Locks the command line, as though 'lock' had been defined in F</etc/lilo.conf>.
355 =item B<mem=###[,K,M,G]>
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
363 Suppresses the BIOS data check. This option is reserved for use with
364 non-IBM-compliant BIOS's which hang with the lines:
366 Loading...............
369 =item B<vga=[ASK,EXT,EXTENDED,NORMAL,###,0x###]>
371 Allows overriding the default video mode upon kernel startup.
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
388 01 invalid disk command
389 02 address mark not found
390 03 disk write-protected
392 06 floppy disk removed
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)
402 FF sense operation failed
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).
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.
418 All second stage loader error messages are English text and try to pinpoint,
419 more or less successfully, the point of failure.
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.
428 =head1 COPYRIGHT and LICENSE
430 Copyright (C) 1992-1998 Werner Almesberger
431 Copyright (C) 1999-2007 John Coffman
432 Copyright (C) 2009-2014 Joachim Wiedorn
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
440 B<lilo> was written by:
442 Werner Almesberger (version 0 to 21),
443 John Coffman (version 21.2 to 22.8),
444 Joachim Wiedorn (since version 23.0).
446 This manual page was written by Werner Almesberger and Joachim Wiedorn
447 <joodevel at joonet.de>.
453 B<lilo-uuid-diskid>(8),