From: Joachim Wiedorn Date: Sun, 9 Jun 2013 19:14:10 +0000 (+0200) Subject: Imported Upstream version 24.0 X-Git-Tag: upstream/24.0^0 X-Git-Url: https://git.rrq.au/?a=commitdiff_plain;ds=sidebyside;h=f574e1127a225e2de2e77a6b9e46a65986789f1f;p=rrq%2Fmaintain_lilo.git Imported Upstream version 24.0 --- diff --git a/CHANGELOG b/CHANGELOG index 287b813..b468412 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,31 @@ +Changes for version 24.0 (unreleased) - Joachim Wiedorn + + Documentations + -------------- + - Update of lilo.conf.5 manpage with some corrections. + - Add new manpages as pod files (sources): + * liloconfig.pod (from Debian) + * lilo-uuid-diskid.pod (from Debian) + * lilo.pod (converted from lilo.8) + - Add script man/pod2manpages for converting pod files. + - Create manpages from pod files. + - Deactivate Makefile for docs. Don't generate html/pdf. + - Add complete html documentation for history (v21.5). + + Sources + ------- + - Support for kernel images on GPT hard disks in the first 15 + partitions, otherwise set comments (src/geometry.c, src/lilo.h) + - Update src/Makefile to always stipping lilo and lilo.static. + + General + ------- + - Fix abort problem in script mkrescue. (thanks to S. R. Wright) + - Update script liloconf to find kernel versions 3.x, too. + - Remove some more hints to obsolete OS/2 (source, doc). + - Fix to be compatible to gcc 4.8 and higher (use -ffreestanding) + + Changes for version 23.2 (09-Apr-2011) - Joachim Wiedorn Documentations diff --git a/COPYING b/COPYING index 0586be0..d18efbd 100644 --- a/COPYING +++ b/COPYING @@ -2,7 +2,7 @@ LInux LOader (LILO) program code, documentation, and auxiliary programs: Copyright 1992-1998 Werner Almesberger Copyright 1999-2007 John Coffman -Copyright 2009-2011 Joachim Wiedorn +Copyright 2009-2013 Joachim Wiedorn All rights reserved. diff --git a/Makefile b/Makefile index e16f6bb..f135b42 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # -*- makefile -*- # -# Copyright 2009-2011 Joachim Wiedorn +# Copyright 2009-2013 Joachim Wiedorn # All rights reserved. # # Licensed under the terms contained in the file 'COPYING' @@ -17,7 +17,7 @@ help: @echo " make dosexe # DOS lilo.com utility" @echo " make diagnostic # standalone diagnostics" @echo " make alles # all above + static binary" - @echo " make docs # doc/[user,tech].[pdf,dvi] docs" + @echo " make docs # doc/[user,tech].html docs" @echo " make floppy # 2 standalone bootable diagnostic floppies" @echo "" @echo " make install # install binaries++ into root directory" @@ -51,7 +51,6 @@ alles: test # documentation files # docs: - $(MAKE) -C doc all # # if you have the 'bcc' compiler, then you can make the diagnostics, too @@ -116,7 +115,6 @@ tidy: $(MAKE) -C src tidy $(MAKE) -C diagnose tidy $(MAKE) -C dos tidy - $(MAKE) -C doc tidy clean: tidy rm -f test.img @@ -124,7 +122,6 @@ clean: tidy $(MAKE) -C images clean $(MAKE) -C diagnose clean $(MAKE) -C dos clean - $(MAKE) -C doc clean spotless: distclean distclean: clean diff --git a/NEWS b/NEWS index 0de9b0b..83b9b21 100644 --- a/NEWS +++ b/NEWS @@ -3,7 +3,16 @@ NEWS about project LILO (For details see file 'CHANGELOG' in the source directory) -Version 23.2 (major and bugfix update of 23.1) +Version 24.0 (major and bugfix update of 23.2) + + o Update many manpages and add some from Debian. + o Add old documentation as (static) html. + o Better support for GPT hard disks. + o Support for use with kernel 3.x. + o Fix to be compatible with gcc 4.8 and higher. + + +Version 23.2 (minor and bugfix update of 23.1) o Many fixes in source code and fixes for some error messages. o Remove all obsolete OS/2 code and information. @@ -13,7 +22,7 @@ Version 23.2 (major and bugfix update of 23.1) o Add new scripts 'liloconfig' and 'lilo-uuid-diskid'. -Version 23.1 (major and bugfix update of 23.0) +Version 23.1 (minor and bugfix update of 23.0) o Many fixes of typos in sources and documentation. o LVM volumes can now be used as root device. diff --git a/TODO b/TODO index 1e7dbdf..66ac4b9 100644 --- a/TODO +++ b/TODO @@ -5,10 +5,8 @@ TODO for project LILO behaviour of 'large-memory'. * patching sources because of some warnings while compiling - with gcc 4.4.x + with gcc 4.4.x and higher -* Upgrade of all manpages. - -* Upgrade of all documentations. +* Upgrade of all manpages (move to po files). * code cleanup. diff --git a/TOOLS b/TOOLS index 764f36d..ff3427d 100644 --- a/TOOLS +++ b/TOOLS @@ -8,17 +8,17 @@ they can be found in: at least tested programs package version until inside ----------------------------------------------------------------- -coreutils 6.4.10 8.5 (general) +coreutils 6.4.10 8.13 (general) bcc 0.16.14 0.16.17 bcc bin86 0.16.14 0.16.17 as86, ld86 -gcc 3.3.5 4.4.5 gcc +gcc 3.3.5 4.8.0 gcc -sharutils 4.6.3 4.9 uuencode, uudecode +sharutils 4.6.3 4.11.1 uuencode, uudecode -texlive-latex-base 2007-01 2009-11 ifpdf.sty +perl 5.8.4 5.14.2 pod2man @@ -32,8 +32,8 @@ they can be found in: at least tested programs package version until inside ----------------------------------------------------------------- -perl 5.8.8 5.10.1 (general) +perl 5.8.8 5.14.2 (general) -perl-modules 5.8.8 5.10.1 Getopt::Std, +perl-modules 5.8.8 5.14.2 Getopt::Std, Pod::Usage File::Copy diff --git a/doc/Makefile b/doc/Makefile deleted file mode 100644 index fec66b4..0000000 --- a/doc/Makefile +++ /dev/null @@ -1,58 +0,0 @@ -# -*- makefile -*- - -LATEX=latex -PDFLATEX=pdflatex -RLATEX=./rlatex -FIG2DEV=fig2dev -SHELL=/bin/sh - -IMAGES=bootloader.tex map.tex image.tex parameter.tex other.tex - -.SUFFIXES: .fig .tex .dvi .ps - -.fig.tex: - $(FIG2DEV) -L latex $*.fig $*.tex - -.tex.dvi: - $(RLATEX) $* - -all: user.dvi tech.dvi user.pdf tech.pdf - -user.ps: user.dvi - dvips -o user.ps user.dvi - -tech.ps: tech.dvi - dvips -o tech.ps tech.dvi - -user.dvi: user.tex - -tech.dvi: tech.tex $(IMAGES) - -user.pdf: user.dvi - $(PDFLATEX) user - $(PDFLATEX) user - -tech.pdf: tech.dvi - $(PDFLATEX) tech - $(PDFLATEX) tech - -html: user.ps tech.ps - latex2html -split 2 -link 2 -toc_depth 2 user - latex2html -split 1 -link 1 -toc_depth 1 tech - -again: - $(PDFLATEX) user - $(PDFLATEX) tech - -tidy: - rm -f *~ *.toc *.aux *.log *.out - -clean: tidy - rm -f *.ps *.dvi *.pdf - rm -Rf user tech - -distclean: clean - - -dummies: - for n in $(IMAGES); do echo '(omitted)' >$$n; done diff --git a/doc/Makefile.old b/doc/Makefile.old new file mode 100644 index 0000000..fec66b4 --- /dev/null +++ b/doc/Makefile.old @@ -0,0 +1,58 @@ +# -*- makefile -*- + +LATEX=latex +PDFLATEX=pdflatex +RLATEX=./rlatex +FIG2DEV=fig2dev +SHELL=/bin/sh + +IMAGES=bootloader.tex map.tex image.tex parameter.tex other.tex + +.SUFFIXES: .fig .tex .dvi .ps + +.fig.tex: + $(FIG2DEV) -L latex $*.fig $*.tex + +.tex.dvi: + $(RLATEX) $* + +all: user.dvi tech.dvi user.pdf tech.pdf + +user.ps: user.dvi + dvips -o user.ps user.dvi + +tech.ps: tech.dvi + dvips -o tech.ps tech.dvi + +user.dvi: user.tex + +tech.dvi: tech.tex $(IMAGES) + +user.pdf: user.dvi + $(PDFLATEX) user + $(PDFLATEX) user + +tech.pdf: tech.dvi + $(PDFLATEX) tech + $(PDFLATEX) tech + +html: user.ps tech.ps + latex2html -split 2 -link 2 -toc_depth 2 user + latex2html -split 1 -link 1 -toc_depth 1 tech + +again: + $(PDFLATEX) user + $(PDFLATEX) tech + +tidy: + rm -f *~ *.toc *.aux *.log *.out + +clean: tidy + rm -f *.ps *.dvi *.pdf + rm -Rf user tech + +distclean: clean + + +dummies: + for n in $(IMAGES); do echo '(omitted)' >$$n; done diff --git a/doc/html/index.html b/doc/html/index.html new file mode 100644 index 0000000..55a36c6 --- /dev/null +++ b/doc/html/index.html @@ -0,0 +1,45 @@ + + + + +LILO +Generic boot loader for Linux +Version 21.5 Documentation + + + + + +
+ + + +

LILO
+Generic boot loader for Linux
+Version 21.5
+July 17, 2000

+ +

Documentation

+ +

User’s guide
+(written by Werner Almesberger and John R. Coffman)
+

+ +

Technical overview
+(written by Werner Almesberger and John R. Coffman)
+

+ +


+(Documentation reconstructed by Joachim Wiedorn on January 29, 2011)
+

+ + + + + diff --git a/doc/html/tech_21-5.css b/doc/html/tech_21-5.css new file mode 100644 index 0000000..cba9cc6 --- /dev/null +++ b/doc/html/tech_21-5.css @@ -0,0 +1,141 @@ + +/* start css.sty */ + +description { margin-top: 1em; } +dt.description { margin-top: 1em; } +dd.description { margin-top: 0.5em; } + +.line-10{font-size:90%;} +.cmr-10{font-size:90%;} +.cmr-10x-x-109{} +.cmr-17{font-size:154%;} +.cmr-12x-x-120{font-size:130%;} +.cmbx-12x-x-120{font-size:130%; font-weight: bold;} +.cmbx-12x-x-120{ font-weight: bold;} +.cmr-12{font-size:109%;} +.cmr-6{font-size:54%;} +.cmti-12{font-size:109%; font-style: italic;} +.cmtt-10x-x-109{font-family: monospace;} +.cmtt-10x-x-109{font-family: monospace;} +.cmbx-10x-x-109{ font-weight: bold;} +.cmbx-10x-x-109{ font-weight: bold;} +.cmss-10x-x-109{ font-family: sans-serif;} +.cmr-9{font-size:81%;} +.cmtt-10{font-size:90%;font-family: monospace;} +.cmtt-10{font-family: monospace;} +.cmti-10x-x-109{ font-style: italic;} +p.noindent { text-indent: 0em } +td p.noindent { text-indent: 0em; margin-top:0em; } +p.nopar { text-indent: 0em; } +p.indent{ text-indent: 1.5em } +@media print {div.crosslinks {visibility:hidden;}} +a img { border-top: 0; border-left: 0; border-right: 0; } +center { margin-top:1em; margin-bottom:1em; } +td center { margin-top:0em; margin-bottom:0em; } +.Canvas { position:relative; } +img.math{vertical-align:middle;} +li p.indent { text-indent: 0em } +li p:first-child{ margin-top:0em; } +li p:last-child, li div:last-child { margin-bottom:0.5em; } +li p~ul:last-child, li p~ol:last-child{ margin-bottom:0.5em; } +.enumerate1 {list-style-type:decimal;} +.enumerate2 {list-style-type:lower-alpha;} +.enumerate3 {list-style-type:lower-roman;} +.enumerate4 {list-style-type:upper-alpha;} +div.newtheorem { margin-bottom: 2em; margin-top: 2em;} +.obeylines-h,.obeylines-v {white-space: nowrap; } +div.obeylines-v p { margin-top:0; margin-bottom:0; } +.overline{ text-decoration:overline; } +.overline img{ border-top: 1px solid black; } +td.displaylines {text-align:center; white-space:nowrap;} +.centerline {text-align:center;} +.rightline {text-align:right;} +div.verbatim {font-family: monospace; white-space: nowrap; text-align:left; clear:both; } +.fbox {padding-left:3.0pt; padding-right:3.0pt; text-indent:0pt; border:solid black 0.4pt; } +div.fbox {display:table} +div.center div.fbox {text-align:center; clear:both; padding-left:3.0pt; padding-right:3.0pt; text-indent:0pt; border:solid black 0.4pt; } +div.minipage{width:100%;} +div.center, div.center div.center {text-align: center; margin-left:1em; margin-right:1em;} +div.center div {text-align: left;} +div.flushright, div.flushright div.flushright {text-align: right;} +div.flushright div {text-align: left;} +div.flushleft {text-align: left;} +.underline{ text-decoration:underline; } +.underline img{ border-bottom: 1px solid black; margin-bottom:1pt; } +.framebox-c, .framebox-l, .framebox-r { padding-left:3.0pt; padding-right:3.0pt; text-indent:0pt; border:solid black 0.4pt; } +.framebox-c {text-align:center;} +.framebox-l {text-align:left;} +.framebox-r {text-align:right;} +span.thank-mark{ vertical-align: super } +span.footnote-mark sup.textsuperscript, span.footnote-mark a sup.textsuperscript{ font-size:80%; } +div.tabular, div.center div.tabular {text-align: center; margin-top:0.5em; margin-bottom:0.5em; } +table.tabular td p{margin-top:0em;} +table.tabular {margin-left: auto; margin-right: auto;} +td p:first-child{ margin-top:0em; } +td p:last-child{ margin-bottom:0em; } +div.td00{ margin-left:0pt; margin-right:0pt; } +div.td01{ margin-left:0pt; margin-right:5pt; } +div.td10{ margin-left:5pt; margin-right:0pt; } +div.td11{ margin-left:5pt; margin-right:5pt; } +table[rules] {border-left:solid black 0.4pt; border-right:solid black 0.4pt; } +td.td00{ padding-left:0pt; padding-right:0pt; } +td.td01{ padding-left:0pt; padding-right:5pt; } +td.td10{ padding-left:5pt; padding-right:0pt; } +td.td11{ padding-left:5pt; padding-right:5pt; } +table[rules] {border-left:solid black 0.4pt; border-right:solid black 0.4pt; } +.hline hr, .cline hr{ height : 1px; margin:0px; } +.tabbing-right {text-align:right;} +span.TEX {letter-spacing: -0.125em; } +span.TEX span.E{ position:relative;top:0.5ex;left:-0.0417em;} +a span.TEX span.E {text-decoration: none; } +span.LATEX span.A{ position:relative; top:-0.5ex; left:-0.4em; font-size:85%;} +span.LATEX span.TEX{ position:relative; left: -0.4em; } +div.float, div.figure {margin-left: auto; margin-right: auto;} +div.float img {text-align:center;} +div.figure img {text-align:center;} +.marginpar {width:20%; float:right; text-align:left; margin-left:auto; margin-top:0.5em; font-size:85%; text-decoration:underline;} +.marginpar p{margin-top:0.4em; margin-bottom:0.4em;} +table.equation {width:100%;} +.equation td{text-align:center; } +td.equation { margin-top:1em; margin-bottom:1em; } +td.equation-label { width:5%; text-align:center; } +td.eqnarray4 { width:5%; white-space: normal; } +td.eqnarray2 { width:5%; } +table.eqnarray-star, table.eqnarray {width:100%;} +div.eqnarray{text-align:center;} +div.array {text-align:center;} +div.pmatrix {text-align:center;} +table.pmatrix {width:100%;} +span.pmatrix img{vertical-align:middle;} +div.pmatrix {text-align:center;} +table.pmatrix {width:100%;} +span.bar-css {text-decoration:overline;} +img.cdots{vertical-align:middle;} +.partToc a, .partToc, .likepartToc a, .likepartToc {line-height: 200%; font-weight:bold; font-size:110%;} +.index-item, .index-subitem, .index-subsubitem {display:block} +div.caption {text-indent:-2em; margin-left:3em; margin-right:1em; text-align:left;} +div.caption span.id{font-weight: bold; white-space: nowrap; } +h1.partHead{text-align: center} +p.bibitem { text-indent: -2em; margin-left: 2em; margin-top:0.6em; margin-bottom:0.6em; } +p.bibitem-p { text-indent: 0em; margin-left: 2em; margin-top:0.6em; margin-bottom:0.6em; } +.paragraphHead, .likeparagraphHead { margin-top:2em; font-weight: bold;} +.subparagraphHead, .likesubparagraphHead { font-weight: bold;} +.quote {margin-bottom:0.25em; margin-top:0.25em; margin-left:1em; margin-right:1em; text-align:justify;} +.verse{white-space:nowrap; margin-left:2em} +div.maketitle {text-align:center;} +h2.titleHead{text-align:center;} +div.maketitle{ margin-bottom: 2em; } +div.author, div.date {text-align:center;} +div.thanks{text-align:left; margin-left:10%; font-size:85%; font-style:italic; } +div.author{white-space: nowrap;} +.quotation {margin-bottom:0.25em; margin-top:0.25em; margin-left:1em; } +.abstract p {margin-left:5%; margin-right:5%;} +div.abstract {width:100%;} +.figure img.graphics {margin-left:10%;} +.caption span.id{font-weight: bold;} + .wrapfig-r, .wrapfig-ri, .wrapfig-ir, .wrapfig-ro, .wrapfig-or {float:right; text-align:left; margin-left:auto; margin-top:0.5em;} + .wrapfig-l, .wrapfig-li, .wrapfig-il, .wrapfig-lo, .wrapfig-ol {float:left; text-align:left; margin-right:auto; margin-top:0.5em;} +.wrapfig-r .caption td.content, .wrapfig-ri .caption td.content, .wrapfig-ir .caption td.content, .wrapfig-ro .caption td.content, .wrapfig-or .caption td.content, .wrapfig-l .caption td.content, .wrapfig-li .caption td.content, .wrapfig-il .caption td.content, .wrapfig-lo .caption td.content, .wrapfig-ol .caption td.content {white-space: normal; } +.wrapfig-r .caption, .wrapfig-ri .caption, .wrapfig-ir .caption, .wrapfig-ro .caption, .wrapfig-or .caption, .wrapfig-l .caption, .wrapfig-li .caption, .wrapfig-il .caption, .wrapfig-lo .caption, .wrapfig-ol .caption {width:30%; } +/* end css.sty */ + diff --git a/doc/html/tech_21-5.html b/doc/html/tech_21-5.html new file mode 100644 index 0000000..4b2c77d --- /dev/null +++ b/doc/html/tech_21-5.html @@ -0,0 +1,522 @@ + + + + +LILO +Generic boot loader for Linux +Version 21.5 +Technical overview + + + + + + + + +
+ + + +

LILO
+Generic boot loader for Linux
+Version 21.5

+Technical overview

+
Werner Almesberger +
John R. Coffman +
(reconstructed by Joachim Wiedorn)
+
+
July 17, 2000
+
+

Contents

+ +

This document describes internals of LILO and related parts of its environment (kernel, etc.). It is not +necessary to read or understand this document in order to install or use LILO. A general introduction and +installation instructions can be found in the user’s guide. +

This document has only been partially updated and does reflect the status of Linux (until +2.2.16) and of LILO (until 21.5) in the year 2000. +

+ +

+

1 Load sequence

+

The boot sector is loaded by the ROM-BIOS at address 0x07C00. It moves itself to address 0x96A00, sets +up the stack (growing downwards from 0x96A00 to 0x96800), loads the secondary boot loader at address +0x96C00 and transfers control to it. It displays an “L” after moving itself and an “I” before starting the +secondary boot loader. If a read error occurs when loading the secondary boot loader, a two-digit hex +code is displayed after the “L”. This results in an endless stream of error codes if the problem +is permanent. Displaying these error codes is disabled if the build-time option NO1STDIAG is +set. +

The secondary boot loader loads the descriptor table at 0x98800 and the sector containing the +default command line at 0x98C00. If the default command line is enabled, its magic number is +invalidated and the sector is written back to disk. This potentially dangerous operation can be +disabled by defining LCF_READONLY when passing second.S through cpp. Next, the secondary +boot loader checks for user input. If either the default is used or if the user has specified an +alternate image, the options sector is loaded at 0x98C00 and the parameter line is constructed at +0x99000. If the resulting line contains the option lock, the command line as entered by the +user (it is saved before the final line is constructed) is written to the disk as the new default +command line. Also, if a fallback command line is set, it is copied to the default command line +sector. +

If the user has supplied an initial RAM disk image, this file is loaded below the end of physical memory or +16 MB, whichever is lower. The start address is lowered to the next page boundary so that the memory area +occupied by the initial RAM disk can later be easily returned to the system’s free memory pool. The 16 MB +limit exists because the BIOS functions used to transfer data in memory are only specified for an 24 bit +address space. +

Next, the floppy boot sector of that image is loaded at +0x900001, +the setup part is loaded at 0x90200 and the kernel part is loaded at 0x10000, or, if the kernel has been +compiled for being loaded “high” (i.e. with make bzImage), it is loaded at 0x100000 instead. During the +load operations, the sectors of the map file are loaded at 0x98600. +

If the loaded image is a kernel image, control is transferred to its setup code. If a different operating system +is booted, things are a bit more difficult: the chain loader is loaded at 0x90200 and the boot sector of the +other OS is loaded at 0x90400. The chain loader moves the partition table (loaded at 0x903BE as part of +the chain loader) to 0x00600 and the boot sector to 0x07C00. After that, it passes control to the boot +sector. +

Chain loaders that allow booting from a second drive (either floppy or hard disk) also install a +small function to intercept BIOS calls and to swap the drive numbers at the top of available +memory. +

The secondary boot loader displays an “L” after being started and an “O” after loading the descriptor table +and the default command line. Before loading the descriptor table, it checks, whether it has been loaded at + +the correct location and displays a question mark if it hasn’t. If the descriptor table has an incorrect +checksum, a minus sign is displayed. +

+

+
+0x00000  |-------------------------------|1982 bytes
+         |-------------------------------|
+0x007BE  |--------Partition-table---------|64 bytes
+0x007FE  |-------------------------------|29 kB
+0x07C00  |--------Boot-load-area---------|512 bytes
+0x07E00  |-------------------------------|32.5 kB
+0x10000  |                               |448 kB
+         |                               |
+         |            Kernel             |
+         |                               |
+         |                               |
+         |-------------------------------|
+0x90000  |------Floppy-boot-sector-------|512 bytes
+0x90200  |---------Setup-(kernel)---------|39.5 kB (2 kB used)
+0x9A000  |------Primary--boot-loader-------|512 bytes
+0x9A200  |             Stack              |3.5 kB
+0x9B000  |-----Secondary-boot-loader------|8 kB (3.5 kB used)
+0x9D000  |--------Map--load-area---------|512 bytes
+         |-------------------------------|
+0x9D200  |--------Descriptor-table---------|1 kB
+0x9D600  |---Default command--line, etc.--|512 bytes
+0x9D800  |---Keyboard-translation-table----|512 bytes
+0x9DA00  |Parameter-line-construction-area-|1 kB
+0x9DC00  |                               |7.5 kB
+         |                               |
+         |--------Drive-swapper----------|1 kB
+         ---------------------------------
+0xA0000
+
+

The area 0x90020-0x90023 is overlaid by a command-line descriptor while the secondary boot loader is +running. +

If the build-time configuration option LARGE_EBDA is set, all the addresses in the area 0x90000-0x9FFFF are +changed to 0x80000-0x8FFFF, with the exception of the location of the driver swapper, which automatically +follows the end of the available memory. +

+ +

+

2 File references

+

This section describes the references among files involved in the boot procedures. +

+

+
+                          --------------|
+                          |  Default    |
+                         /|             |
+                      //  -command--line---
+                     /    |  Image      |
+                   /   // |             |
+                  /  /    |-descriptors-- |
+                 / /      |             |
+              // /        |             |
+-------------/-/          |   map       |
+|Boot sector  /\ |
+|            \\|\
+-------------\\\\  \ \ \   |-------------|
+              \ \\      \ \  Primary    |
+               \ \ \      | boot loader  |
+                \\\  \ \  ---------------
+                  \\    \ |             |
+                   \ \\   |             |
+                    \  \  |- --- --- -- |
+                     \   \| Secondary   |
+                      \\  | boot loader  |
+                        \ |- --- --- -- |
+                         \\|             |
+                          |             |
+                          ---------------
+                            boot.b
+
+

The boot sector contains the primary boot loader, the address of the default command line sector, the +address of both descriptor table sectors and the addresses of the sectors of the secondary boot loader. The +generic boot sector is copied from boot.b. +

The primary boot loader can store up to eight sector addresses of the secondary boot loader. +

+ +

+
+|-------------|
+|   Default   |
+|             |
+--command--line-|
+|             |
+|    Image    |
+- --- --- --- -
+|             |
+|  descriptors  |
+--------------|
+|             |
+|  Zero sector  |
+--------------|
+|  Keyboard   |
+|             |
+--trans. table-|
+|    First    |
+|             |
+----section----|
+|             |
+|   Second    |
+- --- --/ --- -
+|    //       |
+|   section    |
+--------------|
+|    Third    |
+|             |
+----section----|
+
+

The map file consists of so-called sections and of special data sectors. Each section spans an integral number +of disk sectors and contains addresses of sectors of other files. +

There are three exceptions: 1. If a “hole” is being covered or if the floppy boot sector of an unstripped +kernel has been omitted, the address of the zero sector is used. This sector is part of the map file. 2. When +booting a different operating system, the first sector is the merged chain loader that has been written to the +map file before that section. 3. Each map section describing an image is followed by a sector containing the +options line of that image. +

The last address slot of each map sector is either unused (if the map section ends in this sector) or contains +the address of the next map sector in the section. +

The ifive sectors at the beginning of the map file are special: the first sector contains the default command +line, the next two sectors contain the boot image descriptor table and the fourth sector is filled with zero +bytes. This sector is mapped whenever a file contains a “hole”. The fifth sector contains the keyboard +translation table. +

+ +

+
+|-----------|                       --------------|
+|Descriptor  |                       |             |
+------------                        |             |
+   |    | \    |-------------|     //-- -- --- -- -
+    ||   || \\  |             |    / |             |
+     |    |    |   Fallback    |   /  |             |
+     |    |    |             |  /  /|             |
+      |    |   -- --- -- --- - /  / --- -- --- -- -
+      |     |  |   Options    |////// |             |
+       ||    || |             // /   |             |
+        |    | |- --- -- ---///     --- -- --- --
+        |     |||            //      |             |
+        |      |            /|      |             |
+         |     -- -// /-/--- -
+         ||    |             |      |             |
+          |    |             |      |             |
+           |   -------------\-\     --- -- --- -- -
+           |                   \ \\ |             |
+            |    Map section         |             |
+            ||                      ---------------
+             |
+    optional   |                       Kernel image
+              |
+               |
+               ||----------------------------------|
+               |             |      |             |
+               |             |      |             |
+               -- --/ /-/--- -      --- -- --- -- -
+               |   /         |      |             |
+               |             |      |             |
+               -------------\-
+                             \      |             |
+                 Map section   \     |             |
+                                \   --- -- --- -- -
+                                 \\ |             |
+                                    |             |
+                                    |             |
+                                    ---------------
+                                   Initial RAM  disk
+
+

A kernel image consists simply of a sequence of sectors being loaded. The map section also contains a sector +with a fallback command line and a sector with parameter line options. Optionally, a RAM disk image, +specified by a second map section, can be loaded. +

+ +

+
+                             |--------------|         |-------------|
+                             |              |         |  Original   |
+                             |  chain.b     |         |  partition   |
+|-----------|                -----/---------|        /----table------
+|           |                    /                 /
+-Descriptor--                    /              / /
+       \                      //           / /
+         \\ |--------------|  /           /
+           |              | /         //
+           |   Fallback    |/        /
+           - --- -- --- --/     / /
+           |            //| / /
+           |   (Options)/  /
+           | --- -- --/// /-|
+           |              \
+           | Chain loader  |\ |
+           | --- -- --- --cccccccccccmmmmmmmmmmmcmcmcmcmcmcmcmccccrmrmrmrmrmrrrrrrrrrrrrrmmmmnnnnnmmmmmmmmmmmmmrmrmrmrm.....n.nnnnnnnnnnnnnnnn................
+           |            cccccccmmcmcmcmcccccc/mmmmmcmcmcmcmcmcmcmcrrrrrmmmmmmcmcmcmccccccrrrrrrrrrrrrmmmmmmrmrmrmrrrrrrmmmmmmcmcmcmcmccmmmmmmmmmmmmrmnnnnnnnnmmmmmmrmrmrmrrrrrrrmmnnnnnnnnnnnnn........n.nnnnnnnnmmmmmmmrmrm.....................n.nnnnnnnn........     |-------------|
+           |            /-|----------|Boot sector   |
+           ---------------|          |             |
+                                     ---------------
+             Map  section
+
+

When booting another operating system, the chain loader (chain.b) is merged with the patched partition +table2 +and written into the map file. The map section of this boot image starts after that sector and contains only +the address of a dummy floppy boot sector (the zero sector, but its contents are irrelevant), the loader +sector and the boot sector of the other operating system. Not that the map section also contains the +fallback sector and a (useless) sector for options. +

+

3 Configuration parameters

+

The boot sector of each kernel contains a set of configuration parameters that have to be available at boot +time before the kernel can access file systems. These parameters can be set when the kernel is +compiled and later be changed with programs like rdev. LILO can supersede the parameters (in +memory) at boot time by placing the corresponding items on the parameter line passed to the +kernel. + +

The parameters are stored at the following (decimal) offsets: +

+

+497
the size of the setup code in sectors (512 bytes). Older kernels may put a zero at this place. +
+498-499
is a flag specifying whether the root file system should be mounted read-only (if non-zero) + or read-write (if zero). +
+500-501
the size of the kernel, counted in paragraphs (16 bytes). +
+502-503
this parameter is currently unused. +
+504-505
the size of the RAM disk in kilobytes. No RAM disk is created if this parameter is set to + zero. +
+506-507
the text mode the VGA is set to. +
+ 0xFFFD
the user is asked to specify the VGA mode at boot time. +
+ 0xFFFE
uses 80x50 (“extended”) mode. +
+ 0xFFFF
uses 80x25 (“normal”) mode.
+

Any other value selects the corresponding mode as displayed in the interactive VGA mode selection + menu. This is the only option that is set by LILO by patching the boot sector instead of passing it on + the parameter line. +

+508
the minor number of the device that should be mounted as root. +
+509
the major number of the device that should be mounted as root.
+

+

+

4 Parameter line interface

+

The kernel supports processing of parameters that are provided by the boot loader. The parameter string is +a NUL-terminated ASCII string that contains space-separated words or variable=value pairs. A description +of how they are interpreted can be found in the section of the user’s guide labeled “The boot +prompt”. +

The following descriptor has to be set up to pass a parameter string to the kernel: + +

+

+0x90020
the magic number 0xA33F. +
+0x90022
the offset of the first byte of the parameter line relative to 0x90000.
+

The boot loader composes the parameter line from the command line, from the options sector and from +some internally generated prefixes (typically auto and BOOT_IMAGE=), as follows: +

+

+
+                  |---------------------------------------|
+                  |  Image    |                            |
+Command  line      |  name    |    Command  -line options    |
+                  ---------------------------\------------
+                       |                       \ \ \
+                       |                             \ \
+                       |                                 \ \
+                       |                                    \ \ \
+           |-----------|----------------------------------|-------\\-------------------|
+           | Pre- |  Image    |                            |                            |
+           |fixes  |  name    |       Static options         |    Command  -line options    |
+           --------------------------------|--------------------------------------------
+Parameter string                            |
+passed to the kernel                         |
+                                           |
+                                           |
+                             |----------------------------|
+Options sector                |       Static options         |
+                             |                            |
+                             ------------------------------
+
+

Example:
Command line: vmlinuz root=802
Options sector: root=801 ro +

yields BOOT_IMAGE=vmlinuz root=801 ro root=802 +

Because parameter line options can typically be overridden, the first root option is ignored by the +kernel. + +

+

+

5 External interface

+

LILO is able to receive its command line from a program that is booted before it. This externally provided +command line is only used if the user does not use the normal mechanism to invoke the boot +prompt. +

The following register contents are expected: +

+

+DL
contains the value 0xFE. +
+ES:SI
points to the string “LILO”. The string must be in upper case and no terminating character + is needed. The string must not cross segment boundaries, i.e. SI must be below 0xFFFD. +
+ES:BX
points to a NUL-terminated string that is used as the command line. This string has a + maximum length of 78 characters (not including the terminating NUL) and must not cross + segment boundaries.
+

There are two values of the externally provided command line that have a special meaning: +

+ +

LILO can also obtain the default command line from the map file. It is only used if no externally provided +command line is available. +

+

+

6 Default command line in map file

+

The first sector of the map file is reserved for a default command line. Unless the user invokes the boot +prompt by pressing a shift key or unless an externally provided command line is present, the command line +in the map file is interpreted as if it had been typed on the keyboard. +

The first two bytes of the first sector of the map file have to contain the magic number DC_MAGIC (0xF4F2) +in little-endian byte order. They are followed by a NUL-terminated string with a maximum length of 510 +bytes, including the NUL. Note that the boot loader limits command lines to 78 characters after removing +duplicate spaces. + +

The command line is disabled by either clobbering the magic number or by using an empty string (i.e. only +a NUL byte) as the command line. +

+
+

+

Last updated by John R. Coffman on July 17, 2000
+reconstructed by Joachim Wiedorn on January 29, 2011

+ + + + + diff --git a/doc/html/tech_21-50x.png b/doc/html/tech_21-50x.png new file mode 100644 index 0000000..720d30d Binary files /dev/null and b/doc/html/tech_21-50x.png differ diff --git a/doc/html/tech_21-51x.png b/doc/html/tech_21-51x.png new file mode 100644 index 0000000..efd7e5d Binary files /dev/null and b/doc/html/tech_21-51x.png differ diff --git a/doc/html/tech_21-52.html b/doc/html/tech_21-52.html new file mode 100644 index 0000000..2231347 --- /dev/null +++ b/doc/html/tech_21-52.html @@ -0,0 +1,22 @@ + + + + + + + + + + + + + +
+

1The floppy boot sector is only used as a source of setup information.

+ + diff --git a/doc/html/tech_21-52x.png b/doc/html/tech_21-52x.png new file mode 100644 index 0000000..c8d2395 Binary files /dev/null and b/doc/html/tech_21-52x.png differ diff --git a/doc/html/tech_21-53.html b/doc/html/tech_21-53.html new file mode 100644 index 0000000..c728b63 --- /dev/null +++ b/doc/html/tech_21-53.html @@ -0,0 +1,22 @@ + + + + + + + + + + + + + +
+

2If the partition table is omitted, that area is filled with zero bytes.

+ + diff --git a/doc/html/tech_21-53x.png b/doc/html/tech_21-53x.png new file mode 100644 index 0000000..be1d7ea Binary files /dev/null and b/doc/html/tech_21-53x.png differ diff --git a/doc/html/tech_21-54x.png b/doc/html/tech_21-54x.png new file mode 100644 index 0000000..2346490 Binary files /dev/null and b/doc/html/tech_21-54x.png differ diff --git a/doc/html/tech_21-55x.png b/doc/html/tech_21-55x.png new file mode 100644 index 0000000..7e0f05f Binary files /dev/null and b/doc/html/tech_21-55x.png differ diff --git a/doc/html/user_21-5.css b/doc/html/user_21-5.css new file mode 100644 index 0000000..d5563ce --- /dev/null +++ b/doc/html/user_21-5.css @@ -0,0 +1,152 @@ + +/* start css.sty */ + +description { margin-top: 1em; } +dt.description { margin-top: 1em; } +dd.description { margin-top: 0.5em; } + +.cmex-10{font-size:90%;} +.cmr-10{font-size:90%;} +.cmr-10x-x-109{} +.cmr-17{font-size:154%;} +.cmr-12x-x-120{font-size:130%;} +.cmbx-12x-x-120{font-size:130%; font-weight: bold;} +.cmbx-12x-x-120{ font-weight: bold;} +.cmr-12{font-size:109%;} +.cmr-8{font-size:72%;} +.cmr-6{font-size:54%;} +.cmti-12{font-size:109%; font-style: italic;} +.cmtt-10x-x-109{font-family: monospace;} +.cmtt-10x-x-109{font-family: monospace;} +.cmss-10x-x-109{ font-family: sans-serif;} +.cmss-10x-x-109{ font-family: sans-serif;} +.cmbx-10x-x-109{ font-weight: bold;} +.cmbx-10x-x-109{ font-weight: bold;} +.cmr-9{font-size:81%;} +.cmmi-9{font-size:81%;font-style: italic;} +.cmsy-9{font-size:81%;} +.cmmi-10x-x-109{font-style: italic;} +.cmsy-10x-x-109{} +.cmss-9{font-size:81%; font-family: sans-serif;} +.cmss-9{ font-family: sans-serif;} +.cmtt-9{font-size:81%;font-family: monospace;} +.cmtt-9{font-family: monospace;} +.cmti-9{font-size:81%; font-style: italic;} +.cmti-10x-x-109{ font-style: italic;} +.tctt-0900{font-size:81%;font-family: monospace;} + +p.noindent { text-indent: 0em } +td p.noindent { text-indent: 0em; margin-top:0em; } +p.nopar { text-indent: 0em; } +p.indent{ text-indent: 1.5em } +@media print {div.crosslinks {visibility:hidden;}} +a img { border-top: 0; border-left: 0; border-right: 0; } +center { margin-top:1em; margin-bottom:1em; } +td center { margin-top:0em; margin-bottom:0em; } +.Canvas { position:relative; } +img.math{vertical-align:middle;} +li p.indent { text-indent: 0em } +li p:first-child{ margin-top:0em; } +li p:last-child, li div:last-child { margin-bottom:0.5em; } +li p~ul:last-child, li p~ol:last-child{ margin-bottom:0.5em; } +.enumerate1 {list-style-type:decimal;} +.enumerate2 {list-style-type:lower-alpha;} +.enumerate3 {list-style-type:lower-roman;} +.enumerate4 {list-style-type:upper-alpha;} +div.newtheorem { margin-bottom: 2em; margin-top: 2em;} +.obeylines-h,.obeylines-v {white-space: nowrap; } +div.obeylines-v p { margin-top:0; margin-bottom:0; } +.overline{ text-decoration:overline; } +.overline img{ border-top: 1px solid black; } +td.displaylines {text-align:center; white-space:nowrap;} +.centerline {text-align:center;} +.rightline {text-align:right;} +div.verbatim {font-family: monospace; white-space: nowrap; text-align:left; clear:both; } +.fbox {padding-left:3.0pt; padding-right:3.0pt; text-indent:0pt; border:solid black 0.4pt; } +div.fbox {display:table} +div.center div.fbox {text-align:center; clear:both; padding-left:3.0pt; padding-right:3.0pt; text-indent:0pt; border:solid black 0.4pt; } +div.minipage{width:100%;} +div.center, div.center div.center {text-align: center; margin-left:1em; margin-right:1em;} +div.center div {text-align: left;} +div.flushright, div.flushright div.flushright {text-align: right;} +div.flushright div {text-align: left;} +div.flushleft {text-align: left;} +.underline{ text-decoration:underline; } +.underline img{ border-bottom: 1px solid black; margin-bottom:1pt; } +.framebox-c, .framebox-l, .framebox-r { padding-left:3.0pt; padding-right:3.0pt; text-indent:0pt; border:solid black 0.4pt; } +.framebox-c {text-align:center;} +.framebox-l {text-align:left;} +.framebox-r {text-align:right;} +span.thank-mark{ vertical-align: super } +span.footnote-mark sup.textsuperscript, span.footnote-mark a sup.textsuperscript{ font-size:80%; } +div.tabular, div.center div.tabular {text-align: center; margin-top:0.5em; margin-bottom:0.5em; } +table.tabular td p{margin-top:0em;} +table.tabular {margin-left: auto; margin-right: auto;} +td p:first-child{ margin-top:0em; } +td p:last-child{ margin-bottom:0em; } +div.td00{ margin-left:0pt; margin-right:0pt; } +div.td01{ margin-left:0pt; margin-right:5pt; } +div.td10{ margin-left:5pt; margin-right:0pt; } +div.td11{ margin-left:5pt; margin-right:5pt; } +table[rules] {border-left:solid black 0.4pt; border-right:solid black 0.4pt; } +td.td00{ padding-left:0pt; padding-right:0pt; } +td.td01{ padding-left:0pt; padding-right:5pt; } +td.td10{ padding-left:5pt; padding-right:0pt; } +td.td11{ padding-left:5pt; padding-right:5pt; } +table[rules] {border-left:solid black 0.4pt; border-right:solid black 0.4pt; } +.hline hr, .cline hr{ height : 1px; margin:0px; } +.tabbing-right {text-align:right;} +span.TEX {letter-spacing: -0.125em; } +span.TEX span.E{ position:relative;top:0.5ex;left:-0.0417em;} +a span.TEX span.E {text-decoration: none; } +span.LATEX span.A{ position:relative; top:-0.5ex; left:-0.4em; font-size:85%;} +span.LATEX span.TEX{ position:relative; left: -0.4em; } +div.float, div.figure {margin-left: auto; margin-right: auto;} +div.float img {text-align:center;} +div.figure img {text-align:center;} +.marginpar {width:20%; float:right; text-align:left; margin-left:auto; margin-top:0.5em; font-size:85%; text-decoration:underline;} +.marginpar p{margin-top:0.4em; margin-bottom:0.4em;} +table.equation {width:100%;} +.equation td{text-align:center; } +td.equation { margin-top:1em; margin-bottom:1em; } +td.equation-label { width:5%; text-align:center; } +td.eqnarray4 { width:5%; white-space: normal; } +td.eqnarray2 { width:5%; } +table.eqnarray-star, table.eqnarray {width:100%;} +div.eqnarray{text-align:center;} +div.array {text-align:center;} +div.pmatrix {text-align:center;} +table.pmatrix {width:100%;} +span.pmatrix img{vertical-align:middle;} +div.pmatrix {text-align:center;} +table.pmatrix {width:100%;} +span.bar-css {text-decoration:overline;} +img.cdots{vertical-align:middle;} +.partToc a, .partToc, .likepartToc a, .likepartToc {line-height: 200%; font-weight:bold; font-size:110%;} +.index-item, .index-subitem, .index-subsubitem {display:block} +div.caption {text-indent:-2em; margin-left:3em; margin-right:1em; text-align:left;} +div.caption span.id{font-weight: bold; white-space: nowrap; } +h1.partHead{text-align: center} +p.bibitem { text-indent: -2em; margin-left: 2em; margin-top:0.6em; margin-bottom:0.6em; } +p.bibitem-p { text-indent: 0em; margin-left: 2em; margin-top:0.6em; margin-bottom:0.6em; } +.paragraphHead, .likeparagraphHead { margin-top:2em; font-weight: bold;} +.subparagraphHead, .likesubparagraphHead { font-weight: bold;} +.quote {margin-bottom:0.25em; margin-top:0.25em; margin-left:1em; margin-right:1em; text-align:justify;} +.verse{white-space:nowrap; margin-left:2em} +div.maketitle {text-align:center;} +h2.titleHead{text-align:center;} +div.maketitle{ margin-bottom: 2em; } +div.author, div.date {text-align:center;} +div.thanks{text-align:left; margin-left:10%; font-size:85%; font-style:italic; } +div.author{white-space: nowrap;} +.quotation {margin-bottom:0.25em; margin-top:0.25em; margin-left:1em; } +.abstract p {margin-left:5%; margin-right:5%;} +div.abstract {width:100%;} +.figure img.graphics {margin-left:10%;} +.caption span.id{font-weight: bold;} +.wrapfig-r, .wrapfig-ri, .wrapfig-ir, .wrapfig-ro, .wrapfig-or {float:right; text-align:left; margin-left:auto; margin-top:0.5em;} +.wrapfig-l, .wrapfig-li, .wrapfig-il, .wrapfig-lo, .wrapfig-ol {float:left; text-align:left; margin-right:auto; margin-top:0.5em;} +.wrapfig-r .caption td.content, .wrapfig-ri .caption td.content, .wrapfig-ir .caption td.content, .wrapfig-ro .caption td.content, .wrapfig-or .caption td.content, .wrapfig-l .caption td.content, .wrapfig-li .caption td.content, .wrapfig-il .caption td.content, .wrapfig-lo .caption td.content, .wrapfig-ol .caption td.content {white-space: normal; } +.wrapfig-r .caption, .wrapfig-ri .caption, .wrapfig-ir .caption, .wrapfig-ro .caption, .wrapfig-or .caption, .wrapfig-l .caption, .wrapfig-li .caption, .wrapfig-il .caption, .wrapfig-lo .caption, .wrapfig-ol .caption {width:30%; } + +/* end css.sty */ diff --git a/doc/html/user_21-5.html b/doc/html/user_21-5.html new file mode 100644 index 0000000..61cc50f --- /dev/null +++ b/doc/html/user_21-5.html @@ -0,0 +1,4412 @@ + + + + +LILO +Generic boot loader for Linux +Version 21.5 +User’s guide + + + + + + + + +
+ + + +

LILO
+Generic boot loader for Linux
+Version 21.5

+User’s guide

+
Werner Almesberger +
John R. Coffman +
(reconstructed by Joachim Wiedorn)
+
+
July 17, 2000
+
+

Contents

+
+1 Overview +
 1.1 Easy rules +
 1.2 System overview +
2 Introduction +
 2.1 Disk organization +
 2.2 Booting basics +
  2.2.1 MS-DOS alone +
  2.2.2 LOADLIN +
  2.2.3 LILO started by DOS-MBR +
  2.2.4 Several alternate branches +
  2.2.5 LILO started by BOOTACTV1 +
  2.2.6 LILO alone +
  2.2.7 Names +
 2.3 Choosing the “right” boot concept +
  2.3.1 BIOS restrictions +
  2.3.2 One disk, Linux on a primary partition +
  2.3.3 One disk, Linux on a logical partition +
  2.3.4 Two disks, Linux (at least partially) on the first disk +
  2.3.5 Two disks, Linux on second disk, first disk has an extended partition +
  2.3.6 Two disks, Linux on second disk, first disk has no extended partition +
  2.3.7 More than two disks +
  2.3.8 /boot on a DOS partition +
3 The boot prompt +
 3.1 Boot command-line options +
  3.1.1 Standard options +
  3.1.2 Device-specific options +
  3.1.3 Other options +
  3.1.4 Repeating options +
  3.1.5 Implicit options +
 3.2 Boot image selection +
4 Map installer +
 4.1 Command-line options +
  4.1.1 Show current installation +
  4.1.2 Create or update map +
  4.1.3 Change default command line +
  4.1.4 Kernel name translation + +
  4.1.5 De-installation +
  4.1.6 Print version number +
  4.1.7 Options corresponding to configuration variables +
 4.2 Configuration +
  4.2.1 Syntax +
  4.2.2 Global options +
  4.2.3 General per-image options +
  4.2.4 Per-image options for kernels +
 4.3 Boot image types +
  4.3.1 Booting kernel images from a file +
  4.3.2 Booting kernel images from a device +
  4.3.3 Booting a foreign operating system +
 4.4 Disk geometry +
  4.4.1 Obtaining the geometry +
  4.4.2 Specifying the geometry +
 4.5 Partition table manipulation +
  4.5.1 Partition activation +
  4.5.2 Partition type change rules +
  4.5.3 Partition type changes +
 4.6 Keyboard translation +
  4.6.1 Compiling keyboard translation tables +
  4.6.2 Using keyboard translation tables +
5 Installation and updates +
 5.1 Installation +
  5.1.1 Compatibility +
  5.1.2 Quick installation +
  5.1.3 Files +
  5.1.4 Normal first-time installation +
  5.1.5 Build-time configuration +
  5.1.6 Floppy disk installation +
 5.2 Updates +
  5.2.1 LILO update +
  5.2.2 Kernel update +
  5.2.3 System upgrade +
 5.3 LILO de-installation +
 5.4 Installation of other operating systems +
6 Troubleshooting +
 6.1 Map installer warnings and errors +
  6.1.1 Fatal errors +
  6.1.2 Warnings +
 6.2 Boot loader messages +
  6.2.1 LILO start message +
  6.2.2 Disk error codes +
 6.3 Other problems +
+

 
This document has only been partially updated and does reflect the status of Linux (until +2.2.16) and of LILO (until 21.5) in the year 2000.  
+

+

+

1 Overview

+

LILO is a versatile boot loader for Linux. It does not depend on a specific file system, can boot Linux kernel +images from floppy disks and from hard disks and can even act as a “boot manager” for other operating +systems.2 + +

One of up to sixteen different images can be selected at boot time. Various parameters, such as the root +device, can be set independently for each kernel. LILO can even be used as the master boot +record. +

This document introduces the basics of disk organization and booting, continues with an overview of +common boot techniques and finally describes installation and use of LILO in greater detail. The +troubleshooting section at the end describes diagnostic messages and contains suggestions for most problems +that have been observed in the past. +

Please read at least the sections about installation and configuration if you’re already using an older version +of LILO. This distribution is accompanied by a file named INCOMPAT that describes further incompatibilities +to older versions. +

For the impatient: there is a quick-installation script to create a simple but quite usable installation. See +section 5.1.2 for details. +

+

1.1 Easy rules

+

But wait here are a few easy rules that will help you to avoid most problems people experience with +LILO: +

+ + +

+

+

1.2 System overview

+

LILO is a collection of several programs and other files: +

+

+The map installer
is the program you run under Linux to put all files belonging to LILO at the + appropriate places and to record information about the location of data needed at boot time. + This program normally resides in /sbin/lilo. It has to be run to refresh that information + whenever any part of the system that LILO knows about changes, e.g. after installing a new + kernel. +
+Various files
contain data LILO needs at boot time, e.g. the boot loader. Those files normally reside + in /boot. The most important files are the boot loader (see below) and the map file (/boot/map), + where the map installer records the location of the kernel(s).3 + Another important file is the configuration file, which is normally called /etc/lilo.conf +
+The boot loader
is the part of LILO that is loaded by the BIOS and that loads kernels or the + boot sectors of other operating systems. It also provides a simple command-line interface to + interactively select the item to boot and to add boot options.
+

LILO primarily accesses the following parts of the system: +

+

+The root file system partition
is important for two reasons: first, LILO sometimes has to tell + the kernel where to look for it. Second, it is frequently a convenient place for many other items + LILO uses, such as the boot sector, the /boot directory, and the kernels. +
+The boot sector
contains the first part of LILO’s boot loader. It loads the much larger second-stage + loader. Both loaders are typically stored in the file /boot/boot.b +
+The kernel
is loaded and started by the boot loader. Kernels typically reside in the root directory + or in /boot.
+

Note that many of the files LILO needs at boot time have to be accessible with the BIOS. This creates +certain restrictions, see section 2.3.1. +

+ +

+

2 Introduction

+

The following sections describe how PCs boot in general and what has to be known when booting Linux +and using LILO in particular. +

+

+

2.1 Disk organization

+

When designing a boot concept, it is important to understand some of the subtleties of how +PCs typically organize disks. The most simple case are floppy disks. They consist of a boot +sector, some administrative data (FAT or super block, etc.) and the data area. Because that +administrative data is irrelevant as far as booting is concerned, it is regarded as part of the data area for +simplicity. +

+

+
+|------------|----------------------|
+|-Boot-sector--                      |
+|                                   |
+|             Data area             |
+|                                   |
+ ------------------------------------
+
+

The entire disk appears as one device (e.g. /dev/fd0) on Linux. +

The MS-DOS boot sector has the following structure: +

+

+
+       0x000 |Jump--to-the-program--code-|
+             |--------------------------|
+       0x003 |                          |
+             |     Disk parameters      |
+             |--------------------------|
+0x02C/0x03E  |                          |
+             |      Program  code       |
+             |                          |
+             |                          |
+       0x1FE |-Magic-number--(0xAA55-)--|
+             ---------------------------|
+
+

LILO uses a similar boot sector, but it does not contain the disk parameters part. This is no problem for +Minix, Ext2 or similar file systems, because they don’t look at the boot sector, but putting a LILO boot +sector on an MS-DOS file system would make it inaccessible for MS-DOS. +

Hard disks are organized in a more complex way than floppy disks. They contain several data areas called +partitions. Up to four so-called primary partitions can exist on an MS-DOS hard disk. If more partitions are +needed, one primary partition is used as an extended partition that contains several logical +partitions. +

The first sector of each hard disk contains a partition table, and an extended partition and each logical +partition contains a partition table too. +

+

+
+|------------------------------------------|
+|Partition table                  /dev/hda   |
+| |Partition-1-------------------/dev/hda1--|
+| |                                        |
+| |----------------------------------------|
+| |Partition 2                   /dev/hda2  |
+--------------------------------------------
+
+

The entire disk can be accessed as /dev/hda, /dev/hdb, /dev/sda, etc. The primary partitions are +/dev/hda1 /dev/hda4. +

+

+ +
+|------------------------------------------|
+|Partition-table------------------/dev/hda---|
+| |Partition 1                   /dev/hda1  |
+| |----------------------------------------|
+| |Partition 2                   /dev/hda2  |
+| |                                        |
+| |Extended--partition------------/dev/hda3--|
+| | |--------------------------------------|
+| | |Extended--partition-table---------------|
+| | |Partition 3                 /dev/hda5  |
+| | |--------------------------------------|
+| | |Extended--partition-table---------------|
+| | |Partition 4                 /dev/hda6  |
+| | |                                      |
+--------------------------------------------
+
+

This hard disk has two primary partitions and an extended partition that contains two logical partitions. +They are accessed as /dev/hda5 +

Note that the partition tables of logical partitions are not accessible as the first blocks of some devices, +while the main partition table, all boot sectors and the partition tables of extended partitions +are. +

Partition tables are stored in partition boot sectors. Normally, only the partition boot sector of the entire +disk is used as a boot sector. It is also frequently called the master boot record (MBR). Its structure is as +follows: +

+

+
+       |------------------------|
+0x000  |                        |
+       |     Program code       |
+       |                        |
+       |------------------------|
+0x1BE  |     Partition table     |
+       |                        |
+       |------------------------|
+0x1FE  -Magic-number--(0xAA55--)--
+
+

The LILO boot sector is designed to be usable as a partition boot sector. (I.e. there is room for the +partition table.) Therefore, the LILO boot sector can be stored at the following locations: +

+ + +

It can’t be stored at any of the following locations: +

+ +

Although LILO tries to detect attempts to put its boot sector at an invalid location, you should not rely on +that. +

+

+

2.2 Booting basics

+

When booting from a floppy disk, the first sector of the disk, the so-called boot sector, is loaded. That boot +sector contains a small program that loads the respective operating system. MS-DOS boot sectors also +contain a data area, where disk and file system parameters (cluster size, number of sectors, number of +heads, etc.) are stored. +

When booting from a hard disk, the very first sector of that disk, the so-called master boot +record (MBR) is loaded. This sector contains a loader program and the partition table of the +disk. The loader program usually loads the boot sector, as if the system was booting from a +floppy. + +

Note that there is no functional difference between the MBR and the boot sector other than that the MBR +contains the partition information but doesn’t contain any file system-specific information (e.g. MS-DOS +disk parameters). +

The first 446 (0x1BE) bytes of the MBR are used by the loader program. They are followed by the partition +table, with a length of 64 (0x40) bytes. The last two bytes contain a magic number that is sometimes used +to verify that a given sector really is a boot sector. +

There is a large number of possible boot configurations. The most common ones are described in the +following sections. +

+

+
2.2.1 MS-DOS alone
+

+

+
+|--------------------------------------------------------|
+|Master-Boot-Record-Boot-sector---------Operating system--|
+-DOS--MBR--------→----MS--DOS--------→----COMMAND.COM--------
+
+

This is what usually happens when MS-DOS boots from a hard disk: the DOS-MBR determines the active +partition and loads the MS-DOS boot sector. This boot sector loads MS-DOS and finally passes control to +COMMAND.COM. (This is greatly simplified.) +

+

+
2.2.2 LOADLIN
+

+

+ +
+|--------------------------------------------------------------|
+|MasterBoot-Record-Boot--sector-------Operating-systems-----------
+|DOS -MBR  ----→   MS  -DOS  --- -→   COMMAND.COM
+---------------→---LOADLIN-------→---Linux----------------------
+
+

A typical LOADLIN setup: everything happens like when booting MS-DOS, but in CONFIG.SYS or +AUTOEXEC.BAT, LOADLIN is invoked. Typically, a program like BOOT.SYS is used to choose among +configuration sections in CONFIG.SYS and AUTOEXEC.BAT. This approach has the pleasant property that no +boot sectors have to be altered. +

Please refer to the documentation accompanying the LOADLIN package for installation instructions and +further details. +

+

+
2.2.3 LILO started by DOS-MBR
+

+

+
+|--------------------------------------------------------|
+|Master Boot Record Boot sector        Operating system   |
+|DOS---MBR-------→---LILO-----------→---Linux-------------|
+|                                                        |
+----------------→---other-OS-----------------------------
+
+

This is a “safe” LILO setup: LILO is booted by the DOS-MBR. No other boot sectors have to be touched. +If the other OS (or one of them, if there are several other operating systems being used) should +be booted without using LILO, the other partition has to be marked “active” with fdisk or +activate. +

Installation:

+ + +

Deinstallation:

+ +

+

+
2.2.4 Several alternate branches
+

+

+
+|--------------------------------------------------------------|
+|MasterBoot-Record-Boot--sector-------Operating-systems-----------
+|DOS -MBR  ----→   MS  -DOS  --- -→   COMMAND.COM
+|             -→   LOADLIN    ---→   Linux
+|             -→   LILO  ----- --→   Linux
+---------------→---MS---DOS--—--⋅⋅⋅------------------------------
+
+

An extended form of the above setup: the MBR is not changed and both branches can either boot Linux or +MS-DOS. (LILO could also boot other operating systems.) +

+

+
2.2.5 LILO started by BOOTACTV6
+

+

+ +

+
+|--------------------------------------------------------|
+|Master-Boot-Record-Boot-sector--------Operating-system---|
+|BOOTACTV     --→   LILO  ------- -→   Linux             |
+|             - →   other OS
+---------------------------------------------------------
+
+

Here, the MBR is replaced by BOOTACTV (or any other interactive boot partition +selector) and the choice between Linux and the other operating system(s) can be made +at boot time. This approach should be used if LILO fails to boot the other operating +system(s).7 +

Installation:

+ +

Deinstallation:

+ +

If replacing the MBR appears undesirable and if a second Linux partition exists (e.g. /usr, +not a swap partition), BOOTACTV can be merged with the partition table and stored as the + +“boot sector” of that partition. Then, the partition can be marked active to be booted by the +DOS-MBR. +

Example: + +

+
+# dd if=/dev/hda of=/dev/hda3 bs=512 count=1 + 
# dd if=bootactv.bin of=/dev/hda3 bs=446 count=1
+

+

WARNING: Whenever the disk is re-partitioned, the merged boot sector on that “spare” Linux partition +has to be updated too. +

+
2.2.6 LILO alone
+

+

+
+|------------------------------------|
+|MasterBoot-Record-Operating-system--|
+|LILO --- -----→   Linux             |
+|             -→   other OS          |
+--------------------------------------
+
+

LILO can also take over the entire boot procedure. If installed as the MBR, LILO is responsible for either +booting Linux or any other OS. This approach has the disadvantage, that the old MBR is overwritten and +has to be restored (either from a backup copy, with FDISK /MBR on recent versions of MS-DOS or +by overwriting it with something like BOOTACTV) if Linux should ever be removed from the +system. +

You should verify that LILO is able to boot your other operating system(s) before relying on this +method. +

Installation:

+ +

Deinstallation:

+ +

If you’ve installed LILO as the master boot record, you have to explicitly specify the boot sector +(configuration variable boot=) when updating the map. Otherwise, it will try to use the boot sector of +your current root partition, which will usually work, but it will probably leave your system +unbootable. +

+

+
2.2.7 Names
+

The following names have been used to describe boot sectors or parts of operating systems: +

+

+“DOS-MBR”
is the original MS-DOS MBR. It scans the partition table for a partition that is + marked “active” and loads the boot sector of that partition. Programs like MS-DOS’ FDISK, + Linux fdisk or activate (accompanies LILO) can change the active marker in the partition table. +
+“MS-DOS”
denotes the MS-DOS boot sector that loads the other parts of the system (IO.SYS, + etc.). +
+“COMMAND.COM”
is the standard command interpreter of MS-DOS. +
+“LOADLIN”
is a program that loads a Linux kernel image from an MS-DOS partition into memory + and executes it. It is usually invoked from CONFIG.SYS and is used in combination with a + CONFIG.SYS configuration switcher, like BOOT.SYS.8 +
+“LILO”
can either load a Linux kernel or the boot sector of any other operating system. It has a first + + stage boot sector that loads the remaining parts of LILO from various locations.9 +
+“BOOTACTV”
permits interactive selection of the partition from which the boot sector should + be read. If no key is pressed within a given interval, the partition marked active is booted. + BOOTACTV is included in the pfdisk package. There are also several similar programs, like + PBOOT and OS-BS.10
+

+

+

2.3 Choosing the “right” boot concept

+

Although LILO can be installed in many different ways, the choice is usually limited by the present +setup and therefore, typically only a small number of configurations which fit naturally into an +existing system remains. The following sections describe various possible cases. See also section +2.3.1. +

The configuration file /etc/lilo.conf for the examples could look like this: + +

+
+boot = /dev/hda2 + 
compact + 
image = /vmlinuz + 
image = /vmlinuz.old + 
other = /dev/hda1 + 
  table = /dev/hda + 
  label = msdos
+

+

It installs a Linux kernel image (/vmlinuz), an alternate Linux kernel image (/vmlinuz.old) and a chain +loader to boot MS-DOS from /dev/hda1. The option compact on the second line instructs the map installer +to optimize loading. +

In all examples, the names of the IDE-type hard disk devices (/dev/hda) are used. Everything applies to +other disk types (e.g. SCSI disks; /dev/sda) too. +

+

+
2.3.1 BIOS restrictions
+

Nowadays, an increasing number of systems is equipped with comparably large disks or even with +multiple disks. At the time the disk interface of the standard PC BIOS has been designed (about +16 years ago), such configurations were apparently considered to be too unlikely to be worth +supporting. +

The most common BIOS restrictions that affect LILO are the limitation to two hard disks and the inability +to access more than 1024 cylinders per disk. LILO can detect both conditions, but in order to work around +the underlying problems, manual intervention is necessary. +

The drive limit does not exist in every BIOS. Some modern motherboards and disk controllers +are equipped with a BIOS that supports more (typically four) disk drives. When attempting +to access the third, fourth, etc. drive, LILO prints a warning message but continues. Unless +the BIOS really supports more than two drives, the system will not be able to boot in that +case.11 +

The cylinder limit is a very common problem with IDE disks. There, the number of cylinders may already +exceed 1024 if the drive has a capacity of more than 504 MB. Many SCSI driver BIOSes present the disk +geometry in a way that makes the limit occur near 1 GB. Modern disk controllers may even push + +the limit up to about 8 GB. All cylinders beyond the 1024th are inaccessible for the BIOS. +LILO detects this problem and aborts the installation (unless the linear option is used, see section +4.2.2). +

Note that large partitions that only partially extend into the “forbidden zone” are still in jeopardy even +if they appear to work at first, because the file system does not know about the restrictions +and may allocate disk space from the area beyond the 1024th cylinder when installing new +kernels. LILO therefore prints a warning message but continues as long as no imminent danger +exists. +

There are four approaches of how such problems can be solved:

+ +

LILO depends on the BIOS to load the following items:

+ +

Normally, this implies that the Linux root file system should be in the “safe” area. However, it is already +sufficient to put all kernels into /boot and to either mount a “good” partition on /boot or to let /boot be a +symbolic link pointing to or into such a partition. +

See also /usr/src/linux/Documentation/ide.txt (or /usr/src/linux/drivers/block/README.ide in +older kernels) for a detailed description of problems with large disks. +

+
2.3.2 One disk, Linux on a primary partition
+ +

If at least one primary partition of the first hard disk is used as a Linux file system (/, /usr, etc. but not as +a swap partition), the LILO boot sector should be stored on that partition and it should be booted by the +original master boot record or by a program like BOOTACTV. +

+

+
+   |------------------------|
+   |MBR----------/dev/hda---|
+   | |MS--DOS----/dev/hda1--|
+→  ---Linux-/----/dev/hda2---
+
+

In this example, the boot variable could be omitted, because the boot sector is on the root +partition. +

+

+
2.3.3 One disk, Linux on a logical partition
+

If no primary partition is available for Linux, but at least one logical partition of an extended partition on +the first hard disk contains a Linux file system, the LILO boot sector should be stored in the partition +sector of the extended partition and it should be booted by the original master boot record or by a program +like BOOTACTV. +

+

+
+   |------------------------|
+   |MBR----------/dev/hda---|
+   | |MS -DOS    /dev/hda1  |
+→  | |Extended---/dev/hda2--|
+   | |  |Linux---/dev/hda5--|
+   | |  |-------------------|
+   ------...-----/dev/hda6---
+
+ +

Because many disk partitioning programs refuse to make an extended partition (in our example /dev/hda2) +active, you might have to use activate, which comes with the LILO distribution. +

OS/2 BootManager should be able to boot LILO boot sectors from logical partitions. The installation on +the extended partition itself is not necessary in this case. +

+

+
2.3.4 Two disks, Linux (at least partially) on the first disk
+

This case is equivalent to the configurations where only one disk is in the system. The Linux boot sector +resides on the first hard disk and the second disk is used later in the boot process. +

Only the location of the boot sector matters – everything else (/boot/boot.b, /boot/map, the root file +system, a swap partition, other Linux file systems, etc.) can be located anywhere on the second disk, +provided that the constraints described in section 2.3.1 are met. +

+

+
2.3.5 Two disks, Linux on second disk, first disk has an extended partition
+

If there is no Linux partition on the first disk, but there is an extended partition, the LILO boot sector can +be stored in the partition sector of the extended partition and it should be booted by the original master +boot record or by a program like BOOTACTV. +

+

+
+   |-------First-disk-------|  |-----Second--disk-------|
+   |MBR          /dev/hda   |  |MBR          /dev/hdb   |
+   |  |MS--DOS----/dev/hda1--|  | |Linux------/dev/hdb1--|
+→  |  |Extended--/dev/hda2--|  | |...--------/dev/hdb2--|
+   |  | |-------------------|  | |                      |
+   |  | |...-----/dev/hda5--|  | |                      |
+   ------...-----/dev/hda6---  --------------------------
+
+

The program activate, that accompanies LILO, may have to be used to set the active marker on an extended +partition, because MS-DOS’ FDISK and some older version of Linux fdisk refuse to do that. (Which is +generally a good idea.) + +

+

+
2.3.6 Two disks, Linux on second disk, first disk has no extended partition
+

If there is neither a Linux partition nor an extended partition on the first disk, then there’s only one place +left, where a LILO boot sector could be stored: the master boot record. +

In this configuration, LILO is responsible for booting all other operating systems too. +

+

+
+   |-------First-disk-------|  |-----Second--disk-------|
+→  |MBR----------/dev/hda---|  |MBR----------/dev/hdb---|
+   |  |MS--DOS----/dev/hda1--|  | |Linux------/dev/hdb1--|
+   ----...-------/dev/hda2---  ---...--------/dev/hdb2---
+
+

You should back up your old MBR before installing LILO and verify that LILO is able to boot your other +operating system(s) before relying on this approach. +

The line boot = /dev/hda2 in /etc/lilo.conf would have to be changed to boot = /dev/hda in this +example. +

+

+
2.3.7 More than two disks
+

On systems with more than two disks, typically only the first two can be accessed. The configuration choices +are therefore the same as with two disks. +

When attempting to access one of the extra disks, LILO displays a warning message (Warning: BIOS +drive 0xnumber may not be accessible) but does not abort. This is done in order to allow the lucky +few whose BIOS (or controller-BIOS) does support more than two drives to make use of this feature. By all +others, this warning should be considered a fatal error. +

Note that the two disks restriction is only imposed by the BIOS. Linux normally has no problems using all +disks once it is booted. + +

+

+
2.3.8 /boot on a DOS partition
+

Recent kernels support all the functions LILO needs to map files also on MS-DOS (or UMSDOS) file +systems. Since DOS partitions tend to occupy exactly the places where BIOS restrictions (see section 2.3.1) +are invisible, they’re an ideal location for /boot if the native Linux file systems can’t be used because of +BIOS problems. +

In order to accomplish this, the DOS partition is mounted read-write, a directory (e.g. /dos/linux) is +created, all files from /boot are moved to that directory, /boot is replaced by a symbolic link to it, the +kernels are also moved to the new directory, their new location is recorded in /etc/lilo.conf, and finally +/sbin/lilo is run. +

From then on, new kernels must always be copied into that directory on the DOS partition +before running /sbin/lilo, e.g. when recompiling a kernel, the standard procedure changes +from + +

+
+# make zlilo
+

+

to + +

+
+# make zImage + 
# mv /dos/linux/vmlinuz /dos/linux/vmlinuz.old + 
# mv arch/i386/boot/zImage /dos/linux/vmlinuz + 
# /sbin/lilo
+

+

WARNING: De-fragmenting such a DOS partition is likely to make Linux or even the whole +system unbootable. Therefore, the DOS partition should either not be de-fragmented, or a Linux +boot disk should be prepared (and tested) to bring up Linux and to run /sbin/lilo after the +de-fragmentation.12 +

+ +

+

3 The boot prompt

+

Immediately after it’s loaded, LILO checks whether one of the following is happening: +

+ +

If this is the case, LILO displays the boot: prompt and waits for the name of a boot +image (i.e. Linux kernel or other operating system). Otherwise, it boots the default boot +image13 +or – if a delay has been specified – waits for one of the listed activities until that amount of time has +passed. +

At the boot prompt, the name of the image to boot can be entered. Typing errors can be corrected with +[BackSpace], [Delete], [Ctrl U] and [Ctrl X]. A list of known images can be obtained by pressing [?] or +[Tab]. +

If [Enter] is pressed and no file name has been entered, the default image is booted. +

+

3.1 Boot command-line options

+

LILO is also able to pass command-line options to the kernel. Command-line options are words that follow +the name of the boot image and that are separated by spaces. +

Example: + +

+
+boot: linux single root=200
+

+

This document only gives an overview of boot options. Please consult Paul Gortmaker’s BootPrompt-HOWTO +for a more complete and more up to date list. You can get it from +

ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/BootPrompt-HOWTO.gz +

or from one of the many mirror sites. +

+

+
3.1.1 Standard options
+

Recent kernels recognize a large number of options, among them are debug, no387, no-hlt, ramdisk=size, +reserve=base,size,, root=device, ro, and rw. All current init programs also recognize the option single. +The options lock and vga are processed by the boot loader itself. Boot command-line options are always +case-sensitive. +

single boots the system in single-user mode. This bypasses most system initialization procedures and +directly starts a root shell on the console. Multi-user mode can typically be entered by exiting the +single-user shell or by rebooting. +

root=device changes the root device. This overrides settings that may have been made in the +boot image and on the LILO command line. device is either the hexadecimal device number +14 or the full path name of +the device, e.g. /dev/hda3.15 + +

reserve=base,size, reserves IO port regions. This can be used to prevent device drivers from auto-probing +addresses where other devices are located, which get confused by the probing. +

ro instructs the kernel to mount the root file system read-only. rw mounts it read-write. If neither ro nor rw +is specified, the setting from the boot image is used. +

no-hlt avoids executing a HLT instructions whenever the system is idle. HLT normally significantly reduces +power consumption and therefore also heat dissipation of the CPU, but may not work properly with some +clone CPUs. no387 disables using the hardware FPU even if one is present. +

debug enables more verbose console logging. +

Recent kernels also accept the options init=name and noinitrd. init specifies the name of the init +program to execute. Therefore, if single mode cannot be entered because init is mis-configured, one may still +be able to reach a shell using init=/bin/sh. noinitrd disables automatic loading of the initial RAM disk. +Instead, its content is then available on /dev/initrd. +

vga=mode alters the VGA mode set at startup. The values normal, extended, ask or a decimal number are +recognized. (See also page §.) +

kbd=code, preloads a sequence of keystrokes in the BIOS keyboard buffer. The keystrokes have to be +entered as 16 bit hexadecimal numbers, with the upper byte containing the scan code and the lower byte +containing the ASCII code. Note that most programs only use the ASCII code, so the scan code can +frequently be omitted. Scan code tables can be found in many books on PC hardware. Note that scan codes +depend on the keyboard layout. +

Finally, lock stores the current command-line as the default command-line, so that LILO boots the same +image with the same options (including lock) when invoked the next time. +

+
3.1.2 Device-specific options
+

There is also a plethora of options to specify certain characteristics (e.g. IO and memory addresses) of +devices. Some common ones are ether, floppy, hd, bmouse, and sound. The usage of these options is +option=number,. Please consult the corresponding FAQs and HOWTOs for details. For an overview of all +available options, consult the file init/main.c in the kernel source tree. +

+

+
3.1.3 Other options
+

Options of the type variable=value which are neither standard options nor device-specific options, cause the +respective variables to be set in the environment passed to init. The case of the variable name is preserved, +i.e. it isn’t automatically converted to upper case. +

Note that environment variables passed to init are typically available in system initialization scripts (e.g. +/etc/rc.local), but they’re not visible from ordinary login sessions, because the login program removes +them from the user’s environment. + +

+

+
3.1.4 Repeating options
+

The effect of repeating boot command-line options depends on the +options.16 +There are three possible behaviours: +

Options that only enable or disable a certain functionality can be repeated any number of times. debug, +lock, no-hlt, and no387 fall into this category. +

Other options change a global setting whenever they appear, so only the value or presence of the last option +matters. The antagonists ro and rw are such options. Also, ramdisk, root, and vga work this way. +Example: ro rw would mount the root file system read-write. +

Finally, when reserve and many device-specific options are repeated, each occurrence has its own meaning, +e.g. +

hd= hd= would configure two hard disks, and +

reserve=0x300,8 reserve=0x5f0,16 would reserve the ranges 0x300 to 0x307 and 0x5f0 to 0x5ff (which is +equivalent to writing reserve=0x300,8,0x5f0,16). +

+
3.1.5 Implicit options
+

LILO always passes the string BOOT_IMAGE=name to the kernel, where name is the name by which the +kernel is identified (e.g. the label). This variable can be used in /etc/rc to select a different behaviour, +depending on the kernel. +

When booting automatically, i.e. without human intervention, the word auto is also passed +on the command line. This can be used by init to suppress interactive prompts in the boot +phase. +

+

+

3.2 Boot image selection

+

The details of selecting the boot image are somewhat complicated. The following tables illustrate them. +First, if neither prompt is set nor a shift key is being pressed: +

+ +

+
+                        |
+ Externally   Command   | Auto-  Booted  image
+  provided     line in  | matic
+ cmd. line17   map file18 |boot19
+-----No----------No-----|--Yes---Default-image--------------- 17Externally provided command lines could be used to add front- ends to LILO. They would pass the respective 18This command line is set by invoking the map installer with the -R option, by using the boot command -line option
+     Yes         —      |  Yes   Specified by external      command string to LILO, which would then interpret it like keyboard input. This feature is currently not used. lock, or if a fallback command line is set (with fallback).                                    19I.e. the keyword auto is a
+                        |
+                        |        command   line
+     No          Yes    |  Yes   Specified by command   line
+                        |        in map file
+
+

If prompt is not set and a shift key is being pressed: +

+
+                                    |
+  Input    Empty   Extern.  Cmd.l.  |Auto-  Booted  image
+ timeout   cmd.l.   cmd.l.  in map  |matic
+                              file   |boot
+----No------No-------—--------—-----|-No----Specified-by-the-user-
+                                    |
+    No      Yes      —        —     | No    Default image
+   Yes      n/a      —        —     | Yes   Default image
+
+

Finally, if the configuration variable prompt is set: +

+
+   Input    Empty   Extern.   Cmd.l. |Auto -  Booted image
+                                    |
+  timeout   cmd.l.   cmd.l.  in map  |matic
+------------------------------file---|-boot------------------------
+    No       No      No       No    | No     Specified by the user
+    No      Yes      No       No    | No     Default image
+    Yes     n/a      No       No    | Yes    Default image
+   n/a      n/a      Yes       —    | Yes    Specified by external
+                                    |        command  line
+                                    |
+   n/a      n/a      No       Yes   | Yes    Specified by command
+                                    |        line in map  file
+
+

Note that LILO pauses for the amount of time specified in delay when at the end of a default command +line. The automatic boot can then be interrupted by pressing a modifier key ([Shift], [Ctrl], +etc.). +

The default image is the first image in the map file or the image specified with the default +variable. However, after an unsuccessful boot attempt, the respective image becomes the default +image. +

+ +

+

4 Map installer

+

The map installer program /sbin/lilo updates the boot sector and creates the map file. If the map +installer detects an error, it terminates immediately and does not touch the boot sector and the map +file. +

Whenever the map installer updates a boot sector, the original boot sector is copied to
/boot/boot.number
where number is the hexadecimal device number. If such a file already exists, no backup copy is made. +Similarly, a file
/boot/part.number
is created if LILO modifies the partition table. (See page §.) +

+

+

4.1 Command-line options

+

The LILO map installer can be invoked in the following ways: +

+

+
4.1.1 Show current installation
+

The currently mapped files are listed. With -v, also many parameters are shown. +

+

/sbin/lilo [ -C config_file ] -q [ -m map_file ] [ -v ]   +

+

+-C config_file
 
Specifies the configuration file that is used by the map installer (see section 4.2). If -C is omitted, + /etc/lilo.conf is used. +
+-m map_file
 
Specifies an alternate map file. See also sections 4.1.7 and 4.2.2. +
+-q
 
Lists the currently mapped files. +
+-v
 
Increase verbosity. See also sections 4.1.7 and 4.2.2.
+ +

+

+
4.1.2 Create or update map
+

A new map is created for the images described in the configuration file /etc/lilo.conf and they are +registered in the boot sector. +

+

/sbin/lilo [ -C config_file ] [ -b boot_device ] [ -c ] [ -l ] [ -i boot_sector ]
        [ -f disk_tab ] [ -m map_file ] [ -d delay ] [ -v ] [ -t ] [ -s save_file |
        -S save_file ] [ -P fix | -P ignore ] [ -r root_dir ]   +

+

+-b boot<_device
 
Specifies the boot device. See also sections 4.1.7 and 4.2.2. +
+-c
 
Enables map compaction. See also sections 4.1.7 and 4.2.2. +
+-C config_file
 
Specifies an alternate configuration file. See also section 4.1.1. +
+-d delay
 
Sets the delay before LILO boots the default image. Note that the delay is specified in tenths + of a second. See also sections 4.1.7 and 4.2.2. +
+-D name
 
Specifies the default image. See also sections 4.1.7 and 4.2.2. +
+-f disk_tab
 
Specifies a disk parameter table file. See also sections 4.1.7 and 4.2.2. +
+-i boot_sector
 
Specifies an alternate boot file. See also sections 4.1.7 and 4.2.2. +
+-L
 
Enables lba32 sector addresses. See also sections 4.1.7 and 4.2.2. +
+-l
 
Enables linear sector addresses. See also sections 4.1.7 and 4.2.2. + +
+-m map_file
 
Specifies an alternate map file. See also sections 4.1.7 and 4.2.2. +
+-P mode
 
Specifies how invalid partition table entries should be handled. See also sections 4.1.7 and 4.2.2. +
+-r root_directory
 
Chroots to the specified directory before doing anything else. This is useful when running the + map installer while the normal root file system is mounted somewhere else, e.g. when recovering + from an installation failure with a recovery disk. The -r option is implied if the environment + variable ROOT is set.20 + The current directory is changed to the new root directory, so using relative paths may not + work. +
+-s save_file
 
Specifies an alternate boot sector save file. See also sections 4.1.7 and 4.2.2. +
+-S save_file
 
Like -s, but overwrites old save files. +
+-t
 
Test only. This performs the entire installation procedure except replacing the map file, writing + the modified boot sector and fixing partition tables. This can be used in conjunction with the + -v option to verify that LILO will use sane values. +
+-v
 
Increase verbosity. See also sections 4.1.7 and 4.2.2.
+

+

+
4.1.3 Change default command line
+

Changes LILO’s default command line. See also section 3.2. +

+

/sbin/lilo [ -C config_file ] [ -m map_file ] -R [ word ]   +

+

+-C config_file
 
Specifies an alternate configuration file. See also section 4.1.1. + +
+-m map_file
 
Specifies an alternate map file. See also sections 4.1.7 and 4.2.2. +
+-R word
 
Stores the specified words in the map file. The boot loader uses those words as the default + command line when booting the next time. That command line is removed from the map file by + the boot loader by overwriting the sector immediately after reading it. The first word has to be + the name of a boot image. If -R is not followed by any words, the current default command line in + the map file is erased.21 + If the command line isn’t valid, the map installer issues an error message and returns a non-zero + exit code.
+

+

+
4.1.4 Kernel name translation
+

Determines the path of the kernel. +

/sbin/lilo [ -C config_file ] -I name [ options ]   +

+

+-C config_file
 
Specifies an alternate configuration file. See also section 4.1.1. +
+-I name [ options ]
 
Translates the specified label name to the path of the corresponding kernel image and prints that + path on standard output. This can be used to synchronize files that depend on the kernel (e.g. + the ps database). The image name can be obtained from the environment variable BOOT_IMAGE. + An error message is issued and a non-zero exit code is returned if no matching label name can + be found. The existence of the image file is verified if the option character v is added.
+

+

+
4.1.5 De-installation
+

Restores the boot sector that was used before the installation of LILO. Note that this option only works +properly if LILO’s directories (e.g. /boot) have not been touched since the first installation. See also section + +5.3. +

/sbin/lilo [ -C config_file ] [ -s save_file ] -u | -U [ boot_device ]   +

+

+-C config_file
 
Specifies an alternate configuration file. See also section 4.1.1. +
+-s save_file
 
Specifies an alternate boot sector save file. See also sections 4.1.7 and 4.2.2. +
+-u [ device_name ]
 
Restores the backup copy of the specified boot sector. If no device is specified, the value of the + boot variable is used. If this one is also unavailable, LILO uses the current root device. The + name of the backup copy is derived from the device name. The -s option or the backup variable + can be used to override this. LILO validates the backup copy by checking a time stamp. +
+-U [ device_name ]
 
Like -u, but does not check the time stamp.
+

+

+
4.1.6 Print version number
+

/sbin/lilo -V   +

+

+-V
 
Print the version number and exit.
+

+

+
4.1.7 Options corresponding to configuration variables
+

There are also many command-line options that correspond to configuration variables. See section 4.2.2 for +a description. +

+ +

+
+                      |
+-Command----line option|Con-figuration-variable-----
+ -b  bootxdevice       |boot=bootxdevice
+ -c                   |compact
+ -d  tsecs             |delay=tsecs
+                      |
+ -D  name             |default=name
+ -i  bootxsector        |install=bootxsector
+ -L                   |lba32
+ -l                   |linear
+ -m  mapxfile          |map=mapx  file
+ -P  fix              |fix -table
+ -P  ignore           |ignore -table
+                      |
+ -s  backupx file        |backup=backupx file
+ -S  backupx file        |force -backup=backupx file
+ -v  ...               |verbose=level
+
+

+

+

4.2 Configuration

+

The configuration information is stored in the file /etc/lilo.conf and consists of variable +assignments. +

+

+
4.2.1 Syntax
+

The following syntax rules apply: +

+ +

Example: + +

+
+boot = $FD + 
install = $MNT/boot.b + 
map = $MNT/map + 
compact + 
read-only + 
append = "nfsroot=/home/linux-install/root \ + 
  nfsaddrs=128.178.156.28:128.178.156.24::255.255.255.0:lrcinst" + 
image = $MNT/zImage
+

+

+

+
4.2.2 Global options
+

/etc/lilo.conf begins with a possibly empty global options section. Many global options can also be +set from the command line, but storing permanent options in the configuration file is more +convenient. +

The following global options are recognized: +

+

+backup=backup_file
Copy the original boot sector to backup_file (which may also be a device, e.g. + /dev/null) instead of /boot/boot.number +
+boot=boot_device
Sets the name of the device (e.g. a hard disk partition) that contains the boot + sector. If boot is omitted, the boot sector is read from (and possibly written to) the device that + is currently mounted as root. +
+change-rules
Defines partition type numbers. See section 4.5.2 for details. +
+compact
Tries to merge read requests for adjacent sectors into a single read request. This drastically + reduces load time and keeps the map smaller. Using compact is especially recommended when + booting from a floppy disk. compact may conflict with linear or lba32, see section 6.3. +
+default=name
Uses the specified image as the default boot image. If default is omitted, the image + appearing first in the configuration file is used. +
+delay=tsecs
Specifies the number of tenths of a second LILO should wait before booting the first + + image. This is useful on systems that immediately boot from the hard disk after enabling the + keyboard. LILO doesn’t wait if delay is omitted or if delay is set to zero. +
+disk=device_name
Defines non-standard parameters for the specified disk. See section 4.4 for details. +
+fix-table
Allows LILO to adjust 3D addresses in partition tables. Each partition entry contains + a 3D (sector/head/cylinder) and a linear 32-bit address of the first and the last sector of + the partition. If a partition is not track-aligned and if certain other operating systems (e.g. + PC/MS-DOS or OS/2) are using the same disk, they may change the 3D address. LILO can + store its boot sector only on partitions where both address types correspond. LILO re-adjusts + incorrect 3D start addresses if fix-table is set. +

WARNING: This does not guarantee that other operating systems may not attempt to reset + the address later. It is also possible that this change has other, unexpected side-effects. The + correct fix is to re-partition the drive with a program that does align partitions to tracks. Also, + with some disks (e.g. some large EIDE disks with address translation enabled), under some + circumstances, it may even be unavoidable to have conflicting partition table entries. +

+force-backup=backup_file
Like backup, but overwrite an old backup copy if it exists.
backup=backup_file is ignored if force-backup appears in the same configuration file. +
+ignore-table
Tells LILO to ignore corrupt partition tables and to put the boot sector even on + partitions that appear to be unsuitable for that. +
+install=boot_sector
Install the specified file as the new boot sector. If install is omitted,
/boot/boot.b is used as the default. +
+keytable=table_file
Re-map the keyboard as specified in this file. See section 4.6 for details. +
+lba32
Generate 32-bit Logical Block Addresses instead of sector/head/cylinder addresses. If the + BIOS supports packet addressing, then packet calls will be used to access the disk. This allows + booting from any partition on disks with more than 1024 cylinders. If the BIOS does not + support packet addressing, then lba32 addresses are translated to C:H:S, just as for linear. + All floppy disk references are retained in C:H:S form. Use of lba32 is recommended on all + post-1998 systems. lba32 may conflict with compact, see section 6.3. +
+linear
Generate linear sector addresses instead of sector/head/cylinder addresses. Linear addresses + are translated at run time and do not depend on disk geometry. Note that boot disks may + not be portable if linear is used, because the BIOS service to determine the disk geometry + does not work reliably for floppy disks. When using linear with large disks, /sbin/lilo may + generate references to inaccessible disk areas (see section 2.3.1), because 3D sector addresses + are not known before boot time. linear may conflict with compact, see section 6.3. +
+map=map_file
Specifies the location of the map file. If map is omitted, a file /boot/map is used. +
+ +message=message_file
Specifies a file containing a message that is displayed before the boot prompt. + No message is displayed while waiting for a modifier key ([Shift], etc.) after printing “LILO ”. + In the message, the FF character ([Ctrl L]) clears the local screen. The size of the message file + is limited to 65535 bytes. The map file has to be rebuilt if the message file is changed or moved. +
+nowarn
Disables warnings about possible future dangers. +
+prompt
Forces entering the boot prompt without expecting any prior key-presses. Unattended + reboots are impossible if prompt is set and timeout isn’t. +
+serial=parameters
Enables control from a serial line. The specified serial port is initialized and LILO is + accepting input from it and from the PC’s keyboard. Sending a break on the serial line corresponds + to pressing a shift key on the console in order to get LILO’s attention. All boot images + should be password-protected if the serial access is less secure than access to the console, + e.g. if the line is connected to a modem. The parameter string has the following syntax: +
port,bps parity bits
The components bps, parity and bits can be omitted. If a component is omitted, all following + components have to be omitted too. Additionally, the comma has to be omitted if only the port + number is specified. +
+ port
the number of the serial port, zero-based. 0 corresponds to COM1 alias /dev/ttyS0, etc. + All four ports can be used (if present). +
+ bps
the baud rate of the serial port. The following baud rates are supported: 110, 300, 1200, + 2400, 4800, 9600, 19200, and 38400 bps. Default is 2400 bps. +
+ parity
the parity used on the serial line. LILO ignores input parity and strips the 8th bit. The + following (upper or lower case) characters are used to describe the parity: n for no parity, + e for even parity and o for odd parity. +
+ bits
the number of bits in a character. Only 7 and 8 bits are supported. Default is 8 if parity + is “none”, 7 if parity is “even” or “odd”.
+

If serial is set, the value of delay is automatically raised to 20. +

Example: serial=0,2400n8 initializes COM1 with the default parameters. +

+timeout=tsecs
Sets a timeout (in tenths of a second) for keyboard input. If no key is pressed for the + specified time, the first image is automatically booted. Similarly, password input is aborted if the user + is idle for too long. The default timeout is infinite. +
+verbose=level
Turns on lots of progress reporting. Higher numbers give more verbose output. If -v is + additionally specified on the command line, level is increased accordingly. The following verbosity + levels exist: + +
+ <0
only warnings and errors are shown +
+ 0
prints one line for each added or skipped image +
+ 1
mentions names of important files and devices and why they are accessed. Also displays + informational messages for exceptional but harmless conditions and prints the version + number. +
+ 2
displays statistics and processing of temporary files and devices +
+ 3
displays disk geometry information and partition table change rules +
+ 4
lists sector mappings as they are written into the map file (i.e. after compaction, in a format + suitable to pass it to the BIOS) +
+ 5
lists the mapping of each sector (i.e. before compaction, raw)
+

When using the -q option, the levels have a slightly different meaning: +

+ 0
displays only image names +
+ 1
also displays all global and per-image settings +
+ 2
displays the address of the first map sector
+
+

Additionally, the kernel configuration parameters append, initrd, ramdisk, read-only, read-write, root +and vga, and the general per-image options fallback, lock, optional, password, restricted, and +single-key can be set in the global options section. They are used as defaults if they aren’t specified in the +configuration sections of the respective images. See below for a description. +

The plethora of options may be intimidating at first, but in “normal” configurations, hardly any options but +boot, compact, delay, root, and vga are used. +

+

+
4.2.3 General per-image options
+

The following options can be specified for all images, independent of their type: +

+alias=name
Specifies a second name for the current entry. + +
+fallback=command_line
Specifies a string that is stored as the default command line if the current + image is booted. This is useful when experimenting with kernels which may crash before allowing + interaction with the system. If using the fallback option, the next reboot (e.g. triggered + by a manual reset or by a watchdog timer) will load a different (supposedly stable) kernel. + The command line by the fallback mechanism is cleared by removing or changing the default + command line with the -R option, see 4.1.3. +
+label=name
By default, LILO uses the main file name (without its path) of each image specification + to identify that image. A different name can be used by setting the variable label. +
+lock
Enables automatic recording of boot command lines as the defaults for the following boots. + This way, LILO “locks” on a choice until it is manually overridden. +
+optional
Omit this image if its main file is not available at map creation time. This is useful to + specify test kernels that are not always present. +
+password=password
Ask the user for a password when trying to load this image. Because the + configuration file contains unencrypted passwords when using this option, it should only be + readable for the super-user. Passwords are always case-sensitive. +
+restricted
Relaxes the password protection by requiring a password only if parameters are specified + on the command line (e.g. single). restricted can only be used together with password. +
+single-key
Enables booting the image by hitting a single key, without the need to press [Enter] + afterwards. single-key requires that either the image’s label or its alias (or both) is a single + character. Furthermore, no other image label or alias may start with that character, e.g. an + entry specifying a label linux and an alias l is not allowed with single-key. Note that you + can’t specify command-line parameters for an entry for which only single-keyed names exist.
+

All general per-image options, with the exception of label and alias, can also be set in the global options +section as defaults for all images. +

Example: + +

+
+password = Geheim + 
single-key + 
image = /vmlinuz + 
  label = linux + 
  alias = 1 + 
  restricted + 
other = /dev/hda1 + 
  label = dos + 
  alias = 2
+

+

+

+
4.2.4 Per-image options for kernels
+

Each (kernel or non-kernel) image description begins with a special variable (see section 4.3) which is +followed by optional variables. The following variables can be used for all image descriptions that describe a +Linux kernel: +

+

+append=string
Appends the options specified in string to the parameter line passed to the kernel. + This is typically used to specify parameters of hardware that can’t be entirely auto-detected, + e.g.
append = "aha152x=0x140,11" +
+initrd=name
Specifies the file that will be loaded at boot time as the initial RAM disk. +
+literal=string
like append, but removes all other options (e.g. setting of the root device). Because + vital options can be removed unintentionally with literal, this option cannot be set in the + global options section. +
+ramdisk=size
Specifies the size of the optional RAM disk. A value of zero indicates that no RAM + disk should be created. If this variable is omitted, the RAM disk size configured into the boot + image is used. +
+read-only
Specifies that the root file system should be mounted read-only. Typically, the system + startup procedure re-mounts the root file system read-write later (e.g. after fsck’ing it). + +
+read-write
specifies that the root file system should be mounted read-write. +
+root=root_device
Specifies the device that should be mounted as root. If the special name current + is used, the root device is set to the device on which the root file system is currently mounted. + If the root has been changed with -r, the respective device is used. If the variable root is + omitted, the root device setting contained in the kernel image is used. It can be changed with + the rdev program. +
+vga=mode
Specifies the VGA text mode that should be selected when booting. The following values are + recognized (case is ignored): +
+ normal
select normal 80x25 text mode. +
+ extended
select 80x50 text mode. The word extended can be abbreviated to ext. +
+ ask
stop and ask for user input (at boot time). +
+ number
use the corresponding text mode. A list of available modes can be obtained by booting + with vga=ask and pressing [Enter].
+

If this variable is omitted, the VGA mode setting contained in the kernel image is used. rdev supports + manipulation of the VGA text mode setting in the kernel image.

+

All kernel per-image options but literal can also be set in the global options section as defaults for all +kernels. +

If one of ramdisk, read-only, read-write, root, or vga is omitted in the configuration file and +the corresponding value in the kernel image is changed, LILO or the kernel will use the new +value. +

It is perfectly valid to use different settings for the same image, because LILO stores them in the image +descriptors and not in the images themselves. +

Example: + +

+
+image = /vmlinuz + 
  label = lin-hd + 
  root = /dev/hda2 + 
image = /vmlinuz + 
  label = lin-fd + 
  root = /dev/fd0
+

+

+

+

4.3 Boot image types

+

LILO can boot the following types of images:

+ +

The image type is determined by the name of the initial variable of the configuration section. +

The image files can reside on any media that is accessible at boot time. There’s no need to put them on the +root device, although this certainly doesn’t hurt. +

+

+
4.3.1 Booting kernel images from a file
+

The image is specified as follows: image=name +

Example: + +

+
+image = /linux
+

+

See sections 4.2.3 and 4.2.4 for the options that can be added in a kernel image section. +

+

+
4.3.2 Booting kernel images from a device
+

The range of sectors that should be mapped has to be specified. Either a range (start-end) or a start and a +distance (start+number) have to be specified. start and end are zero-based. If only the start is specified, +only that sector is mapped. +

The image is specified as follows: image=device_name Additionally, the range variable must be +set. +

Example: + +

+
+image = /dev/fd0 + 
  range = 1+512
+

+

All kernel options can also be used when booting the kernel from a device. +

+

+
4.3.3 Booting a foreign operating system
+

LILO can even boot other operating systems, i.e. MS-DOS. To boot an other operating system, the name of +a loader program, the device or file that contains the boot sector and the device that contains the partition +table have to be specified. +

The boot sector is merged with the partition table and stored in the map file. +

Currently, the loaders chain.b and os2_d.b exist. chain.b simply starts the specified boot +sector.22 +os2_d.b it a variant of chain.b that can boot OS/2 from the second hard disk. The map-drive option has +to be used with os2_d.b to actually swap the drives. +

The image is specified as follows: other=device_name or other=file_name +

In addition to the options listen in section 4.2.3, the following variables are recognized: +

+change
Change the partition table according to the rules specified in this change section. This option + is intended for booting systems which find their partitions by examining the partition table. + See section 4.5.3 for details. +
+loader=chain_loader
Specifies the chain loader that should be used. If it is omitted, /boot/chain.b + is used. +
+map-drive=bios_device_code
Instructs chain.b to installs a resident driver that re-maps the floppy + or hard disk drives. This way, one can boot any operating system from a hard disk different + from the first one, as long as that operating system uses only the BIOS to access that hard + + disk.23 + This is known to work for PC/MS-DOS. +

map-drive is followed by the variable to=bios_device_code which specifies the drive that should + effectively be accessed instead of the original one. The list of mappings is only searched until + the first match is found. It is therefore possible to “swap” drives, see the second example below. +

+table=device
Specifies the device that contains the partition table. LILO does not pass partition + information to the booted operating system if this variable is omitted. (Some operating systems + have other means to determine from which partition they have been booted. E.g. MS-DOS + usually stores the geometry of the boot disk or partition in its boot sector.) Note that + /sbin/lilo must be re-run if a partition table mapped referenced with table is modified. +
+unsafe
Do not access the boot sector at map creation time. This disables some sanity checks, + including a partition table check. If the boot sector is on a fixed-format floppy disk device, using + unsafe avoids the need to put a readable disk into the drive when running the map installer. + unsafe and table are mutually incompatible.
+

None of these options can be set in the global options section. +

Examples: + +

+
+other = /dev/hda2 + 
  label = dos + 
  table = /dev/hda
+

+ +

+
+other = /dev/hdb2 + 
  label = os2 + 
  loader = /boot/os2_d.b + 
  map-drive = 0x80 + 
    to = 0x81 + 
  map-drive = 0x81 + 
    to = 0x80
+

+

+

4.4 Disk geometry

+

For floppies and most hard disks, LILO can obtain the disk geometry information from the kernel. +Unfortunately, there are some exotic disks or adapters which may either not supply this information or +which may even return incorrect information. +

If no geometry information is available, LILO reports either the error
geo_query_dev HDIO_GETGEO (dev 0xnumber)
or
Device 0xnumber: Got bad geometry sec/hd/cyl +

If incorrect information is returned, booting may fail in several ways, typically with a partial “LILO” +banner message. In this document, that is called a “geometry mismatch”. +

The next step should be to attempt setting the lba32 or linear configuration variable or the -L or -l +command-line option. If this doesn’t help, the entire disk geometry has to be specified explicitly. Note that +linear doesn’t always work with floppy disks. +

Another common use of disk sections is if an (E)IDE and a SCSI drive are used in the same system and the +BIOS is configured to use the SCSI drive as the first drive. (Normally, the (E)IDE drive would be the first +drive and the SCSI drive would be the second one.) Since LILO doesn’t know how the BIOS +is configured, it needs to be told explicitly about this arrangement. (See the second example +below.) +

+

+
4.4.1 Obtaining the geometry
+

The disk geometry parameters can be obtained by booting MS-DOS and running the program DPARAM.COM +with the hexadecimal BIOS code of the drive as its argument, e.g. dparam 0x80 for the first hard disk. It +displays the number of sectors per track, the number of heads per cylinder and the number of cylinders. All +three numbers are one-based. + +

Alternatively, the geometry may also be determined by reading the information presented by the “setup” +section of the ROM-BIOS or by using certain disk utilities under operating systems accessing the disk +through the BIOS. +

+

+
4.4.2 Specifying the geometry
+

Disk geometry parameters are specified in the options section of the configuration file. Each disk parameter +section begins with disk=disk_device, similar to the way how boot images are specified. It is suggested to +group disk parameter sections together, preferably at the beginning or the end of the options +section. +

For each disk, the following variables can be specified: +

+bios=bios_device_code
Is the number the BIOS uses to refer to that device. Normally, it’s 0x80 for + the first hard disk and 0x81 for the second hard disk. Note that hexadecimal numbers have to + begin with “0x”. If bios is omitted, LILO tries to “guess” that number. +
+sectors=sectors
and +
+heads=heads
specify the number of sectors per track and the number of heads, i.e. the number of + tracks per cylinder. Both parameters have to be either specified together or they have to be + entirely omitted. If omitted, LILO tries to obtain that geometry information from the kernel. +
+cylinders=cylinders
Specifies the number of cylinders. This value is only used for sanity checks. + If cylinders is omitted, LILO uses the information obtained from the kernel if geometry + information had to be requested in order to determine some other parameter. Otherwise,24 + it just assumes the number of cylinders to be 1024, which is the cylinder limit imposed by the + BIOS. +
+inaccessible
Marks the device as inaccessible (for the BIOS). This is useful if some disks on + the system can’t be read by the BIOS, although LILO “thinks” they can. If one accidentally + tries to use files located on such disks for booting, the map installer won’t notice and the + system becomes unbootable. The most likely use of inaccessible is to prevent repetition after + experiencing such a situation once. No other variables may be specified if a device is configured + as inaccessible.
+

Additionally, partition subsections can be added with partition=partition_device. Each partition section +can contain only one variable: +

+start=partition_offset
Specifies the zero-based number of the start sector of that partition. The + + whole disk always has a partition offset of zero. The partition offset is only necessary when + using devices for which the kernel does not provide that information, e.g. CD-ROMs.
+

Examples: + +

+
+disk = /dev/sda + 
  bios = 0x80 + 
  sectors = 32 + 
  heads = 64 + 
  cylinders = 632 + 
  partition = /dev/sda1 + 
    start = 2048 + 
  partition = /dev/sda2 + 
    start = 204800 + 
  partition = /dev/sda3 + 
    start = 500000 + 
  partition = /dev/sda4 + 
    start = 900000
+

+ +

+
+disk = /dev/sda + 
  bios = 0x80 + 
disk = /dev/hda + 
  bios = 0x81
+

+

+

+

4.5 Partition table manipulation

+

Some non-Linux operating systems obtain information about their partitions (e.g. their equivalent of the +root file system) from the partition table. If more than one such operating system is installed on a PC, +they may have conflicting interpretations of the content of the partition table. Those problems +can be avoided by changing the partition table, depending on which operating system is being +booted. +

Partition table changes are specified in a change section in the configuration file section describing the +foreign operating system. Note that change sections are only accepted if the build-time option +REWRITE_TABLE is set. +

The change section contains subsections for each partition whose table entry needs to be modified. +Partitions are specified with partition=device_name +

Changes are applied in the sequence in which they appear in the configuration file. Configurations +containing changes that are redundant either by repeating a previous change or by changing its result +further are invalid and refused by the map installer. +

Internally, all changes are expressed as rules which specify the location (disk and offset in the +partition table), the value this location must contain before the change, and the value that +has to be stored. As a safety measure, the rule is ignored if the previous value is found to be +different. +

+

+
4.5.1 Partition activation
+

This option is intended for booting systems which determine their boot partition by examining the active +flag in the partition table. The flag is enabled with activate and disabled with deactivate. +Note that only the current partition is affected. LILO does not automatically change the active +flags of other partitions and it also allows more than one partition to be active at the same +time. + +

Example: + +

+
+other = /dev/sda4 + 
  label = sco + 
  change + 
    partition = /dev/sda4 + 
      activate + 
    partition = /dev/sda3 + 
      deactivate
+

+

+

+
4.5.2 Partition type change rules
+

Partition type changes are normally a transition between two possible values, e.g. a typical convention is to +set the lowest bit in the upper nibble of the partition type (i.e. 0x10) in order to “hide”, and to clear it to +“unhide” a partition. LILO performs these changes based on a set of rules. Each rule defines +the name of a partition type, its normal value, and the value when hidden. Those rules are +defined in the options section of the configuration file. The section defining them begins with +change-rules. +

The following options and variables can appear in the section: +

+reset
Removes all previously defined rules. This is needed if a user doesn’t wish to use the pre-defined + rules (see below). +
+type=name
Adds a rule for the type with the specified name. Type names are case-insensitive. The + values are defined with normal=byte and hidden=byte. Values can be specified as decimal or as + hexadecimal numbers with a leading 0x. If only one of the values is present, the other value is + assumed to be the same number, but with the most significant bit inverted.
+

LILO pre-defines rules for the three partition types of DOS partitions. The following example removes the +pre-defined rules and creates them again: + +

+
+change-rules + 
  reset + 
  type = DOS12 + 
    normal = 0x01 + 
    hidden = 0x11 + 
  type = DOS16_small + 
    normal = 4 # hidden is 0x14 + 
  type = DOS16_big + 
    hidden = 0x16
+

+

+

+
4.5.3 Partition type changes
+

Partition type changes are specified in the partition section as set=name_state, where name is the name of +the partition type, and state is its state, i.e. normal or hidden. +

Example: + +

+
+other = /dev/sda3 + 
  label = dos + 
  change + 
    partition = /dev/sda2 + 
      set = dos16_big_normal + 
    partition = /dev/sda3 + 
      activate + 
      set = DOS16_big_normal
+

+

Only one set variable is allowed per partition section. In the rare event that more than one set variable is +needed, further partition sections can be used. +

+

+

4.6 Keyboard translation

+

The PC keyboard emits so-called scan codes, which are basically key numbers. The BIOS then translates +those scan codes to the character codes of the characters printed on the key-caps. By default, the BIOS +normally assumes that the keyboard has a US layout. Once an operating system is loaded, this operating +system can use a different mapping. +

At boot time, LILO only has access to the basic services provided by the BIOS and therefore receives the character +codes for an US keyboard. It provides a simple mechanism to re-map the character codes to what is appropriate for the +actual layout.25 +

+
4.6.1 Compiling keyboard translation tables
+

LILO obtains layout information from the keyboard translation tables Linux uses for the text +console. They are usually stored in /usr/lib/kbd/keytables. LILO comes with a program +keytab-lilo.pl that reads those tables and generates a table suitable for use by the map installer. +keytab-lilo.pl invokes the program loadkeys to print the tables in a format that is easy to parse. +26 + +

keytab-lilo.pl is used as follows: +

keytab-lilo.pl [ -p old_code=new_code ] [path]default_layout[.extension]
        [path]kbd_layout[.extension]   +

+-p old_code=new_code
 
Specifies corrections (“patches”) to the mapping obtained from the translation table files. E.g. + if pressing the upper case “A” should yield an at sign, -p 65=64 would be used. The -p option + can be repeated any number of times. The codes can also be given as hexadecimal or as octal + numbers if they are prefixed with 0x or 0, respectively. +
+path
The directory in which the file resides. The default path is /usr/lib/kbd/keytables. +
+extension
Usually the trailing .map, which is automatically added if the file name doesn’t contain dots. +
+default_layout
Is the layout which specifies the translation by the BIOS. If none is specified, us is assumed. +
+kbd_layout
Is the actual layout of the keyboard.
+

keytab-lilo.pl writes the resulting translation table as a binary string to standard output. Such tables can be +stored anywhere with any name, but the suggested naming convention is /boot/kbd.ktl (“Keyboard Table +for Lilo”), where kbd is the name of the keyboard layout. +

Example: + +

+
+keytab-lilo.pl de >/boot/de.ktl
+

+

+
4.6.2 Using keyboard translation tables
+

The keyboard translation table file is specified with the global configuration option keytable=table_file. The +complete name of the file has to be given. +

Example: + +

+
+keytable = /boot/de.klt
+

+

+ +

+

5 Installation and updates

+

+

+

5.1 Installation

+

This section describes the installation of LILO. See section 5.3 for how to uninstall LILO. +

+

+
5.1.1 Compatibility
+

The kernel header files have to be in /usr/include/linux and the kernel usually has to be configured by +running make config before LILO can be compiled. +

/bin/sh has to be a real Bourne shell. bash is sufficiently compatible, but some ksh clones may cause +problems. +

A file named INCOMPAT is included in the distribution. It describes incompatibilities to older versions of +LILO and may also contain further compatibility notes. +

+

+
5.1.2 Quick installation
+

If you want to install LILO on your hard disk and if you don’t want to use all its features, you can use the +quick installation script. Read QuickInst for details. +

QuickInst can only be used for first-time installations or to entirely replace an existing installation, not to +update or modify an existing installation of LILO. Be sure you’ve extracted LILO into a directory that +doesn’t contain any files of other LILO installations. +

+

+
5.1.3 Files
+

Some of the files contained in lilo-21.tar.gz: +

+ +

+lilo/README
 
This documentation in plain ASCII format. Some sections containing complex tables are only + included in the LATEX version in doc/user.tex +
+lilo/INCOMPAT
 
List of incompatibilities to previous versions of LILO. +
+lilo/CHANGES
 
Change history. +
+lilo/VERSION
 
The version number of the respective release. +
+lilo/QuickInst
 
Quick installation script. +
+lilo/lilo-version.lsm
 
The LSM (“Linux Software Map”) entry of the respective LILO release. +
+lilo/Makefile
 
Makefile to generate everything else. +
+lilo/*.c, lilo/*.h
 
LILO map installer C source and common header files. +
+lilo/*.S
 
LILO boot loader assembler source. +
+lilo/activate.c
 
C source of a simple boot partition setter. +
+lilo/dparam.s
 
Assembler source of a disk parameter dumper. +
+lilo/mkdist
 
Shell script used to create the current LILO distribution. +
+lilo/keytab-lilo.pl
 
Perl script to generate keyboard translation tables. +
+lilo/doc/README
 
Description of how to generate the documentation. + +
+lilo/doc/Makefile
 
Makefile used to convert the LATEX source into either DVI output or the plain ASCII + README file. +
+lilo/doc/user.tex
 
LATEX source of LILO’s user’s guide (this document). +
+lilo/doc/tech.tex
 
LATEX source of LILO’s technical overview. +
+lilo/doc/*.fig
 
Various xfig pictures used in the technical overview. +
+lilo/doc/fullpage.sty
 
Style file to save a few square miles of forest. +
+lilo/doc/rlatex
 
Shell script that invokes LATEX repeatedly until all references have settled. +
+lilo/doc/t2a.pl
 
Perl script to convert the LATEX source of the user’s guide to plain ASCII.
+

Files created after make in lilo/ (among others): +

+

+lilo/boot.b
 
Combined boot sector. make install puts this file into /boot +
+lilo/chain.b
 
Generic chain loader. make install puts this file into /boot +
+lilo/os2_d.b
 
Chain loader to load OS/2 from the second hard disk. make install puts this file into /boot +
+lilo/lilo
 
LILO (map) installer. make install puts this file into /sbin +
+lilo/activate
 
Simple boot partition setter. +
+lilo/dparam.com
 
MS-DOS executable of the disk parameter dumper.
+ +

+

+
5.1.4 Normal first-time installation
+

First, you have to install the LILO files: +

+ +

If you want to use LILO on a non-standard disk, you might have to determine the parameters of your +disk(s) and specify them in the configuration file. See section 4.4 for details. If you’re using +such a non-standard system, the next step is to test LILO with the boot sector on a floppy +disk: +

+ +

Now, you have to decide, which boot concept you want to use. Let’s assume you have a Linux partition on +/dev/hda2 and you want to install your LILO boot sector there. The DOS-MBR loads the LILO boot +sector. +

+ + +

+

+
5.1.5 Build-time configuration
+

Certain build-time parameters can be configured. They can either be edited in the top-level Makefile or +they can be stored in a file /etc/lilo.defines. Settings in the Makefile are ignored if that file +exists. +

The following items can be configured: +

+BEEP
Enables beeping after displaying “LILO”. This is useful on machines which don’t beep at the + right time when booting and when working over a serial console. This option is disabled by + default. +
+IGNORECASE
Makes image name matching case-insensitive, i.e. “linux” and “Linux” are identical. + + This option is enabled by default. Note that password matching is always case-sensitive. +
+LARGE_EDBA
Loads LILO at a lower address in order to leave more space for the EBDA (Extended + BIOS Data Area). This is necessary on some recent MP systems. Note that enabling LARGE_EDBA + reduces the maximum size of “small” images (e.g. “Image” or “zImage”). +
+NO1STDIAG
Do not generate diagnostics on read errors in the first stage boot loader. This avoids + possibly irritating error codes if the disk controller has transient read problems. This option is + disabled by default. +
+NODRAIN
The boot loader empties the keyboard buffer when starting, because it may contain garbage + on some systems. Draining the keyboard buffer can be disabled by setting the NODRAIN option. + NODRAIN is disabled by default. +
+NOINSTDEF
If the option install is omitted, don’t install a new boot sector, but try to modify the + old boot sector instead. This option is disabled by default. +
+ONE_SHOT
Disables the command-line timeout (configuration variable timeout) if any key is pressed. + This way, very short timeouts can be used if prompt is set. ONE_SHOT is disabled by default. +
+READONLY
Disallows overwriting the default command line sector of the map file. This way, command + lines set with -R stay in effect until they are explicitly removed. READONLY also disables lock, + fallback, and everything enabled by REWRITE_TABLE. This option is disabled by default. +
+REWRITE_TABLE
Enables rewriting the partition table at boot time. This may be necessary to boot + certain operating systems who expect the active flag to be set on their partition or who need + changes in partition types. See also section 4.5. This option is dangerous and it is disabled by + default. +
+USE_TMPDIR
Use the directory indicated in the TMPDIR environment variable when creating temporary + device files. If TMPDIR is not set or if LILO is compiled without USE_TMPDIR, temporary device + files are created in /tmp.28 + This option is disabled by default. +
+VARSETUP
Enables the use of variable-size setup segments. This option is enabled by default and is + only provided to fall back to fixed-size setup segments in the unlikely case of problems when + using prehistoric kernels. +
+XL_SECS=sectors
Enable support for extra large (non-standard) floppy disks. The number of sectors + is set in the BIOS disk parameter table to the specified value. Note that this hack may yield + incorrect behaviour on some systems. This option is disabled by default.
+ +

/etc/lilo.defines should be used if one wishes to make permanent configuration changes. The usual +installation procedures don’t touch that file. Example: + +

+
+-DIGNORECASE -DONE_SHOT
+

+

After changing the build-time configuration, LILO has to be recompiled with the following +commands: + +

+
+make spotless + 
make
+

+

+

+
5.1.6 Floppy disk installation
+

In some cases29, +it may be desirable to install LILO on a floppy disk in a way that it can boot a kernel without accessing the +hard disk. +

The basic procedure is quite straightforward (see also section 2.3.1):

+ +

This can be as easy as + +

+
+/sbin/mke2fs /dev/fd0 + 
[ -d /fd ] || mkdir /fd + 
mount /dev/fd0 /fd + 
cp /boot/boot.b /fd + 
cp /zImage /fd + 
echo image=/fd/zImage label=linux | + 
  /sbin/lilo -C - -b /dev/fd0 -i /fd/boot.b -c -m /fd/map + 
umount /fd
+

+

The command line of /sbin/lilo is a little tricky. -C - takes the configuration from standard input +(naturally, one could also write the configuration into a file), -b /dev/fd0 specifies that the boot +sector is written to the floppy disk, -i /fd/boot.b takes the first and second stage loaders from +the floppy, -c speeds up the load process, and -m /fd/map puts the map file on the floppy +too. +

+

5.2 Updates

+

LILO is affected by updates of kernels, the whole system and (trivially) of LILO itself. Typically, only +/sbin/lilo has to be run after any of those updates and everything will be well again (at least as far as +LILO is concerned). +

+

+
5.2.1 LILO update
+

Before updating to a new version of LILO, you should read at least the file INCOMPAT which describes +incompatibilities with previous releases. +

After that, the initial steps are the same as for a first time installation: extract all files, configure the +Makefile, run make to build the executables and run make install to install the files. +

The old versions of boot.b, chain.b, etc. are automatically renamed to boot.old, chain.old, etc. This is +done to ensure that you can boot even if the installation procedure does not finish. boot.old, chain.old, +etc. can be deleted after the map file is rebuilt. +

Because the locations of boot.b, chain.b, etc. have changed and because the map file format may be +different too, you have to update the boot sector and the map file. Run /sbin/lilo to do +this. + +

+

+
5.2.2 Kernel update
+

Whenever any of the kernel files that are accessed by LILO is moved or overwritten, the map has to be +re-built.30 +Run /sbin/lilo to do this. +

The kernel has a make target “zlilo” that copies the kernel to /vmlinuz and runs /sbin/lilo. +

+
5.2.3 System upgrade
+

Normally, system upgrades (i.e. installation or removal of packages, possibly replacement of a large part of +the installed binaries) do not affect LILO. Of course, if a new kernel is installed in the process, the normal +kernel update procedure has to be followed (see section 5.2.2). Also, if kernels are removed or added, it may +be necessary to update the configuration file. +

If LILO is updated by this system upgrade, /sbin/lilo should be run before booting the upgraded system. +It is generally a good idea not to rely on the upgrade procedure to perform this essential step +automatically. +

However, system upgrades which involve removal and re-creation of entire partitions (e.g. /, /usr, etc.) are +different. First, they should be avoided, because they bear a high risk of losing other critical files, e.g. the +/etc/XF86Config you’ve spent the last week fiddling with. If an upgrade really has to be performed in such +a brute-force way, this is equal with total removal of LILO, followed by a new installation. Therefore, the +procedures described in the sections 5.3 and 5.2.1 have to be performed. If you’ve forgotten to make a +backup copy of /etc/lilo.conf before the destructive upgrade, you might also have to go through section +5.1.4 again. +

+

+

5.3 LILO de-installation

+

In order to stop LILO from being invoked when the system boots, its boot sector has to be either removed +or disabled. All other files belonging to LILO can be deleted after removing the boot sector, if + +desired.31 +

Again, when removing Linux, LILO must be de-installed before (!) its files (/boot, etc.) are +deleted. This is especially important if LILO is operating as the MBR. +

LILO 14 (and newer) can be de-installed with lilo -u. If LILO 14 or newer is currently installed, but the +first version of LILO installed was older than 14, lilo -U may work. When using -U, the warning at the +end of this section applies. +

If LILO’s boot sector has been installed on a primary partition and is booted by the “standard” MBR or +some partition switcher program, it can be disabled by making a different partition active. MS-DOS’ +FDISK, Linux fdisk or LILO’s activate can do that. +

If LILO’s boot sector is the master boot record (MBR) of a disk, it has to be replaced with a different +MBR, typically MS-DOS’ “standard” MBR. When using MS-DOS 5.0 or above, the MS-DOS +MBR can be restored with FDISK /MBR. This only alters the boot loader code, not the partition +table. +

LILO automatically makes backup copies when it overwrites boot sectors. They are named +
/boot/boot.nnnn, with nnnn corresponding to the device number, e.g. 0300 is /dev/hda, 0800 is +/dev/sda, etc. Those backups can be used to restore the old MBR if no easier method is available. The +commands are
dd if=/boot/boot.0300 of=/dev/hda bs=446 count=1 or
dd if=/boot/boot.0800 of=/dev/sda bs=446 count=1
respectively. +

WARNING: Some Linux distributions install boot.nnnn files from the system where the distribution was +created. Using those files may yield unpredictable results. Therefore, the file creation date should be +carefully checked. +

+

5.4 Installation of other operating systems

+

Some other operating systems (e.g. MS-DOS 6.0) appear to modify the MBR in their install procedures. It +is therefore possible that LILO will stop to work after such an installation and Linux has to be +booted from floppy disk. The original state can be restored by either re-running /sbin/lilo (if +LILO is installed as the MBR) or by making LILO’s partition active (if it’s installed on a primary +partition). +

It is generally a good idea to install LILO after the other operating systems have been installed. E.g. OS/2 +is said to cause trouble when attempting to add it to an existing Linux system. (However, booting from +floppy and running /sbin/lilo should get around most interferences.) +

Typically, the new operating system then has to be added to LILO’s configuration (and /sbin/lilo has to +be re-run) in order to boot it. + +

See also section 6.3 for a list of known problems with some other operating systems. +

+ +

+

6 Troubleshooting

+

All parts of LILO display some messages that can be used to diagnose problems. +

+

+

6.1 Map installer warnings and errors

+

Most messages of the map installer (/sbin/lilo) should be self-explanatory. Some messages that indicate +common errors are listed below. They are grouped into fatal errors and warnings (non-fatal +errors). +

+

+
6.1.1 Fatal errors
+

+

+Boot sector of device_name doesn’t have a boot signature
+
+Boot sector of device_name doesn’t have a LILO signature
 
The sector from which LILO should be uninstalled doesn’t appear to be a LILO boot sector. +
+Can’t put the boot sector on logical partition number
 
An attempt has been made to put LILO’s boot sector on the current root file system partition + which is on a logical partition. This usually doesn’t have the desired effect, because common + MBRs can only boot primary partitions. This check can be bypassed by explicitly specifying + the boot partition with the -b option or by setting the configuration variable boot. +
+Checksum error
 
The descriptor table of the map file has an invalid checksum. Refresh the map file immediately + ! +
+Device 0xnumber: Configured as inaccessible.
 
There is a disk section entry indicating that the device is inaccessible from the BIOS. You + should check carefully that all files LILO tries to access when booting are on the right device. +
+Device 0xnumber: Got bad geometry sec/hd/cyl
 
The device driver for your SCSI controller does not support geometry detection. You have to + specify the geometry explicitly (see section 4.4). + +
+Device 0xnumber: Invalid partition table, entry number
 
The 3D and linear addresses of the first sector of the specified partition don’t correspond. This + is typically caused by partitioning a disk with a program that doesn’t align partitions to tracks + and later using PC/MS-DOS or OS/2 on that disk. LILO can attempt to correct the problem, + see page §. +
+Device 0xnumber: Partition type 0xnumber
 
does not seem suitable for a LILO boot sector 
The location where the LILO boot sector should be placed does not seem to be suitable for + that. (See also also section 2.1). You should either adjust the partition type to reflect the actual + use or put the boot sector on a different partition. This consistency check only yields a warning + (i.e. LILO continues) if the option ignore-table is set. +
+device_name is not a valid partition device
 
The specified device is either not a device at all, a whole disk, or a partition on a different disk + than the one in whose section its entry appears. +
+device_name is not a whole disk device
 
Only the geometry of whole disks (e.g. /dev/hda, /dev/sdb, etc.) can be redefined when using + disk sections. +
+DISKTAB and DISK are mutually exclusive
 
You cannot use a disktab file and disk geometry definitions in the configuration file at + the same time. Maybe /etc/disktab was accidentally used, because that’s the default for + backward-compatibility. You should delete /etc/disktab after completing the transition to + disk sections. +
+Duplicate entry in partition table
 
A partition table entry appears twice. The partition table has to be fixed with fdisk. +
+Duplicate geometry definition for device_name
 
A disk or partition geometry definition entry for the same device appears twice in the + configuration file. Note that you mustn’t write a partition section for the whole disk — its start + sector is always the first sector of the disk. +
+First sector of device doesn’t have a valid boot signature
 
The first sector of the specified device does not appear to be a valid boot sector. You might have + confused the device name.32 +
+geo_comp_addr: Cylinder number beyond end of media (number)
 
A file block appears to be located beyond the last cylinder of the disk. This probably indicates + + an error in the disk geometry specification (see section 4.4) or a file system corruption. +
+geo_comp_addr: Cylinder number is too big (number > 1023)
 
Blocks of a file are located beyond the 1024th cylinder of a hard disk. LILO can’t access such + files, because the BIOS limits cylinder numbers to the range 01023. Try moving the file to a + different place, preferably a partition that is entirely within the first 1024 cylinders of the disk. +
+Hole found in map file (location)
 
The map installer is confused about the disk organization. Please report this error. +
+item doesn’t have a valid LILO signature
 
The specified item has been located, but is not part of LILO. +
+item has an invalid stage code (number)
 
The specified item has probably been corrupted. Try re-building LILO. +
+item is version number. Expecting versionnumber.
 
The specified entity is either too old or too new. Make sure all parts of LILO (map installer, + boot loaders and chain loaders) are from the same distribution. 33 +
+Kernel name is too big
 
The kernel image (without the setup code) is bigger than 512 kbytes (or 448 kbytes, if built with + LARGE_EDBA). LILO would overwrite itself when trying to load such a kernel. This limitation + only applies to old kernels which are loaded below 0x10000 (e.g. “Image” or “zImage”). Try + building the kernel with “bzImage”. If this is undesirable for some reason, try removing some + unused drivers and compiling the kernel again. This error may also occur if the kernel image is + damaged or if it contains trailing “junk”, e.g. as the result of copying an entire boot floppy to + the hard disk. +
+LOCK and FALLBACK are mutually exclusive
 
Since lock and fallback both change the default command line, they can’t be reasonably used + together. +
+Map path is not a regular file.
 
This is probably the result of an attempt to omit writing a map file, e.g. with -m /dev/null. + The -t option should be used to accomplish this. +
+Must specify SECTORS and HEADS together
 
It is assumed that disks with a “strange” number of sectors will also have a “strange” number + of heads. Therefore, it’s all or nothing. +
+No geometry variables allowed if INACCESSIBLE
 
If a device is configured as inaccessible (see section 4.4.2), its disk section must not contain + any geometry variables. +
+No image image is defined
 
The command line specified either with the -R option or with fallback does not contain the + name of a valid image. Note that optional images which have not been included in the map file + are not considered as valid. +
+Partition entry not found
 
The partition from which an other operating system should be booted isn’t listed in the specified + partition table. This either means that an incorrect partition table has been specified or that + you’re trying to boot from a logical partition. The latter usually doesn’t work. You can bypass + this check by omitting the partition table specification (e.g. omitting the variable table). +
+Single-key clash: "name" vs. "name"
 
The specified image labels or aliases conflict because one of them is a single character and has + the single-key option set, and the other name begins with that character. +
+Sorry, don’t know how to handle device number
 
LILO uses files that are located on a device for which there is no easy way to determine the + disk geometry. Such devices have to be explicitly described, see section 4.4. +
+This LILO is compiled READONLY and doesn’t support
 
If LILO is not allowed to write to the disk at boot time (see section 5.1.5), options like lock + and fallback are unavailable. +
+This LILO is compiled without REWRITE_TABLE and doesn’t support
 
If LILO is not allowed to rewrite partition tables at boot time (see section 4.5), options like + activate and set (in a change section) are unavailable. You may also get this error if LILO is + compiled with READONLY enabled. +
+Timestamp in boot sector of device differs from date of file
 
The backup copy of the boot sector does not appear to be an ancestor of the current boot + sector. If you are absolutely sure that the boot sector is indeed correct, you can bypass this + check by using -U instead of -u. +
+Trying to map files from unnamed device 0xnumber (NFS ?)
 
This is probably the same problem as described below, only with the root file system residing + on NFS. +
+Trying to map files from your RAM disk.
 
Please check -r option or ROOT environment variable. 
Most likely, you or some installation script is trying to invoke LILO in a way that some of the + files is has to access reside on the RAM disk. Normally, the ROOT environment variable should + be set to the mount point of the effective root device if installing LILO with a different root + + directory. See also sections 4.1.2 and 5.1.4. +
+VGA mode presetting is not supported by your kernel.
 
Your kernel sources appear to be very old (’93 ?). LILO may work on your system if you remove + the vga option. +
+write item: error_reason
 
The disk is probably full or mounted read-only.
+

+

+
6.1.2 Warnings
+

Messages labeled with “Warning” can be turned off with the nowarn option. +

+

+FIGETBSZ file_name: error_reason
 
The map installer is unable to determine the block size of a file system. It assumes a block size + of two sectors (1kB). +
+Ignoring entry ’variable_name
 
The command-line option corresponding to the specified variable is set. Therefore, the + configuration file entry is ignored. +
+Setting DELAY to 20 (2 seconds)
 
Because accidentally booting the wrong kernel or operating system may be very inconvenient + on systems that are not run from a local display, the minimum delay is two seconds if the + serial variable is set. +
+(temp) item: error_reason
 
Deleting a temporary file has failed for the specified reason. +
+Warning: BIOS drive 0xnumber may not be accessible
 
Because most BIOS versions only support two floppies and two hard disks, files located on + additional disks may be inaccessible. This warning indicates that some kernels or even the + whole system may be unbootable. +
+Warning: COMPACT may conflict with LINEAR on some systems
 
Please see section 6.3 for a description of this problem. +
+Warning: config_file should be owned by root
 
In order to prevent users from compromising system integrity, the configuration file should be + + owned by root and write access for all other users should be disabled. +
+Warning: config_file should be readable only for root if using PASSWORD
 
Users should not be allowed to read the configuration file when using the password option, + because then, it contains unencrypted passwords. +
+Warning: config_file should be writable only for root
 
See “Warning: config_file should be owned by root”. +
+Warning: device 0xnumber exceeds 1024 cylinder limit
 
A disk or partition exceeds the 1024 cylinder limit imposed by the BIOS. This may result in + a fatal error in the current installation run or in later installation runs. See “geo_comp_addr: + Cylinder number is too big (number > 1023)” for details. +
+Warning: device is not on the first disk
 
The specified partition is probably not on the first disk. LILO’s boot sector can only be booted + from the first disk unless some special boot manager is used. +
+WARNING: The system is unbootable !
 
One of the last installation steps has failed. This warning is typically followed by a fatal error + describing the problem.
+

+

+

6.2 Boot loader messages

+

The boot loader generates three types of messages: progress and error messages while it is loading, messages +indicating disk access errors, and error messages in response to invalid command-line input. +Since messages of the latter type are usually self-explanatory, only the two other categories are +explained. +

+

+
6.2.1 LILO start message
+

When LILO loads itself, it displays the word “LILO”. Each letter is printed before or after performing some +specific action. If LILO fails at some point, the letters printed so far can be used to identify the problem. +This is described in more detail in the technical overview. +

Note that some hex digits may be inserted after the first “L” if a transient disk problem occurs. Unless +LILO stops at that point, generating an endless stream of error codes, such hex digits do not indicate a +severe problem. +

+ +

+(nothing)
No part of LILO has been loaded. LILO either isn’t installed or the partition on which + its boot sector is located isn’t active. +
+L error
The first stage boot loader has been loaded and started, but it can’t load the second + stage boot loader. The two-digit error codes indicate the type of problem. (See also section + 6.2.2.) This condition usually indicates a media failure or a geometry mismatch (e.g. bad disk + parameters, see section 4.4). +
+LI
The first stage boot loader was able to load the second stage boot loader, but has failed to execute + it. This can either be caused by a geometry mismatch or by moving /boot/boot.b without + running the map installer. +
+LIL
The second stage boot loader has been started, but it can’t load the descriptor table from the + map file. This is typically caused by a media failure or by a geometry mismatch. +
+LIL?
The second stage boot loader has been loaded at an incorrect address. This is typically caused + by a subtle geometry mismatch or by moving /boot/boot.b without running the map installer. +
+LIL-
The descriptor table is corrupt. This can either be caused by a geometry mismatch or by + moving /boot/map without running the map installer. +
+LILO
All parts of LILO have been successfully loaded.
+

+

+
6.2.2 Disk error codes
+

If the BIOS signals an error when LILO is trying to load a boot image, the respective error code is +displayed. The following BIOS error codes are known: +

+

+0x00
“Internal error”. This code is generated by the sector read routine of the LILO boot loader + whenever an internal inconsistency is detected. This might be caused by corrupt files. Try + re-building the map file. Another possible cause for this error are attempts to access cylinders + beyond 1024 while using the linear option. See section 2.3.1 for more details and for how to + solve the problem. +
+0x01
“Illegal command”. This shouldn’t happen, but if it does, it may indicate an attempt to access + a disk which is not supported by the BIOS. See also “Warning: BIOS drive 0xnumber may not + be accessible” in section 6.1.2. + +
+0x02
“Address mark not found”. This usually indicates a media problem. Try again several times. +
+0x03
“Write-protected disk”. This should only occur on write operations. +
+0x04
“Sector not found”. This typically indicates a geometry mismatch. If you’re booting a + raw-written disk image, verify whether it was created for disks with the same geometry as the + one you’re using. If you’re booting from a SCSI disk or a large IDE disk, you should check, + whether LILO has obtained correct geometry data from the kernel or whether the geometry + definition corresponds to the real disk geometry. (See section 4.4.) Removing compact may help + too. So may adding lba32 or linear. +
+0x06
“Change line active”. This should be a transient error. Try booting a second time. +
+0x07
“Invalid initialization”. The BIOS failed to properly initialize the disk controller. You should + control the BIOS setup parameters. A warm boot might help too. +
+0x08
“DMA overrun”. This shouldn’t happen. Try booting again. +
+0x09
“DMA attempt across 64k boundary”. This shouldn’t happen, but may inicate a disk geometry + mis-match. Try omitting the compact option. You may need to specify the disk geometry + yourself. +
+0x0C
“Invalid media”. This shouldn’t happen and might be caused by a media error. Try booting + again. +
+0x10
“CRC error”. A media error has been detected. Try booting several times, running the map + installer a second time (to put the map file at some other physical location or to write “good + data” over the bad spot), mapping out the bad sectors/tracks and, if all else fails, replacing + the media. +
+0x11
“ECC correction successful”. A read error occurred, but was corrected. LILO does not + recognize this condition and aborts the load process anyway. A second load attempt should + succeed. +
+0x20
“Controller error”. This shouldn’t happen. +
+0x40
“Seek failure”. This might be a media problem. Try booting again. +
+0x80
“Disk timeout”. The disk or the drive isn’t ready. Either the media is bad or the disk isn’t + spinning. If you’re booting from a floppy, you might not have closed the drive door. Otherwise, + trying to boot again might help. +
+ +0xBB
“BIOS error”. This shouldn’t happen. Try booting again. If the problem persists, removing the + compact option or adding/removing linear or lba32 might help.
+

If the error occurred during a write operation, the error code (two hex digits) is prefixed with a “W”. +Although write errors don’t affect the boot process, they might indicate a severe problem, because +they usually imply that LILO has tried to write to an invalid location. If spurious write errors +occur on a system, it might be a good idea to configure LILO to run read-only (see section +5.1.5). +

Generally, invalid geometry and attempts to use more than two disks without a very modern BIOS may +yield misleading error codes. Please check carefully if /sbin/lilo doesn’t emit any warnings. Then try +using the linear or lba32 option (see section 4.2.2). +

+

+

6.3 Other problems

+

This section contains a collection of less common problems that have been observed. See also section 5.4 for +general remarks on using LILO with other operating systems. Some of the problems are obscure and so are +the work-arounds. +

+ +
+

+

Last updated by John R. Coffman on July 17, 2000
+reconstructed by Joachim Wiedorn on January 29, 2011

+ + + + + diff --git a/doc/html/user_21-50x.png b/doc/html/user_21-50x.png new file mode 100644 index 0000000..eaaf507 Binary files /dev/null and b/doc/html/user_21-50x.png differ diff --git a/doc/html/user_21-510.html b/doc/html/user_21-510.html new file mode 100644 index 0000000..d6a15d6 --- /dev/null +++ b/doc/html/user_21-510.html @@ -0,0 +1,31 @@ + + + + + + + + + + + + + +
+

10pfdisk is available for anonymous FTP from
ftp://sunsite.unc.edu/pub/Linux/utils/disk-management/pfdisk.tar.Z or
ftp://ftp.funet.fi/pub/Linux/tools/pfdisk.tar.Z
PBOOT can be found in
ftp://ftp.funet.fi/pub/Linux/tools/pboot.zip

+ diff --git a/doc/html/user_21-510x.png b/doc/html/user_21-510x.png new file mode 100644 index 0000000..c95e97e Binary files /dev/null and b/doc/html/user_21-510x.png differ diff --git a/doc/html/user_21-511.html b/doc/html/user_21-511.html new file mode 100644 index 0000000..3704822 --- /dev/null +++ b/doc/html/user_21-511.html @@ -0,0 +1,24 @@ + + + + + + + + + + + + + +
+

11However, if only “unimportant” parts of the system are located on the “high” drives, some functionality may be + available.

+ + diff --git a/doc/html/user_21-511x.png b/doc/html/user_21-511x.png new file mode 100644 index 0000000..f96b98d Binary files /dev/null and b/doc/html/user_21-511x.png differ diff --git a/doc/html/user_21-512.html b/doc/html/user_21-512.html new file mode 100644 index 0000000..d99c8ba --- /dev/null +++ b/doc/html/user_21-512.html @@ -0,0 +1,28 @@ + + + + + + + + + + + + + +
+

12Setting the “system” attribute from DOS on the critical files (e.g. everything in C:\LINUX) may help to protect them from + being rearranged. However, the boot floppy should still be ready, just in case.

+ + diff --git a/doc/html/user_21-512x.png b/doc/html/user_21-512x.png new file mode 100644 index 0000000..2c74f9b Binary files /dev/null and b/doc/html/user_21-512x.png differ diff --git a/doc/html/user_21-513.html b/doc/html/user_21-513.html new file mode 100644 index 0000000..a7d3917 --- /dev/null +++ b/doc/html/user_21-513.html @@ -0,0 +1,26 @@ + + + + + + + + + + + + + +
+

13The default boot image is either the first boot image, the image specified with the default variable, or the image that has + been selected at the boot prompt.

+ + diff --git a/doc/html/user_21-513x.png b/doc/html/user_21-513x.png new file mode 100644 index 0000000..70a1318 Binary files /dev/null and b/doc/html/user_21-513x.png differ diff --git a/doc/html/user_21-514.html b/doc/html/user_21-514.html new file mode 100644 index 0000000..7090aa3 --- /dev/null +++ b/doc/html/user_21-514.html @@ -0,0 +1,106 @@ + + + + + + + + + + + + + +
+

14This is a list of device numbers of some frequently used devices:

+ + + + + + + + + +
/dev/fd0200/dev/hda1301/dev/sda1801
/dev/fd1201/dev/hda2302/dev/sda2802
/dev/hdb1341/dev/sdb1811
/dev/hdb2342/dev/sdb2812
+ + diff --git a/doc/html/user_21-514x.png b/doc/html/user_21-514x.png new file mode 100644 index 0000000..4875617 Binary files /dev/null and b/doc/html/user_21-514x.png differ diff --git a/doc/html/user_21-515.html b/doc/html/user_21-515.html new file mode 100644 index 0000000..1ae7f24 --- /dev/null +++ b/doc/html/user_21-515.html @@ -0,0 +1,24 @@ + + + + + + + + + + + + + +
+

15The device names are hard-coded in the kernel. Therefore, only the “standard” names are supported and some less common + devices may not be recognized. In those cases, only numbers can be used.

+ + diff --git a/doc/html/user_21-516.html b/doc/html/user_21-516.html new file mode 100644 index 0000000..6e7a3e4 --- /dev/null +++ b/doc/html/user_21-516.html @@ -0,0 +1,52 @@ + + + + + + + + + + + + + +
+

16Options are frequently repeated when a string defined with append or literal is prepended to the parameters typed in + by the user. Also, LILO implicitly prepends the options ramdisk, ro, root, or rw when ramdisk, read-only, + read-write, or root, respectively, are set in the configuration file. (lock and vga are handled by a different internal + mechanism.)

+ + diff --git a/doc/html/user_21-517.html b/doc/html/user_21-517.html new file mode 100644 index 0000000..4d927da --- /dev/null +++ b/doc/html/user_21-517.html @@ -0,0 +1,24 @@ + + + + + + + + + + + + + +
+

20E.g. if your root partition is mounted on /mnt, you can update the map by simply running ROOT=/mnt /mnt/sbin/lilo

+ diff --git a/doc/html/user_21-518.html b/doc/html/user_21-518.html new file mode 100644 index 0000000..f921800 --- /dev/null +++ b/doc/html/user_21-518.html @@ -0,0 +1,30 @@ + + + + + + + + + + + + + +
+

21-R is typically used in reboot scripts, e.g.
#!/bin/sh
cd /
/sbin/lilo -R "$*" && reboot

+ diff --git a/doc/html/user_21-519.html b/doc/html/user_21-519.html new file mode 100644 index 0000000..79d3f14 --- /dev/null +++ b/doc/html/user_21-519.html @@ -0,0 +1,24 @@ + + + + + + + + + + + + + +
+

22The boot sector is loaded by LILO’s secondary boot loader before control is passed to the code of chain.b.

+ + diff --git a/doc/html/user_21-51x.png b/doc/html/user_21-51x.png new file mode 100644 index 0000000..c4245e6 Binary files /dev/null and b/doc/html/user_21-51x.png differ diff --git a/doc/html/user_21-52.html b/doc/html/user_21-52.html new file mode 100644 index 0000000..024f028 --- /dev/null +++ b/doc/html/user_21-52.html @@ -0,0 +1,23 @@ + + + + + + + + + + + + + +
+

2PC/MS-DOS, DR DOS, OS/2, Windows 95, Windows NT, 386BSD, SCO UNIX, Unixware,

+ + diff --git a/doc/html/user_21-520.html b/doc/html/user_21-520.html new file mode 100644 index 0000000..5b0d815 --- /dev/null +++ b/doc/html/user_21-520.html @@ -0,0 +1,27 @@ + + + + + + + + + + + + + +
+

23So you should be very suspicious if the operating system requires any specific configuration or even drivers + to use the disk it is booted from. Since there is a general trend to use optimized drivers to fully exploit the + hardware capabilities (e.g. non-blocking disk access), booting systems from the second disk may become increasingly + difficult.

+ diff --git a/doc/html/user_21-520x.png b/doc/html/user_21-520x.png new file mode 100644 index 0000000..27ce36e Binary files /dev/null and b/doc/html/user_21-520x.png differ diff --git a/doc/html/user_21-521.html b/doc/html/user_21-521.html new file mode 100644 index 0000000..d055385 --- /dev/null +++ b/doc/html/user_21-521.html @@ -0,0 +1,27 @@ + + + + + + + + + + + + + +
+

24I.e. if the BIOS device code, the number of sectors, the number of heads and the partition start are specified. Note that + the number of cylinders may appear to vary if cylinders is absent and only some of the partition starts are + specified.

+ diff --git a/doc/html/user_21-521x.png b/doc/html/user_21-521x.png new file mode 100644 index 0000000..f60dcb1 Binary files /dev/null and b/doc/html/user_21-521x.png differ diff --git a/doc/html/user_21-522.html b/doc/html/user_21-522.html new file mode 100644 index 0000000..e312d4c --- /dev/null +++ b/doc/html/user_21-522.html @@ -0,0 +1,26 @@ + + + + + + + + + + + + + +
+

25The current mechanism isn’t perfect, because it sits on top of the scan code to character code translation performed by the + BIOS. This means that key combinations that don’t produce any useful character on the US keyboard will be ignored by LILO. + The advantage of this approach is its simplicity.

+ + diff --git a/doc/html/user_21-522x.png b/doc/html/user_21-522x.png new file mode 100644 index 0000000..d9ad026 Binary files /dev/null and b/doc/html/user_21-522x.png differ diff --git a/doc/html/user_21-523.html b/doc/html/user_21-523.html new file mode 100644 index 0000000..d3fa6e5 --- /dev/null +++ b/doc/html/user_21-523.html @@ -0,0 +1,26 @@ + + + + + + + + + + + + + +
+

26On some systems, only root can execute loadkeys. It is then necessary to run keytab-lilo.pl as root too.

+ + diff --git a/doc/html/user_21-524.html b/doc/html/user_21-524.html new file mode 100644 index 0000000..ca64239 --- /dev/null +++ b/doc/html/user_21-524.html @@ -0,0 +1,22 @@ + + + + + + + + + + + + + +
+

27E.g. /usr/src/lilo

+ diff --git a/doc/html/user_21-525.html b/doc/html/user_21-525.html new file mode 100644 index 0000000..2c1f266 --- /dev/null +++ b/doc/html/user_21-525.html @@ -0,0 +1,30 @@ + + + + + + + + + + + + + +
+

28Note that, while honoring TMPDIR is the “right” thing to do, the fact that LILO has to create temporary device files at + all may indicate that the operating environment is not completely set up, so TMPDIR may point to an invalid + location.

+ diff --git a/doc/html/user_21-526.html b/doc/html/user_21-526.html new file mode 100644 index 0000000..6da2ac4 --- /dev/null +++ b/doc/html/user_21-526.html @@ -0,0 +1,22 @@ + + + + + + + + + + + + + +
+

29E.g. if no hard disk is accessible through the BIOS.

+ + diff --git a/doc/html/user_21-527.html b/doc/html/user_21-527.html new file mode 100644 index 0000000..8d46004 --- /dev/null +++ b/doc/html/user_21-527.html @@ -0,0 +1,24 @@ + + + + + + + + + + + + + +
+

30It is advisable to keep a second, stable, kernel image that can be booted if you forget to update the map after a change to + your usual kernel image.

+ + diff --git a/doc/html/user_21-528.html b/doc/html/user_21-528.html new file mode 100644 index 0000000..4876315 --- /dev/null +++ b/doc/html/user_21-528.html @@ -0,0 +1,24 @@ + + + + + + + + + + + + + +
+

31Backup copies of old boot sectors may be needed when removing the boot sector. They are stored in /boot.

+ + diff --git a/doc/html/user_21-529.html b/doc/html/user_21-529.html new file mode 100644 index 0000000..acb59d9 --- /dev/null +++ b/doc/html/user_21-529.html @@ -0,0 +1,27 @@ + + + + + + + + + + + + + +
+

32Because different partition programs may display the partitions in a different order, it is possible that what you think is + your first partition isn’t /dev/hda1, etc. A good method to verify the content of a partition is to try to mount + it.

+ diff --git a/doc/html/user_21-52x.png b/doc/html/user_21-52x.png new file mode 100644 index 0000000..fcf03b4 Binary files /dev/null and b/doc/html/user_21-52x.png differ diff --git a/doc/html/user_21-53.html b/doc/html/user_21-53.html new file mode 100644 index 0000000..cffd4e6 --- /dev/null +++ b/doc/html/user_21-53.html @@ -0,0 +1,27 @@ + + + + + + + + + + + + + +
+

3LILO does not know how to read a file system. Instead, the map installer asks the kernel for the physical location of files + (e.g. the kernel image(s)) and records that information. This allows LILO to work with most file systems that are supported by + Linux.

+ diff --git a/doc/html/user_21-530.html b/doc/html/user_21-530.html new file mode 100644 index 0000000..89658cb --- /dev/null +++ b/doc/html/user_21-530.html @@ -0,0 +1,24 @@ + + + + + + + + + + + + + +
+

33The expected version number may be different from the version number of the LILO package, because file version numbers + are only increased when the file formats change.

+ diff --git a/doc/html/user_21-53x.png b/doc/html/user_21-53x.png new file mode 100644 index 0000000..8583420 Binary files /dev/null and b/doc/html/user_21-53x.png differ diff --git a/doc/html/user_21-54.html b/doc/html/user_21-54.html new file mode 100644 index 0000000..b1500fe --- /dev/null +++ b/doc/html/user_21-54.html @@ -0,0 +1,30 @@ + + + + + + + + + + + + + +
+

4Most FDISK-type programs don’t believe in booting from an extended partition and refuse to activate it. LILO is + accompanied by a simple program (activate) that doesn’t have this restriction. Linux fdisk also supports activating extended + partitions.

+ diff --git a/doc/html/user_21-54x.png b/doc/html/user_21-54x.png new file mode 100644 index 0000000..b1e63f3 Binary files /dev/null and b/doc/html/user_21-54x.png differ diff --git a/doc/html/user_21-55.html b/doc/html/user_21-55.html new file mode 100644 index 0000000..272f2d6 --- /dev/null +++ b/doc/html/user_21-55.html @@ -0,0 +1,28 @@ + + + + + + + + + + + + + +
+

5LILO can be forced to put the boot sector on such a partition by using the -b option or the boot variable. However, only + few programs that operate as master boot records support booting from a logical partition.

+ diff --git a/doc/html/user_21-55x.png b/doc/html/user_21-55x.png new file mode 100644 index 0000000..d116e65 Binary files /dev/null and b/doc/html/user_21-55x.png differ diff --git a/doc/html/user_21-56.html b/doc/html/user_21-56.html new file mode 100644 index 0000000..481663b --- /dev/null +++ b/doc/html/user_21-56.html @@ -0,0 +1,26 @@ + + + + + + + + + + + + + +
+

6Other, possibly better known boot switchers, e.g. OS/2 BootManager operate in a similar way. The installation procedures +typically vary.

+ + diff --git a/doc/html/user_21-56x.png b/doc/html/user_21-56x.png new file mode 100644 index 0000000..b5a2f0a Binary files /dev/null and b/doc/html/user_21-56x.png differ diff --git a/doc/html/user_21-57.html b/doc/html/user_21-57.html new file mode 100644 index 0000000..594b432 --- /dev/null +++ b/doc/html/user_21-57.html @@ -0,0 +1,24 @@ + + + + + + + + + + + + + +
+

7And the author would like to be notified if booting the other operating system(s) doesn’t work with LILO, but if it works + with an other boot partition selector.

+ + diff --git a/doc/html/user_21-574x.png b/doc/html/user_21-574x.png new file mode 100644 index 0000000..096aed5 Binary files /dev/null and b/doc/html/user_21-574x.png differ diff --git a/doc/html/user_21-57x.png b/doc/html/user_21-57x.png new file mode 100644 index 0000000..a5c6867 Binary files /dev/null and b/doc/html/user_21-57x.png differ diff --git a/doc/html/user_21-58.html b/doc/html/user_21-58.html new file mode 100644 index 0000000..ada07ce --- /dev/null +++ b/doc/html/user_21-58.html @@ -0,0 +1,36 @@ + + + + + + + + + + + + + +
+

8LOADLIN is available for anonymous FTP from
ftp://tsx-11.mit.edu/pub/linux/dos_utils/lodlinn.tar.gz
ftp://sunsite.unc.edu/pub/Linux/system/boot/dualboot/lodlinn.tgz
BOOT.SYS is available for anonymous FTP from
ftp://ftp.funet.fi/pub/Linux/tools/boot142.zip

+ diff --git a/doc/html/user_21-58x.png b/doc/html/user_21-58x.png new file mode 100644 index 0000000..99361f0 Binary files /dev/null and b/doc/html/user_21-58x.png differ diff --git a/doc/html/user_21-59.html b/doc/html/user_21-59.html new file mode 100644 index 0000000..fcf684a --- /dev/null +++ b/doc/html/user_21-59.html @@ -0,0 +1,34 @@ + + + + + + + + + + + + + +
+

9LILO can be found in
ftp://tsx-11.mit.edu/pub/linux/packages/lilo/lilo-n.tar.gz
ftp://sunsite.unc.edu/pub/Linux/system/boot/lilo/lilo-n.tar.gz
ftp://lrcftp.epfl.ch/pub/linux/local/lilo/lilo-n.tar.gz

+ diff --git a/doc/html/user_21-59x.png b/doc/html/user_21-59x.png new file mode 100644 index 0000000..e53d32d Binary files /dev/null and b/doc/html/user_21-59x.png differ diff --git a/lilo.lsm b/lilo.lsm index fa399f5..63d11b5 100644 --- a/lilo.lsm +++ b/lilo.lsm @@ -1,7 +1,7 @@ Begin4 Title: LILO -Version: 23.1 -Entered-date: 2010-11-04 +Version: 24.0 +Entered-date: 2013-06-07 Description: Generic boot loader for Linux. Distribution includes full source, documentation and support files. Keywords: Linux, boot loader, LILO @@ -10,11 +10,9 @@ Maintained-by: Joachim Wiedorn Primary-site: http://lilo.alioth.debian.org/ Original-site: http://lilo.alioth.debian.org/ Alternate-site: http://alioth.debian.org/projects/lilo/ (developer's site) -Files: 561kB lilo-23.1.tar.gz +Files: 751kB lilo-24.0.tar.gz Platforms: Linux (>= 2.4.0), gcc (>= 3.3.5), as86 (>= 0.16.14) needed to compile. bcc (0.16.14) needed to compile diagnostic disk 2 & DOS *.com. - LaTeX and (optionally) Perl and Transfig needed to print the - documentation. Copying-policy: BSD-License End diff --git a/make.vars b/make.vars index c38e694..4e47243 100644 --- a/make.vars +++ b/make.vars @@ -1,6 +1,6 @@ ### Configuration variables for makefiles ### # -# Copyright 2009-2011 Joachim Wiedorn +# Copyright 2009-2013 Joachim Wiedorn # All rights reserved. # # Licensed under the terms contained in the file 'COPYING' diff --git a/man/Makefile b/man/Makefile index 05ae551..a980969 100644 --- a/man/Makefile +++ b/man/Makefile @@ -1,25 +1,41 @@ +#!/usr/bin/make -f # -*- makefile -*- # adding variables include ../make.vars +PODFILES := lilo-uuid-diskid lilo liloconfig +MANFILES5 := lilo.conf +MANFILES8 := keytab-lilo lilo-uuid-diskid lilo liloconfig mkrescue + all: +build: + for PF in $(PODFILES); do \ + sh ./pod2manpage $$PF.pod; \ + done + install: mkdir -p $$DESTDIR$(MAN_DIR)/man5 - mkdir -p $$DESTDIR$(MAN_DIR)/man8 + for MF in $(MANFILES5); do \ + install -m 0644 $$MF.5 $$DESTDIR$(MAN_DIR)/man5; \ + done - install -m 0644 lilo.8 $$DESTDIR$(MAN_DIR)/man8 - install -m 0644 mkrescue.8 $$DESTDIR$(MAN_DIR)/man8 - install -m 0644 lilo.conf.5 $$DESTDIR$(MAN_DIR)/man5 - install -m 0644 keytab-lilo.8 $$DESTDIR$(MAN_DIR)/man8 + mkdir -p $$DESTDIR$(MAN_DIR)/man8 + for MF in $(MANFILES8); do \ + install -m 0644 $$MF.8 $$DESTDIR$(MAN_DIR)/man8; \ + done clean: distclean: uninstall: - rm -f $$DESTDIR$(MAN_DIR)/man8/lilo.8 - rm -f $$DESTDIR$(MAN_DIR)/man8/mkrescue.8 - rm -f $$DESTDIR$(MAN_DIR)/man5/lilo.conf.5 - rm -f $$DESTDIR$(MAN_DIR)/man8/keytab-lilo.8 + for MF in $(MANFILES5); do \ + rm -vf $$DESTDIR$(MAN_DIR)/man5/$$MF.5 || true; \ + done + + for MF in $(MANFILES8); do \ + rm -vf $$DESTDIR$(MAN_DIR)/man8/$$MF.8 || true; \ + done + diff --git a/man/lilo-uuid-diskid.8 b/man/lilo-uuid-diskid.8 new file mode 100644 index 0000000..facfd7b --- /dev/null +++ b/man/lilo-uuid-diskid.8 @@ -0,0 +1,118 @@ +.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07) +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. \*(C+ will +.\" give a nicer C++. Capital omega is used to do unbreakable dashes and +.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, +.\" nothing in troff, for use with C<>. +.tr \(*W- +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +'br\} +.\" +.\" Escape single quotes in literal strings from groff's Unicode transform. +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.ie \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.el \{\ +. de IX +.. +.\} +.\" ======================================================================== +.\" +.IX Title "LILO-UUID-DISKID 8" +.TH LILO-UUID-DISKID 8 "2013-05-01" "23.3" "lilo documentation" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.if n .ad l +.nh +.SH "NAME" +lilo\-uuid\-diskid \- convert boot / root options to diskid and uuid in lilo.conf. +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +\&\fBlilo-uuid-diskid\fR [\fB\-h\fR] [\fB\-v\fR] [\fBlilo.conf\fR] +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +This script looks for the boot block device or boot partition and create the +right diskid or uuid as boot option. Then it looks for all root partitions +and create the right uuids as root options. +.PP +These conversions are necessary for use with newer kernel (>= 2.6.26) if it +use the libata module for parallel and serial \s-1ATA\s0 interfaces of block devices +(i. e. hard disks with \s-1IDE\s0 or \s-1SATA\s0 interface, usbsticks). +.SH "OPTIONS" +.IX Header "OPTIONS" +.IP "\fB\-h\fR" 4 +.IX Item "-h" +Print a brief help. +.IP "\fB\-v\fR" 4 +.IX Item "-v" +Print verbose messages. +.SH "EXAMPLES" +.IX Header "EXAMPLES" +Lines in the configuration file /etc/lilo.conf: +.PP +.Vb 2 +\& #boot = /dev/sda +\& boot = /dev/disk/by\-id/ata\-SAMSUNG_SV1604N_S01FJ10X999999 +\& +\& #root = /dev/sda1 +\& root = "UUID=/dev/disk/by\-uuid/18843936\-00f9\-4df0\-a373\-000d05a5dd44" +.Ve +.SH "COPYRIGHT and LICENSE" +.IX Header "COPYRIGHT and LICENSE" +Copyright (C) 2010\-2013 Joachim Wiedorn +.PP +This script is free software; you can redistribute it and/or modify +it under the terms of the \s-1GNU\s0 General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. +.SH "AUTHOR" +.IX Header "AUTHOR" +\&\fBlilo-uuid-diskid\fR was written by Joachim Wiedorn. +.PP +This manual page was written by Joachim Wiedorn . +.SH "SEE ALSO" +.IX Header "SEE ALSO" +\&\fBlilo\fR(8), \fBupdate-lilo\fR(8), \fBliloconfig\fR(8) diff --git a/man/lilo-uuid-diskid.pod b/man/lilo-uuid-diskid.pod new file mode 100644 index 0000000..3d43ba1 --- /dev/null +++ b/man/lilo-uuid-diskid.pod @@ -0,0 +1,71 @@ +=for header +manpage: LILO-UUID-DISKID +section: 8 +title: lilo documentation +version: 23.3 +datum: 2013-05-01 + +=encoding utf8 + +=head1 NAME + +lilo-uuid-diskid - convert boot / root options to diskid and uuid in lilo.conf. + +=head1 SYNOPSIS + +B [B<-h>] [B<-v>] [B] + +=head1 DESCRIPTION + +This script looks for the boot block device or boot partition and create the +right diskid or uuid as boot option. Then it looks for all root partitions +and create the right uuids as root options. + +These conversions are necessary for use with newer kernel (>= 2.6.26) if it +use the libata module for parallel and serial ATA interfaces of block devices +(i. e. hard disks with IDE or SATA interface, usbsticks). + +=head1 OPTIONS + +=over 4 + +=item B<-h> + +Print a brief help. + +=item B<-v> + +Print verbose messages. + +=back + +=head1 EXAMPLES + +Lines in the configuration file /etc/lilo.conf: + + #boot = /dev/sda + boot = /dev/disk/by-id/ata-SAMSUNG_SV1604N_S01FJ10X999999 + + #root = /dev/sda1 + root = "UUID=/dev/disk/by-uuid/18843936-00f9-4df0-a373-000d05a5dd44" + +=head1 COPYRIGHT and LICENSE + +Copyright (C) 2010-2013 Joachim Wiedorn + +This script is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +=head1 AUTHOR + +B was written by Joachim Wiedorn. + +This manual page was written by Joachim Wiedorn . + +=head1 SEE ALSO + +B(8), B(8), B(8) + +=cut diff --git a/man/lilo.8 b/man/lilo.8 index 9309925..02512f4 100644 --- a/man/lilo.8 +++ b/man/lilo.8 @@ -1,496 +1,474 @@ -'\" t -.\" @(#)lilo.8 1.0 950728 aeb -.\" This page is based on the lilo docs, which carry the following -.\" COPYING condition: +.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07) .\" -.\" LILO program code, documentation and auxiliary programs are -.\" Copyright 1992-1998 Werner Almesberger. -.\" Extensions to LILO, documentation and auxiliary programs are -.\" Copyright 1999-2005 John Coffman. -.\" All rights reserved by the respective copyright holders. -.\" -.\" Redistribution and use is subject to the terms set forth in -.\" the file COPYING in the source directory. +.\" Standard preamble: +.\" ======================================================================== +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. \*(C+ will +.\" give a nicer C++. Capital omega is used to do unbreakable dashes and +.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, +.\" nothing in troff, for use with C<>. +.tr \(*W- +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +'br\} .\" -.\" Original version, Andries Brouwer (aeb@cwi.nl), 950728 -.\" Added t directive, as Daniel Quinlan asked, 950824 -.\" Added L switch, John Coffman, 991118 -.\" Added T switch, John Coffman, 001001 -.\" Added p switch, John Coffman, 010402 -.\" Added x switch, John Coffman, 010409 -.\" Added A switch, John Coffman, 010417 -.\" Added M switch, John Coffman, 010417 -.\" Added g switch, John Coffman, 010526 -.\" Added z switch, John Coffman, 010829 -.\" Added E switch, John Coffman, 020409 -.\" Added B,F & X switches, John Coffman, 020418 -.\" Added "k" option to I switch, John Coffman, 020609 -.\" Added Z switch, John Coffman, 030314 -.\" Added I switch options "D" and "a", John Coffman, 030513 -.\" Added I switch option "R", John Coffman, 041116 -.\" Added H switch, John Coffman, 050927 +.\" Escape single quotes in literal strings from groff's Unicode transform. +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' .\" -.TH LILO 8 "07 Oct 2005" -.SH NAME -lilo \- install boot loader -.SH SYNOPSIS +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.ie \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.el \{\ +. de IX +.. +.\} +.\" ======================================================================== +.\" +.IX Title "LILO 8" +.TH LILO 8 "2013-05-01" "23.3" "lilo documentation" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.if n .ad l +.nh +.SH "NAME" +lilo \- install boot loader of LiLO +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" Main function: -.LP -.B " /sbin/lilo" -\- install boot loader -.LP +.PP + +  +\&\fBlilo\fR +.PP Auxiliary uses: -.LP -.B " /sbin/lilo -A" -\- activate/show active partition -.br -.B " /sbin/lilo -E" -\- edit header or update a bitmap file -.br -.B " /sbin/lilo -I" -\- inquire path name of current kernel -.br -.B " /sbin/lilo -M " -\- write a Master Boot Loader on a device -.br -.B " /sbin/lilo -q" -\- query map -.br -.B " /sbin/lilo -R" -\- set default command line for next reboot -.br -.B " /sbin/lilo -T" -\- tell more about specified topic -.br -.B " /sbin/lilo {-u|-U}" -\- uninstall LILO boot loader -.SH DESCRIPTION -.LP -.B lilo -installs a boot loader that will be activated the next time you boot your -system. The default configuration file -.I "/etc/lilo.conf" -(see 'man lilo.conf') will contain most options, but many, including -those which override the -configuration file, may be specified on the command line. -.LP -.TP -.BI "\-\^A " "master-device [ N ]" -Used with a single argument, inquire of active partition on device -.IR master-device ; -e.g., \fI/dev/hda\fP. With N==0, deactivate all partitions on the device. With -N in the range [1..n], activate the specified partition and deactivate all -others. Normally, only primary partitions [1..4] may be activated, but if -the Extended Master Boot Loader is present on the Master Boot Record -of the device -(see the \fI-M\fP option), any partition may be made active. Whether the -actual OS in the partition will boot from an extended partition depends on -the characteristics of the OS. LILO boot records for Linux -may be booted from an extended partition. -.TP -.BI "\-\^b " bootdev -Specify the boot device; i.e., where the boot loader will be installed. -"\-b /dev/hda" specifies the Master Boot Record; "\-b /dev/sdb5" specifies -the first extended partition on the second SCSI disk. -.TP -.BI "\-\^B " bitmap-file -Specify a bitmap file for the boot-time graphics screen, preferably one -already pre-processed with the 'lilo \-E' command. -.TP -.B "\-\^c" -Enable map compaction. This will merge read requests from adjacent -sectors. Speeds up the booting (especially from floppy). -.TP -.BI "\-\^C " config-file -.B lilo -Specify an alternate pathname for the configuration file. -This option overrides the use of the default configuration file, -.IR "/etc/lilo.conf" . -.TP -.BI "\-\^d " delay -Specifies the delay time in tenths of a second (20 = 2 sec) before -automatically booting the first image. Gives you time to interrupt the -automatic boot process with Shift, Alt, Ctrl, ScrollLock, or CapsLock. If -interrupted, the `boot:' prompt is displayed. This switch is overridden by -the appearance of -.I prompt -in the configuration file. -.TP -.BI "\-\^D " label -Use the kernel with the given label, instead of the first one -in the list, as the default kernel to boot. -.TP -.BI "\-\^E " filename.ext -If \fB.ext\fP is \fB.bmp\fP, then take the file to be a bitmap graphic file -for use in the "bitmap=" configuration file directive. Enter an interactive -editor to create or update the color/placement information in the -bitmap file LILO header. (see 'bmp-colors', 'bmp-table', and 'bmp-timer' -on the man page for 'lilo.conf(5)'.) -.sp -If \fB.ext\fP is \fB.dat\fP, then take the file to be a configuration file which -specifies bitmap graphic parameters, which are transferred into the LILO -header in the bitmap file of the same name. -.sp -When a \fB.bmp\fP file is modified using a graphics editor (e.g., GIMP), the -LILO header will be lost. It can be restored using the \fB.dat\fP file, -which is used as a text-based backup for the LILO header information. -.TP -.BI "\-\^f " disk-tab -Specify disk geometry parameter file. (The default is -.IR /etc/disktab .) -.TP -.BI "\-\^F" -Override boot sector check for filesystems (e.g., swap, XFS, ...) which might be -destroyed by the installation of the LILO boot sector on the first sector of -the partition. These filesystems use the first sector as a superblock. +.PP -Compare with "\-P ignore", which bypasses certain partition table checks. -.TP -.BI "\-\^g" -Generate cylinder/head/sector (geometric) disk addresses. Limited to -cylinders up to 1023. Forces compatibility with older versions of LILO. -.TP -.BI "\-\^H" -Override fatal halt when a RAID array does not have all disks active. -.TP -.BI "\-\^i " boot-loader -Specify a file to be used as the new boot loader. (The default is -.IR /boot/boot.b .) -.TP -.BI "\-I " "label [D|a|i|k|r|R]" -.B label -is taken to be the name of an image specified in the configuration file. +  +\&\fBlilo\fR \fB\-A\fR # activate/show active partition +  +\&\fBlilo\fR \fB\-E\fR # edit header or update a bitmap file +  +\&\fBlilo\fR \fB\-I\fR # inquire path name of current kernel +  +\&\fBlilo\fR \fB\-M\fR # write a Master Boot Loader on a device +  +\&\fBlilo\fR \fB\-q\fR # query map and show its content +  +\&\fBlilo\fR \fB\-R\fR # set default command line for next reboot +  +\&\fBlilo\fR \fB\-T\fR # tell more about specified topic +  +\&\fBlilo\fR \fB{\-u|\-U}\fR # uninstall LiLO boot loader +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +lilo installs a boot loader that will be activated the next time you boot +your system. The default configuration file \fI/etc/lilo.conf\fR (see manpage +\&\fIlilo.conf\fR\|(5)) will contain most options, but many, including those which +override the configuration file, may be specified on the command line. +.SH "OPTIONS" +.IX Header "OPTIONS" +.IP "\fB\-A\fR \fImaster-device [N]\fR" 4 +.IX Item "-A master-device [N]" +Used with a single argument, inquire of active partition on device \fImaster-device\fR; +e.g. \fI/dev/sda\fR. With N==0: deactivate all partitions on the device. With N in +the range [1..n]: activate the specified partition and deactivate all others. +Normally, only primary partitions [1..4] may be activated, but if the 'Extended +Master Boot Loader' is present on the Master Boot Record (\s-1MBR\s0) of the device +(see the \-M option), any partition may be made active. Whether the actual \s-1OS\s0 +in the partition will boot from an extended partition depends on the characteristics +of the \s-1OS\s0. \s-1LILO\s0 boot records for Linux may be booted from an extended partition. +.IP "\fB\-b\fR \fIbootdev\fR" 4 +.IX Item "-b bootdev" +Set the boot device where the boot loader will be installed. For example +\&\fI\*(L"\-b /dev/sda\*(R"\fR set the Master Boot Record (\s-1MBR\s0) on the first disk as boot +device. \fI\*(L"\-b /dev/sdb5\*(R"\fR set the first extended partition on the second disk +as boot device. +.IP "\fB\-B\fR \fIbitmap-file\fR" 4 +.IX Item "-B bitmap-file" +Define a bitmap file for the boot-time graphics screen, preferably one already +pre-processed with the \fI\-E\fR option. +.IP "\fB\-c\fR" 4 +.IX Item "-c" +Enable map compaction. This will merge read requests from adjacent sectors. +Speeds up the booting especially from floppy. +.IP "\fB\-C\fR \fIconfig-file\fR" 4 +.IX Item "-C config-file" +Set another pathname and filename for the configuration file. The default +configuration file is \fI/etc/lilo.conf\fR. +.IP "\fB\-d\fR \fIdelay-time\fR" 4 +.IX Item "-d delay-time" +Set the delay time in tenths of a second ('20' = 2 sec) before automatically +booting the first image. This give you time to interrupt the automatic boot +process with: Shift, Alt, Ctrl, ScrollLock, or CapsLock. If interrupted, the +\&\fIboot:\fR prompt will be displayed. +.Sp +This switch will be overridden by the appearance of \fIprompt\fR in the +configuration file! +.IP "\fB\-D\fR \fIlabel\fR" 4 +.IX Item "-D label" +Use the kernel with the given label as the default kernel to boot, instead of +the first one in the list of the configuration file. +.IP "\fB\-E\fR \fIfilename.xxx\fR" 4 +.IX Item "-E filename.xxx" +If the extension \fB.xxx\fR is \fB.bmp\fR, then take the file to be a bitmap graphic file +for use in the \fIbitmap=\fR configuration file directive. Enter an interactive +editor to create or update the color/placement information in the \s-1LILO\s0 header +of this bitmap file. (see \fIbmp-colors\fR, \fIbmp-table\fR, and \fIbmp-timer\fR on the +manual page for \fIlilo.conf (5)\fR.) +.Sp +If \fB.xxx\fR is \fB.dat\fR then take this file to be a configuration file to set bitmap +graphic parameters, which are transferred into the \s-1LILO\s0 header in the bitmap file +of the same name. +.Sp +When a \fB.bmp\fR file is modified using a graphics editor (e.g. \s-1GIMP\s0), the \s-1LILO\s0 +header will be lost. It can be restored using the \fBdat\fR file, which is used as +a text-based backup for the \s-1LILO\s0 header information. +.IP "\fB\-f\fR \fIdisk-tab\fR" 4 +.IX Item "-f disk-tab" +Set another disk geometry parameter file. The default is \fI/etc/disktab\fR. +.IP "\fB\-F\fR" 4 +.IX Item "-F" +Override boot sector check for filesystems (e.g., swap, ext4, xfs ...) which +might be destroyed by the installation of the \s-1LILO\s0 boot sector on the first +sector of the partition if these filesystems use the first sector as a superblock. +.Sp +Compare with \fI\-P ignore\fR, which bypasses certain partition table checks. +.IP "\fB\-g\fR" 4 +.IX Item "-g" +Generate 'cylinder/head/sector' (\s-1CHS\s0 geometric) disk addresses. Limited to cylinders +up to 1023. Forces compatibility with very old versions of \s-1LILO\s0 \fI(obsolete switch)\fR. +.IP "\fB\-H\fR" 4 +.IX Item "-H" +Override fatal halt if a \s-1RAID\s0 array does not have all disks active. +.IP "\fB\-I\fR \fIlabel [D|a|i|k|r|R]\fR" 4 +.IX Item "-I label [D|a|i|k|r|R]" +\&\fBlabel\fR is taken to be the name of an image specified in the configuration file. This command will print the path name of the corresponding kernel file, keytable -file, initial ramdisk file, root specification, or "append=" -string ("i", "k", "r", "R", or "a" option). -The "D" option ignores the -.B label -parameter, and prints the default "image=" label, or first "image=" label -if no default -.BI image -is specified. -.TP -.BI "\-\^l" -Generate 24-bit linear sector addresses instead of cylinder/head/sector -addresses. -.TP -.BI "\-\^L" -Generate 32-bit Logical Block Addresses instead of cylinder/head/sector -addresses, allowing -access to all partitions on disks with more than 1024 cylinders. -.TP -.BI "\-\^m " map-file -Use specified map file instead of the default. -.TP -.BI "\-\^M " "master-device " "[mbr|ext]" -Install a Master Boot Record on the device specified as -.IR master-device , -selecting the Standard or Extended Master Boot Loader per the option. -The primary partition table on -.I master-device -is undisturbed. If no valid Volume-ID (serial number) -is present, then generate one -and write it to the MBR. If \fBmbr\fP is specified, the Standard Master -Boot Loader -will search partitions 1-4 for an active flag, and boot the flagged -partition. Only one active flag is allowed. If \fBext\fP is specified, the -search for an active partition will include extended partitions as well. -The presence of the Extended Master Boot Loader on the -Master Boot Record (MBR = sector 0) of a disk -affects the operation of the \fI-A\fP option. -.TP -.BI "\-\^p" -Require interactive entry of all passwords specified as -.B """""" -in the configuration file. -.TP -.BI "\-\^P " "{fix|ignore|\}" -Fix or ignore `corrupt' partition tables, i.e., partition tables -with linear and cylinder/head/sector addresses that do not correspond. -Always try -.I -P ignore -first, as -.I -P fix -will re-write the partition table, possibly destroying all partitions -on the disk. - -.I -P ignore -is also used to bypass the partition table check for partition types within -the partition table which -might not allow the installation of a LILO boot sector. Compare with the -"\-F" flag, which overrides the check of the actual boot sector. - -.I "-P " -allows the passing of any global option which may appear in the global -section (top) of the configuration file (/etc/lilo.conf). For instance, -.I -P nowarn -will pass the "nowarn" option, just as though "nowarn" appeared in the -configuration file (same as the "\-w" switch). Similarly, -.I -P timeout=50 -will add or override the "timeout=" line in the configuration file. Note -that the general -.I -P -switch actually duplicates a number of command line option switches. -However, it is not strictly the same as some switches whick cause an -override of other options; e.g., "\-g" (\-P geometric), "\-L" (\-P lba32). -.TP -.B \-\^q -List the currently mapped files. -.B lilo -maintains a file, by default -.IR "/boot/map" , -containing the name and location of the kernel(s) to boot. -This option will list the names therein. Use with \fB-v\fP for -more detailed information about the installed boot loader. -.TP -.BI "\-\^r " root-directory -Before doing anything else, do a \fIchroot\fP to the indicated -directory. The new root directory must contain a -.I /dev -directory, and may need a -.I /boot -directory. It may also need an -.IR /etc/lilo.conf " file." -.TP -.BI "\-\^R " "command line" -This option sets the default command for the boot loader the next -time it executes. The boot loader will then erase this line: this -is a once-only command. It is typically used in reboot scripts, -just before calling `shutdown \-r'. Used without any arguments, it will -cancel a \fIlock\fP-ed or \fIfallback\fP command line. -.TP -.BI "\-\^s " save-file -When -.B lilo -writes a new boot sector, it preserves the former contents of the sector -in a file, named by default \fI/boot/boot.NNNN\fP, -where NNNN is the hexadecimal representation of the major and minor -device numbers of the drive/partition. This option specifies the backup -save file in one of three ways: a save directory (default is '/boot') using -the default filename 'boot.NNNN' in the specified directory; a pathname template -to which '.NNNN' is appended (default would be '/boot/boot'); -or the full pathname of the file, which must include the correct '.NNNN' -suffix. When used with the -\fB-u\fP option, the full file pathname must be specified. -.TP -.BI "\-\^S " save-file -Normally, -.B lilo -will not overwrite an existing boot sector save file. This options says -that overwriting is to be forced. As with \fB-s\fP, the specification may be of a -save directory, pathname template, or full pathname (which includes the '.NNNN' -suffix.) -.TP -.BI "\-\^t " -Test only. Do not really write a new boot sector or map file. -Use together with \fB-v\fP to find out what -.B lilo -is about to do. -.TP -.BI "\-\^T " option -Print out system information, some of it extracted from the system -bios. This is more convenient than booting the LILO diagnostic -floppy on problem systems. -.I option +file, initial ramdisk file, root specification, or \*(L"append=\*(R" string (\*(L"i\*(R", \*(L"k\*(R", +\&\*(L"r\*(R", \*(L"R\*(R", or \*(L"a\*(R" option). The \*(L"D\*(R" option ignores the \fBlabel\fR parameter and +prints the default \*(L"image=\*(R" label, or the first \*(L"image=\*(R" label is selected if +no default \fBimage\fR is set. +.IP "\fB\-l\fR" 4 +.IX Item "-l" +Generate 24\-bit linear sector addresses instead of cylinder/head/sector addresses. +.IP "\fB\-L\fR" 4 +.IX Item "-L" +Generate 32\-bit Logical Block Addresses (\s-1LBA\s0) instead of cylinder/head/sector (\s-1CHS\s0) +addresses, allowing access to all partitions on disks with more than 1024 cylinders. +(This is the default geometry). +.IP "\fB\-m\fR \fImap-file\fR" 4 +.IX Item "-m map-file" +Use another map file instead of the default file /boot/map. +.IP "\fB\-M\fR \fImaster-device\fR \fB{mbr|ext}\fR" 4 +.IX Item "-M master-device {mbr|ext}" +Install a Master Boot Record on the device specified as master-device, selecting +the Standard or Extended Master Boot Loader per option. The primary partition +table on master-device is undisturbed. If no valid Volume-ID (serial number) is +present, then generate one and write it to the \s-1MBR\s0. If \fImbr\fR is set, the +Standard Master Boot Loader will search partitions 1\-4 for an active flag, and +boot the flagged partition. Only one active flag is allowed. If \fIext\fR is set, +the search for an active partition will include extended partitions as well. +The presence of the Extended Master Boot Loader on the Master Boot Record +(\s-1MBR\s0 = sector 0) of a disk affects the operation of the \fI\-A\fR option. +.IP "\fB\-p\fR" 4 +.IX Item "-p" +Require interactive entry of all passwords set as "" in the configuration file. +.IP "\fB\-P\fR \fI{fix|ignore|" 4 +.IX Item "-P {fix|ignore|" +Fix or ignore 'corrupt' partition tables, e.g. partition tables with linear and +cylinder/head/sector addresses that do not correspond. Always try \fBignore\fR +first, as \fBfix\fR will re-write the partition table, possibly destroying all +partitions on the disk. +.Sp +\&\fBignore\fR is also used to bypass the partition table check for partition types +within the partition table which might not allow the installation of a \s-1LILO\s0 boot +sector. Compare with the '\-F' flag, which overrides the check of the actual +boot sector. +.Sp +\&\fB\fR allows the passing of any global option which may +appear in the global section (top) of the configuration file (\fI/etc/lilo.conf\fR). +For instance \fI'\-P nowarn'\fR will pass the 'nowarn' option, just as though 'nowarn' +appeared in the configuration file (same as the '\-w' switch). Similarly +\&\fI'\-P timeout=50'\fR will add or override the 'timeout=' line in the configuration +file. Note that the general \fB\-P\fR switch actually duplicates a number of command +line option switches. However, it is not strictly the same as some switches which +cause an override of other options; e.g. '\-g' (\-P geometric), '\-L' (\-P lba32). +.IP "\fB\-q\fR" 4 +.IX Item "-q" +List the currently mapped files. \fBlilo\fR maintains a file, by default \fI/boot/map\fR, +containing each name and location of the kernel(s) to boot. This option will list +the names therein. Use with \fB\-v\fR for more detailed information about the +installed boot loader. +.IP "\fB\-r\fR \fIroot-directory\fR" 4 +.IX Item "-r root-directory" +Before doing anything else, do a \fI'chroot'\fR to the indicated directory. The new +root directory must contain a \fI/dev\fR directory and may need a /boot directory. +It may also need an \fI/etc/lilo.conf\fR file. +.IP "\fB\-R\fR \fIcommand-line\fR" 4 +.IX Item "-R command-line" +This option sets the default command for the boot loader for the next time it +executes. After execution the boot loader will erase this line because it is a +once-only command. It is typically used in reboot scripts, just before calling +\&'shutdown \-r'. Used without any arguments, it will cancel a \fIlock\fR\-ed or +\&\fIfallback\fR command line. +.IP "\fB\-s\fR \fIsave-file\fR" 4 +.IX Item "-s save-file" +When lilo writes a new boot sector, it preserves the former contents of the boot +sector in a file, named by default /boot/boot.NNNN, where \s-1NNNN\s0 is the hexadecimal +representation of the major and minor device numbers of the drive/partition. +.Sp +This option defines the backup save file in one of three ways: a save directory +(default is '/boot') using the default filename 'boot.NNNN' in the defined +directory; a pathname template to which '.NNNN' is appended (default would be +\&'/boot/boot'); or the full pathname of the file, which must include the correct +\&'.NNNN' suffix. When used with the \-u option, the full file pathname must be set. +.IP "\fB\-S\fR \fIsave-file\fR" 4 +.IX Item "-S save-file" +Normally lilo will not overwrite an existing boot sector save file. This options +says that overwriting is to be forced. As with \-s, the setting may be of a save +directory, pathname template, or full pathname (which includes the '.NNNN' suffix). +.IP "\fB\-t\fR" 4 +.IX Item "-t" +Test only. Do not really write a new boot sector or map file. Use together with +\&\fB\-v\fR to find out what lilo is about to do. +.IP "\fB\-T\fR \fIoption\fR" 4 +.IX Item "-T option" +Print out system information, some of it extracted from system bios. This is more +convenient than booting the \s-1LILO\s0 diagnostic floppy on problem systems. \fBoption\fR may be any one of the following: -.IP -.nf - help - print a list of available diagnostics - ChRul - list the partition types subject to - Change-Rules - EBDA - list Extended BIOS Data Area information - geom= list drive geometry for bios drive; - e.g., geom=0x80 - geom - list drive geometry for all drives - table= list the primary partition table; - e.g., table=/dev/sda - video - list graphic modes available to boot - loader -.fi -.TP -.BI "\-\^u " [device-name] -Uninstall \fIlilo\fP by copying the saved boot sector back. -The '\-s' and '\-C' switches may be used with this option. -The \fIdevice-name\fP is optional. A time-stamp is checked. -.TP -.BI "\-\^U " [device-name] -Idem, but do not check the time-stamp. -.TP -.B "\-\^v" -Increase verbosity. Giving one to five \fB-v\fP options -will make lilo more verbose, or use, \fB-v\fP \fIn\fP (n=1..5) to -set verbosity level '\fIn\fP'. -.TP -.B "\-\^V" +.Sp +.Vb 11 +\& help print a list of available diagnostics +\& ChRul list the partition types subject to +\& Change\-Rules +\& EBDA list Extended BIOS Data Area information +\& geom= list drive geometry for bios drive; +\& e.g. geom=0x80 +\& geom list drive geometry for all drives +\& table= list the primary partition table; +\& e.g. table=/dev/sda +\& video list graphic modes available to boot +\& loader +.Ve +.IP "\fB\-u\fR \fI[device\-name]\fR" 4 +.IX Item "-u [device-name]" +Uninstall lilo by copying the saved boot sector back. The \fB\-s\fR and \fB\-C\fR switches +may be used with this option. The device-name is optional. A time-stamp is +checked. +.IP "\fB\-U\fR \fI[device\-name]\fR" 4 +.IX Item "-U [device-name]" +The same as '\-u', but do not check the time-stamp. +.IP "\fB\-v\fR \fI[number]\fR" 4 +.IX Item "-v [number]" +Increase verbosity. Giving one to five \fB\-v\fR options will make lilo more verbose. +The \fBnumber\fR (range 1..5) set verbosity level. +.IP "\fB\-V\fR" 4 +.IX Item "-V" Print version number. -.TP -.B "\-\^w" -Used as \fB-w\fP or \fB-w-\fP, suppress warning messages. -Used as \fB-w+\fP, override \fInowarn\fP in -the configuration file, and show warning messages. -.TP -.BI "\-\^x " option -For RAID installations only. The option may be any of the keywords -.IR none , -.IR auto , -.IR mbr , -.IR mbr-only , -or a comma separated list of additional boot devices (no spaces allowed in -the list). -.TP -.BI "\-\^X" -Reserved for LILO internal use. May produce different -output for different LILO versions. The line beginning "CFLAGS=" -will contain the compiler options used to generate this version of LILO. -.TP -.B "\-\^z" -When used with the `\-M' switch, clears the Volume-ID. Usually used -in the following sequence to generate a new Volume-ID: -.nf - lilo \-z \-M /dev/hda - lilo \-M /dev/hda -.fi -.br -.TP -.BI "\-\^Z " option -Tells the boot installer whether special precautions need to be taken -because the BIOS fails to pass the correct device code in DL (\-Z0). Or may -specify that the BIOS always gets DL right (\-Z1). Corresponds to, and -overrides, the configuration file option 'bios-passes-dl='. -.LP -The above command line options correspond to the key words -in the config file indicated below. -.IP -.TS -l l. -\-b bootdev boot=bootdev -\-B file.bmp bitmap=file.bmp -\-c compact -\-d dsec delay=dsec -\-D label default=label -\-i boot-loader install=boot-loader -\-f file disktab=file -\-g geometric -\-l linear -\-L lba32 -\-m mapfile map=mapfile -\-P fix fix-table -\-P ignore ignore-table -\-s file backup=file -\-S file force-backup=file -\-v [N] verbose=N -\-w nowarn -\-x option raid-extra-boot=option -\-Z option bios-passes-dl=option -.TE +.IP "\fB\-w\fR\fI[+|\-]\fR" 4 +.IX Item "-w[+|-]" +Used as \fB\-w\fR or \fB\-w\-\fR to suppress warning messages. Used as '\-w+' to override +\&\fI'nowarn'\fR in the configuration file and show warning messages. +.IP "\fB\-x\fR \fIoption\fR" 4 +.IX Item "-x option" +For \s-1RAID\s0 installations only. The option may be any of the keywords: \fInone\fR, +\&\fIauto\fR, \fImbr\fR, \fImbr-only\fR, or a comma separated list of additional boot +devices (no spaces allowed in the list). +.Sp +\&\s-1RAID\s0 installations write the boot record to the \s-1RAID\s0 partition. Conditional +writing of MBRs may occur to aid in making the \s-1RAID\s0 set bootable in a recovery +situation, but all default actions may be overridden. Action similar to previous +versions is achieved using the \fI'\-x mbr\-only'\fR switch. +.IP "\fB\-X\fR" 4 +.IX Item "-X" +Reserved for \s-1LILO\s0 internal use. May produce different output for different \s-1LILO\s0 +versions. The line beginning \*(L"CFLAGS=\*(R" will contain the compiler options used to +generate this version of \s-1LILO\s0. +.IP "\fB\-z\fR" 4 +.IX Item "-z" +When used with the '\-M' switch, clears the Volume-ID. Usually used in the +following sequence to generate a new Volume-ID: +.Sp +.Vb 2 +\& lilo \-z \-M /dev/hda +\& lilo \-M /dev/hda +.Ve +.IP "\fB\-Z\fR \fIoption\fR" 4 +.IX Item "-Z option" +Tells the boot installer whether special precautions need to be taken because +the \s-1BIOS\s0 fails to pass the correct device code in \s-1DL\s0 (\-Z0). Or may specify +that the \s-1BIOS\s0 always gets \s-1DL\s0 right (\-Z1). Corresponds to, and overrides, the +configuration file option 'bios\-passes\-dl='. +.SH "CONFIG OPTIONS" +.IX Header "CONFIG OPTIONS" +The above command line options correspond to the key words in the config file +indicated below. +.PP +.Vb 1 +\& \-b bootdev boot=bootdev +\& +\& \-B file.bmp bitmap=file.bmp +\& \-c compact +\& \-d dsec delay=dsec +\& \-D label default=label +\& \-f file disktab=file +\& \-g geometric +\& \-l linear +\& \-L lba32 +\& \-m mapfile map=mapfile +\& \-P fix fix\-table +\& \-P ignore ignore\-table +\& \-s file backup=file +\& \-S file force\-backup=file +\& \-v [N] verbose=N +\& \-w nowarn +\& \-x option raid\-extra\-boot=option +\& \-Z option bios\-passes\-dl=option +.Ve .SH "BOOT OPTIONS" -The options described here may be specified at boot time on -the command line when a -kernel image is booted. These options are processed by LILO, and are -removed from the command line before it is passed to the kernel, -unless otherwise noted. -.LP -.TP -.BI lock -Locks the command line, as though 'lock' had been specified in 'lilo.conf.' -.TP -.BI "mem=###[,K,M,G]" -Specifies the maximum memory in the system in bytes, kilobytes, megabytes, -or gigabytes. -This option is not removed from the command line, and is always passed to -the kernel. -.TP -.BI nobd -Suppresses the BIOS data check. This option is reserved for use with -non-IBM-compliant BIOS's which hang with the lines: -.sp -.nf - Loading............... - BIOS data check -.fi -.TP -.BI "vga=[ASK,EXT,EXTENDED,NORMAL,###,0x###]" +.IX Header "BOOT OPTIONS" +The options described here may be specified at boot time on the command line +when a kernel image is booted. These options are processed by \s-1LILO\s0, and are +removed from the command line before it is passed to the kernel, unless otherwise +noted. +.IP "\fBlock\fR" 4 +.IX Item "lock" +Locks the command line, as though 'lock' had been defined in \fI/etc/lilo.conf\fR. +.IP "\fBmem=###[,K,M,G]\fR" 4 +.IX Item "mem=###[,K,M,G]" +Set the maximum memory in the system in bytes, kilobytes, megabytes or gigabytes. +This option is not removed from the command line, and is always passed to the +kernel. +.IP "\fBnobd\fR" 4 +.IX Item "nobd" +Suppresses the \s-1BIOS\s0 data check. This option is reserved for use with +non-IBM-compliant \s-1BIOS\s0's which hang with the lines: +.Sp +.Vb 2 +\& Loading............... +\& BIOS data check +.Ve +.IP "\fBvga=[\s-1ASK\s0,EXT,EXTENDED,NORMAL,###,0x###]\fR" 4 +.IX Item "vga=[ASK,EXT,EXTENDED,NORMAL,###,0x###]" Allows overriding the default video mode upon kernel startup. -.br -.SH BOOT ERRORS -The boot process takes place in two stages. The first stage loader is a -single sector, and is loaded by the BIOS or by the loader in the MBR. It -loads the multi-sector second stage loader, but is very space limited. When -the first stage loader gets control, it types the letter "L"; when it is -ready to transfer control to the second stage loader it types the letter -"I". If any error occurs, like a disk read error, it will put out a -hexadecimal error code, and then it will re-try the operation. All hex -error codes are BIOS return values, except for the lilo-generated 40, 99 and 9A. -A partial list of error codes follows: -.br -.IP -.TS -l l. -00 no error -01 invalid disk command -02 address mark not found -03 disk write-protected -04 sector not found -06 floppy disk removed -08 DMA overrun -0A bad sector flag -0B bad track flag -20 controller failure -40 seek failure (BIOS) -40 cylinder>1023 (LILO) -99 invalid second stage index sector (LILO) -9A no second stage loader signature (LILO) -AA drive not ready -FF sense operation failed -.TE -.br -.LP -Error code 40 is generated by the BIOS, or by LILO during the conversion of -a linear (24-bit) disk address to a geometric (C:H:S) address. On older -systems which do not support lba32 (32-bit) addressing, this error may also -be generated. Errors 99 and 9A usually mean the map file (\-m or map=) is -not readable, likely because LILO was not re-run after some system change, -or there is a geometry mis-match between what LILO used (lilo \-v3 to -display) and what is actually being used by the BIOS (one of the lilo -diagnostic disks, available in the source distribution, may be needed to -diagnose this problem). - -When the second stage loader has received control from the first stage, it -prints the letter "L", and when it has initialized itself, including -verifying the "Descriptor Table" \- the list of kernels/others to boot \- it -will print the letter "O", to form the full word "LILO", in uppercase. - -All second stage loader error messages are English text, and try to -pinpoint, more or less successfully, the point of failure. -.br -.SH INCOMPATIBILITIES -.B lilo -is known to have problems with the -.I reiserfs -introduced with the 2.2.x kernels, unless the file system is -mounted with the 'notail' option. This incompatibility has been -resolved with reiserfs 3.6.18 and lilo 21.6. -.I reiser4 -introduced with the 2.5.x kernels requires lilo 22.5.2 or later. -.sp -Beginning with version 22.0, RAID installations write the boot record to -the RAID partition. Conditional writing of MBRs may occur to aid in making -the RAID set bootable in a recovery situation, but all default actions may -be overridden. Action similar to previous versions is -achieved using the `\-x mbr-only' switch. -.SH BUGS -Configuration file options `backup' and `force-backup' -should specify a backup directory or backup file pathname template on -all RAID installations. Use of an explicit filename may not allow multiple -backup files to be created correctly. It is best to use the default mechanism, -as it works correctly in all cases. +.SH "BOOT ERRORS" +.IX Header "BOOT ERRORS" +The boot process takes place in two stages. The first stage loader is a single +sector, and is loaded by the \s-1BIOS\s0 or by the loader in the \s-1MBR\s0. It loads the +multi-sector second stage loader, but is very space limited. When the first +stage loader gets control, it types the letter 'L'; when it is ready to +transfer control to the second stage loader it types the letter 'I'. If any +error occurs, like a disk read error, it will put out a hexadecimal error code +and then re-try the operation. All hex error codes are \s-1BIOS\s0 return values, +except for the lilo-generated codes: 40, 99 and 9A. A partial list of error +codes follows: +.PP +.Vb 10 +\& 00 no error +\& 01 invalid disk command +\& 02 address mark not found +\& 03 disk write\-protected +\& 04 sector not found +\& 06 floppy disk removed +\& 08 DMA overrun +\& 0A bad sector flag +\& 0B bad track flag +\& 20 controller failure +\& 40 seek failure (BIOS) +\& 40 cylinder>1023 (LILO) +\& 99 invalid second stage index sector (LILO) +\& 9A no second stage loader signature (LILO) +\& AA drive not ready +\& FF sense operation failed +.Ve +.PP +Error code 40 is generated by the \s-1BIOS\s0, or by \s-1LILO\s0 during the conversion of a +linear (24\-bit) disk address to a geometric (C:H:S) address. On older systems +which do not support lba32 (32\-bit) addressing, this error may also be generated. +Errors 99 and 9A usually mean the map file ('\-m' or 'map=') is not readable, +likely because \s-1LILO\s0 was not re-run after some system change, or there is a +geometry mismatch between what \s-1LILO\s0 used (lilo \-v3 to display) and what is +actually being used by the \s-1BIOS\s0 (one of the lilo diagnostic disks, available +in the source distribution, may be needed to diagnose this problem). +.PP +When the second stage loader has received control from the first stage, it +prints the letter 'L', and when it has initialized itself, including verifying +the \*(L"Descriptor Table\*(R" \- the list of kernels/others to boot \- it will print +the letter \*(L"O\*(R", to form the full word \*(L"\s-1LILO\s0\*(R", in uppercase. +.PP +All second stage loader error messages are English text and try to pinpoint, +more or less successfully, the point of failure. +.SH "BUGS" +.IX Header "BUGS" +Configuration file options 'backup' and 'force\-backup' should specify a backup +directory or backup file pathname template on all \s-1RAID\s0 installations. Use of an +explicit filename may not allow multiple backup files to be created correctly. +It is best to use the default mechanism, as it works correctly in all cases. +.SH "COPYRIGHT and LICENSE" +.IX Header "COPYRIGHT and LICENSE" +.Vb 3 +\& Copyright (C) 1992\-1998 Werner Almesberger +\& Copyright (C) 1999\-2007 John Coffman +\& Copyright (C) 2009\-2013 Joachim Wiedorn +.Ve +.PP +Redistribution and use in source and binary forms, with or without +modification, are permitted under the terms of the \s-1BSD\s0 license found in +the \s-1COPYING\s0 file. +.SH "AUTHOR" +.IX Header "AUTHOR" +\&\fBlilo\fR was written by: +.PP +.Vb 3 +\& Werner Almesberger (version 0 to 21), +\& John Coffman (version 21.2 to 22.8), +\& Joachim Wiedorn (since version 23.0). +.Ve +.PP +This manual page was written by Werner Almesberger and Joachim Wiedorn +. .SH "SEE ALSO" -fdisk(8), lilo.conf(5), mkrescue(8), mkinitrd(8). -.sp -The lilo distribution comes with very extensive TeX documentation through -Version 21. Text file README's in the source directory provide updates on -more recent topics. -.SH "AUTHORS" -Werner Almesberger (versions 0 to 21) -.br -John Coffman (21.2 to present date) +.IX Header "SEE ALSO" +\&\fBlilo.conf\fR(5), +\&\fBliloconfig\fR(8), +\&\fBlilo-uuid-diskid\fR(8), +\&\fBmkrescue\fR(8), +\&\fBfdisk\fR(8), +\&\fBmkinitrd\fR(8) diff --git a/man/lilo.conf.5 b/man/lilo.conf.5 index c769b4d..557646b 100644 --- a/man/lilo.conf.5 +++ b/man/lilo.conf.5 @@ -1,5 +1,5 @@ '\" t -.\" @(#)lilo.conf.5 1.0 950728 aeb +.\" @(#)lilo.conf.5 .\" This page is based on the lilo docs, which carry the following .\" COPYING condition: .\" @@ -7,6 +7,9 @@ .\" Copyright 1992-1998 Werner Almesberger. .\" Extensions to LILO, documentation and auxiliary programs are .\" Copyright 1999-2005 John Coffman. +.\" Extensions to LILO, documentation and auxiliary programs are +.\" Copyright 2009-2011 Joachim Wiedorn. +.\" .\" All rights reserved by the respective copyright holders. .\" .\" Redistribution and use in source and binary forms of parts of or the @@ -16,7 +19,7 @@ .\" this software without specific prior written permission. This work .\" is provided "as is" and without any express or implied warranties. .\" -.TH LILO.CONF 5 "April 2011" +.TH LILO.CONF 5 "June 2011" .SH NAME lilo.conf \- configuration file for lilo .SH DESCRIPTION @@ -69,22 +72,22 @@ other=/dev/hdb5 This configuration file specifies that lilo uses the Master Boot Record on /dev/hda. (For a discussion of the various ways to use lilo, and the interaction with other operating systems, -see user.tex from the lilo documentation.) +see user.pdf from the lilo documentation.) .LP When booting, the boot loader will issue its .I "boot:" -prompt and wait for you to enter the label of the kernel (and any options) -which you wish to boot. At any time you may hit [Tab] to see -a list of kernel/other labels. +prompt and wait for you to enter the label of the kernel (and any +options) which you wish to boot. At any time you may hit [Tab] to +see a list of kernel/other labels. Alternately, if the \fBmenu\fP boot loader is installed, a menu of boot options will be presented for your selection. The title of this menu is overridden with the menu title specification in this configuration file. -If you enter nothing, -then the default kernel image, the first mentioned, (/boot/zImage-1.5.99) -will be booted after a timeout of 15 seconds (150 deciseconds). -There may be at least 16 images mentioned in lilo.conf. (The exact number depends -upon compilation options.) +If you enter nothing, then the default kernel image, the first +mentioned, (in the example /boot/vmlinuz-2.6.29-1-i386) will be +booted after a timeout of 15 seconds (150 deciseconds). There may +be at least 16 images mentioned in lilo.conf. (The exact number +depends upon compilation options.) .LP As can be seen above, a configuration file starts with a number of global options (the top 9 lines in the example), @@ -95,7 +98,7 @@ Comment lines may appear anywhere, and begin with the "#" character. .SH "GLOBAL OPTIONS" There are many possible keywords. The description below is -almost literally from user.tex (just slightly abbreviated). +almost literally from user.pdf (just slightly abbreviated). .TP .BI "backup=" Specifies the location where a copy of any modified boot sector will be @@ -119,8 +122,8 @@ loader in the DL register. Its only function at this point is experimental, as certain RAID installations may benefit from knowing that the BIOS is 100% reliable. Its use should be considered experimental. .sp -N.B.: This option may not be retained in releases beyond 22.5.1, and -may be specified on the command line with the '\-Z' switch: yes=1, no=0. +This option may be specified on the command line with the '\-Z' switch: +yes=1, no=0. .TP .BI "bitmap=" Specifies use of a 640x480x16 (VGA BIOS) or 640x480x256 (VGA/VESA BIOS) @@ -138,12 +141,12 @@ From a text file with all the information about 'bmp-colors', 'bmp-table' and 'bmp-timer' options together with the 'bitmap' option are stored in the special LILO header of the bitmap image file by the .BI "lilo -E" -+command. Another way works without these special header information: All -+the information about 'bmp-colors', 'bmp-table' and 'bmp-timer' options -+together with the 'bitmap' option are stored in the configuration file. -+Any use of the 'bmp-' options within the configuration file overrides -+the options stored in the bitmap file header. If lilo cannot find any of -+the 'bmp-' options, then default values are used. +command. Another way works without these special header information: All +the information about 'bmp-colors', 'bmp-table' and 'bmp-timer' options +together with the 'bitmap' option are stored in the configuration file. +Any use of the 'bmp-' options within the configuration file overrides +the options stored in the bitmap file header. If lilo cannot find any of +the 'bmp-' options, then default values are used. .TP .BI "bmp-colors=" ,,,,, Specifies the decimal values of the colors to be used for the menu display @@ -184,14 +187,12 @@ then the form 'bmp-timer = none' is acceptable. This will disable the timer display entirely. .TP .BI "boot=" -Sets the name of the device (e.g. a hard disk partition) that contains -the boot sector. If this keyword is omitted, the boot sector is read -from (and possibly written to) the device that is currently mounted as root. +Sets the name of the device (e.g. hard disk or partition) that contains +the boot sector and where the new boot sector should be written to. Notice: +The boot-device should be the device with the currently mounted root partition. .sp A raid installation is initiated by specifying a RAID1 device as the boot -device; e.g., "boot=/dev/md0". Note that LILO version 22.0 and later -operate differently from earlier versions with respect to the actual -location of the boot records. +device; e.g., "boot=/dev/md0". .sp On newer systems you need an unique ID for the boot device. If the boot sector should write to a partition you can use its UUID in the same manner @@ -230,7 +231,7 @@ rules are sufficient. The strings which define the partition types are used in a .I change section (see below), with the suffixes "_normal" or "_hidden" appended. -See section "Partition type change rules" of user.tex for more details. +See section "Partition type change rules" of user.pdf for more details. .TP .BI "compact" Tries to merge read requests for adjacent sectors into a single @@ -260,7 +261,7 @@ This action is modified by specifying `prompt' (see below). .TP .BI "disk=" Defines non-standard parameters for the specified disk. -See section "Disk geometry" of user.tex for details. +See section "Disk geometry" of user.pdf for details. For versions of LILO prior to 22.5, the `bios=' parameter is quite useful for specifying how the BIOS has assigned device codes to your disks. @@ -707,17 +708,26 @@ If the booted image is a Linux kernel, then one may pass command line parameters to this kernel. .TP .BI "addappend=" -(22.6) The kernel parameters from the specified string, are concatenated to the +The kernel parameters of this string are concatenated to the parameter(s) from an .B "append=" -specification (see below). -The string must be enclosed within double quotes. Usually, the previous +option (see below). +The string of addappend must be enclosed within double quotes. +Usually, the previous .B "append=" -will specify parameters common to all kernels by appearing in the top, -or global, section of the configuration file and +will set parameters common to all kernels by appearing in the global +section of the configuration file and .B "addappend=" will be used to add local parameter(s) to an individual image. -Addappend= may be used only once per "image=" section. +The addappend option may be used only once per "image=" section. +.sp +If the string is a very long line, this line can be divided +in more lines using "\\" as last character of a line, e.g. +.sp +.nf + addappend="noapic acpi=off pci=usepirqmask \\ + pnpbios=off pnpacpi=off noisapnp" +.fi .TP .BI "append=" Appends the options specified to the parameter line passed to the kernel. @@ -726,14 +736,16 @@ entirely auto-detected or for which probing may be dangerous. Multiple kernel parameters are separated by a blank space, and the string must be enclosed in double quotes. A local append= appearing withing an image= section overrides any -global append= appearing in the top section of the configuration file. -Append= may be used only once per "image=" +global append= appearing in the global section of the configuration file. +The append option may be used only once per "image=" section. To concatenate parameter strings, use "addappend=". Example: .sp .nf append="mem=96M hd=576,64,32 console=ttyS1,9600" .fi .sp +If the string is a very long line, this line can be divided in more lines +using "\\" as last character of a line. See example of addappend option. .TP .BI "initrd=" Specifies the initial ramdisk image to be loaded with the kernel. The @@ -769,9 +781,8 @@ If the special name is used, the root device is set to the device on which the root file system is currently mounted. If the root has been changed with \-r , the respective device is used. If the variable `root' is omitted, -the root device setting contained in the kernel image is used. -(And that is set at compile time using the ROOT_DEV variable in -the kernel Makefile, and can later be changed with the rdev(8) program.) +the root device setting contained in the running kernel image is used. +Warning: This can induce to an unbootable system! .sp The root filesystem may also be specified by a .B LABEL= @@ -855,11 +866,6 @@ in its boot sector.) Note that /sbin/lilo must be re-run if a partition table mapped referenced with `table' is modified. .TP -.BI "table=" -This option is obsolete. It were used in the special case with the obsolete -.I os2_d -chain loader. -.TP .BI "change" This keyword starts a section which describes how primary partition IDs are changed, and how primary partitions are activated and deactivated. If diff --git a/man/lilo.pod b/man/lilo.pod new file mode 100644 index 0000000..602c857 --- /dev/null +++ b/man/lilo.pod @@ -0,0 +1,451 @@ +=for header +manpage: LILO +section: 8 +title: lilo documentation +version: 23.3 +datum: 2013-05-01 + +=encoding utf8 + +=head1 NAME + +lilo - install boot loader of LiLO + +=head1 SYNOPSIS + +Main function: + +E<10> E<8> +B + +Auxiliary uses: + +E<10> E<8> +B B<-A> # activate/show active partition E<10> E<8> +B B<-E> # edit header or update a bitmap file E<10> E<8> +B B<-I> # inquire path name of current kernel E<10> E<8> +B B<-M> # write a Master Boot Loader on a device E<10> E<8> +B B<-q> # query map and show its content E<10> E<8> +B B<-R> # set default command line for next reboot E<10> E<8> +B B<-T> # tell more about specified topic E<10> E<8> +B B<{-u|-U}> # uninstall LiLO boot loader + +=head1 DESCRIPTION + +lilo installs a boot loader that will be activated the next time you boot +your system. The default configuration file F (see manpage +lilo.conf(5)) will contain most options, but many, including those which +override the configuration file, may be specified on the command line. + +=head1 OPTIONS + +=over 4 + +=item B<-A> I + +Used with a single argument, inquire of active partition on device I; +e.g. I. With N==0: deactivate all partitions on the device. With N in +the range [1..n]: activate the specified partition and deactivate all others. +Normally, only primary partitions [1..4] may be activated, but if the 'Extended +Master Boot Loader' is present on the Master Boot Record (MBR) of the device +(see the -M option), any partition may be made active. Whether the actual OS +in the partition will boot from an extended partition depends on the characteristics +of the OS. LILO boot records for Linux may be booted from an extended partition. + +=item B<-b> I + +Set the boot device where the boot loader will be installed. For example +I<"-b /dev/sda"> set the Master Boot Record (MBR) on the first disk as boot +device. I<"-b /dev/sdb5"> set the first extended partition on the second disk +as boot device. + +=item B<-B> I + +Define a bitmap file for the boot-time graphics screen, preferably one already +pre-processed with the I<-E> option. + +=item B<-c> + +Enable map compaction. This will merge read requests from adjacent sectors. +Speeds up the booting especially from floppy. + +=item B<-C> I + +Set another pathname and filename for the configuration file. The default +configuration file is F. + +=item B<-d> I + +Set the delay time in tenths of a second ('20' = 2 sec) before automatically +booting the first image. This give you time to interrupt the automatic boot +process with: Shift, Alt, Ctrl, ScrollLock, or CapsLock. If interrupted, the +I prompt will be displayed. + +This switch will be overridden by the appearance of I in the +configuration file! + +=item B<-D> I