Commit 6474a619 authored by Joachim Wiedorn's avatar Joachim Wiedorn

Imported Upstream version 24.2

parent e05a6f05
Changes for version 24.2 (22-November-2015) - Joachim Wiedorn
Sources
-------
- Remove compile date and time in binary to support reproducible
builds (thanks to Dmitry Bogatov).
- Remove obsolete hints to /boot/boot.b and other files in README.
- Use system derived types to make code safe for both the 32-bit and
the 64-bit compilation environment. (thanks to TAMUKI Shoichi)
General
-------
- Update sample config file lilo.example.conf and config element
'password'.
- Upgrade of script liloconfig:
* three steps of tests with three-state exit code
to give the admin more information about failure.
- Update manpage pod files and its manpages.
Changes for version 24.1 (17-October-2014) - Joachim Wiedorn
Documentations
......
# -*- makefile -*-
#
# Copyright 2009-2014 Joachim Wiedorn
# Copyright 2009-2015 Joachim Wiedorn
# All rights reserved.
#
# Licensed under the terms contained in the file 'COPYING'
......
......@@ -3,6 +3,12 @@ NEWS about project LILO
(For details see file 'CHANGELOG' in the source directory)
Version 24.2 (minor and bugfix update of 24.1)
o Remove compile date and time in binary.
o Add 'password' element into example config file.
o Upgrade of liloconfig script and manpage.
Version 24.1 (minor and bugfix update of 24.0)
o Install .dat files of images, too.
......
......@@ -7,6 +7,6 @@ TODO for project LILO
* patching sources because of some warnings while compiling
with gcc 4.4.x and higher
* Upgrade of all manpages (move to po files).
* Upgrade of all manpages (move to pot files).
* code cleanup.
......@@ -8,17 +8,17 @@ they can be found in:
at least tested programs
package version until inside
-----------------------------------------------------------------
coreutils 6.4.10 8.13 (general)
coreutils 6.4.10 8.23 (general)
bcc 0.16.14 0.16.17 bcc
bin86 0.16.14 0.16.17 as86, ld86
gcc 3.3.5 4.9.1 gcc
gcc 3.3.5 5.2.1 gcc
sharutils 4.6.3 4.14 uuencode, uudecode
sharutils 4.6.3 4.15.2 uuencode, uudecode
perl 5.8.4 5.14.2 pod2man
perl 5.8.4 5.20.2 pod2man
......@@ -32,8 +32,8 @@ they can be found in:
at least tested programs
package version until inside
-----------------------------------------------------------------
perl 5.8.8 5.14.2 (general)
perl 5.8.8 5.20.2 (general)
perl-modules 5.8.8 5.14.2 Getopt::Std,
perl-modules 5.8.8 5.20.2 Getopt::Std,
Pod::Usage
File::Copy
Begin4
Title: LILO
Version: 24.1
Entered-date: 2014-10-17
Version: 24.2
Entered-date: 2015-11-22
Description: Generic boot loader for Linux. Distribution
includes full source, documentation and support files.
Keywords: Linux, boot loader, LILO
Author: Joachim Wiedorn
Maintained-by: Joachim Wiedorn <ad_debian@joonet.de>
Maintained-by: Joachim Wiedorn <joodevel@joonet.de>
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: 754kB lilo-24.1.tar.gz
Files: 766kB lilo-24.2.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.
......
.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28)
.\"
.\" Standard preamble:
.\" ========================================================================
......@@ -38,6 +38,8 @@
. ds PI \(*p
. ds L" ``
. ds R" ''
. ds C`
. ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
......@@ -48,21 +50,28 @@
.\" 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 \{\
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
.nr rF 0
.if \n(.g .if rF .nr rF 1
.if (\n(rF:(\n(.g==0)) \{
. if \nF \{
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. if !\nF==2 \{
. nr % 0
. rr F
.\}
.el \{\
. de IX
..
. nr F 2
. \}
. \}
.\}
.rr rF
.\" ========================================================================
.\"
.IX Title "LILO-UUID-DISKID 8"
.TH LILO-UUID-DISKID 8 "2014-10-13" "24.1" "lilo documentation"
.TH LILO-UUID-DISKID 8 "2015-11-22" "24.2" "lilo documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
......
......@@ -2,8 +2,8 @@
manpage: LILO-UUID-DISKID
section: 8
title: lilo documentation
version: 24.1
datum: 2014-10-13
version: 24.2
datum: 2015-11-22
=encoding utf8
......
.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28)
.\"
.\" Standard preamble:
.\" ========================================================================
......@@ -38,6 +38,8 @@
. ds PI \(*p
. ds L" ``
. ds R" ''
. ds C`
. ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
......@@ -48,21 +50,28 @@
.\" 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 \{\
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
.nr rF 0
.if \n(.g .if rF .nr rF 1
.if (\n(rF:(\n(.g==0)) \{
. if \nF \{
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. if !\nF==2 \{
. nr % 0
. rr F
.\}
.el \{\
. de IX
..
. nr F 2
. \}
. \}
.\}
.rr rF
.\" ========================================================================
.\"
.IX Title "LILO 8"
.TH LILO 8 "2014-10-15" "24.1" "lilo documentation"
.TH LILO 8 "2015-11-22" "24.2" "lilo documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
......@@ -113,7 +122,7 @@ 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 a logical partition depends on the characteristics
of the \s-1OS\s0. \s-1LILO\s0 boot records for Linux may be booted from a logical partition.
of the \s-1OS. LILO\s0 boot records for Linux may be booted from a logical 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
......@@ -173,7 +182,7 @@ 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.
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.
......@@ -201,7 +210,7 @@ Use another map file instead of the default file /boot/map.
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
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 logical partitions as well.
......@@ -327,7 +336,7 @@ versions is achieved using the \fI'\-x mbr\-only'\fR switch.
.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.
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
......@@ -340,7 +349,7 @@ following sequence to generate a new Volume-ID:
.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
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"
......@@ -372,7 +381,7 @@ indicated below.
.SH "BOOT OPTIONS"
.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
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
......@@ -392,13 +401,13 @@ non-IBM-compliant \s-1BIOS\s0's which hang with the lines:
\& Loading...............
\& BIOS data check
.Ve
.IP "\fBvga=[\s-1ASK\s0,EXT,EXTENDED,NORMAL,###,0x###]\fR" 4
.IP "\fBvga=[\s-1ASK,EXT,EXTENDED,NORMAL\s0,###,0x###]\fR" 4
.IX Item "vga=[ASK,EXT,EXTENDED,NORMAL,###,0x###]"
Allows overriding the default video mode upon kernel startup.
.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
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
......@@ -426,19 +435,19 @@ codes follows:
\& 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
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
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.
the letter \*(L"O\*(R", to form the full word \*(L"\s-1LILO\*(R",\s0 in uppercase.
.PP
All second stage loader error messages are English text and try to pinpoint,
more or less successfully, the point of failure.
......
......@@ -2,8 +2,8 @@
manpage: LILO
section: 8
title: lilo documentation
version: 24.1
datum: 2014-10-15
version: 24.2
datum: 2015-11-22
=encoding utf8
......
.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28)
.\"
.\" Standard preamble:
.\" ========================================================================
......@@ -38,6 +38,8 @@
. ds PI \(*p
. ds L" ``
. ds R" ''
. ds C`
. ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
......@@ -48,21 +50,28 @@
.\" 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 \{\
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
.nr rF 0
.if \n(.g .if rF .nr rF 1
.if (\n(rF:(\n(.g==0)) \{
. if \nF \{
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. if !\nF==2 \{
. nr % 0
. rr F
.\}
.el \{\
. de IX
..
. nr F 2
. \}
. \}
.\}
.rr rF
.\" ========================================================================
.\"
.IX Title "LILOCONFIG 8"
.TH LILOCONFIG 8 "2014-10-13" "24.1" "liloconfig documentation"
.TH LILOCONFIG 8 "2015-11-22" "24.2" "liloconfig documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
......@@ -108,7 +117,8 @@ Lines in the configuration file /etc/lilo.conf:
\&
\& #large\-memory
\& lba32
\& boot = /dev/sda
\& #boot = /dev/sda
\& boot = /dev/disk/by\-id/ata\-SAMSUNG_SV1604N_S01FJ10X999999
\& #root = /dev/sda1
\& root = "UUID=18843936\-00f9\-4df0\-a373\-000d05a5dd44"
\& map = /boot/map
......@@ -117,14 +127,12 @@ Lines in the configuration file /etc/lilo.conf:
\& prompt
\& timeout = 100
\& vga = normal
\& #password =
\& #default = Linux
\&
\& ### LILO per\-image section ###
\&
\& #boot = /dev/sda
\& boot = /dev/disk/by\-id/ata\-SAMSUNG_SV1604N_S01FJ10X999999
\&
\& image = /boot/vmlinuz\-3.12\-trunk\-686
\& image = /boot/vmlinuz\-3.17\-trunk\-686
\& label = "Linux"
\& #root = /dev/sda1
\& #root = "UUID=18843936\-00f9\-4df0\-a373\-000d05a5dd44"
......@@ -132,9 +140,9 @@ Lines in the configuration file /etc/lilo.conf:
\& # restricted
\& # alias = 1
\& # optional
\& initrd = /boot/initrd.img\-3.12\-trunk\-686
\& initrd = /boot/initrd.img\-3.17\-trunk\-686
\&
\& image = /boot/vmlinuz\-3.2.0\-4\-686
\& image = /boot/vmlinuz\-3.14\-trunk\-686
\& label = "Linux Old"
\& #root = /dev/sda1
\& #root = "UUID=18843936\-00f9\-4df0\-a373\-000d05a5dd44"
......@@ -142,11 +150,11 @@ Lines in the configuration file /etc/lilo.conf:
\& # restricted
\& # alias = 2
\& # optional
\& initrd = /boot/initrd.img\-3.2.0\-4\-686
\& initrd = /boot/initrd.img\-3.14\-trunk\-686
.Ve
.SH "COPYRIGHT and LICENSE"
.IX Header "COPYRIGHT and LICENSE"
Copyright (C) 2011\-2014 Joachim Wiedorn
Copyright (C) 2011\-2015 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
......@@ -154,7 +162,7 @@ the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
.SH "AUTHOR"
.IX Header "AUTHOR"
\&\fBlilconfig\fR was written by Joachim Wiedorn.
\&\fBliloconfig\fR was written by Joachim Wiedorn.
.PP
This manual page was written by Joachim Wiedorn <joodevel at joonet.de>.
.SH "SEE ALSO"
......
......@@ -2,8 +2,8 @@
manpage: LILOCONFIG
section: 8
title: liloconfig documentation
version: 24.1
datum: 2014-10-13
version: 24.2
datum: 2015-11-22
=encoding utf8
......@@ -59,7 +59,8 @@ Lines in the configuration file /etc/lilo.conf:
#large-memory
lba32
boot = /dev/sda
#boot = /dev/sda
boot = /dev/disk/by-id/ata-SAMSUNG_SV1604N_S01FJ10X999999
#root = /dev/sda1
root = "UUID=18843936-00f9-4df0-a373-000d05a5dd44"
map = /boot/map
......@@ -68,14 +69,12 @@ Lines in the configuration file /etc/lilo.conf:
prompt
timeout = 100
vga = normal
#password =
#default = Linux
### LILO per-image section ###
#boot = /dev/sda
boot = /dev/disk/by-id/ata-SAMSUNG_SV1604N_S01FJ10X999999
image = /boot/vmlinuz-3.12-trunk-686
image = /boot/vmlinuz-3.17-trunk-686
label = "Linux"
#root = /dev/sda1
#root = "UUID=18843936-00f9-4df0-a373-000d05a5dd44"
......@@ -83,9 +82,9 @@ Lines in the configuration file /etc/lilo.conf:
# restricted
# alias = 1
# optional
initrd = /boot/initrd.img-3.12-trunk-686
initrd = /boot/initrd.img-3.17-trunk-686
image = /boot/vmlinuz-3.2.0-4-686
image = /boot/vmlinuz-3.14-trunk-686
label = "Linux Old"
#root = /dev/sda1
#root = "UUID=18843936-00f9-4df0-a373-000d05a5dd44"
......@@ -93,11 +92,11 @@ Lines in the configuration file /etc/lilo.conf:
# restricted
# alias = 2
# optional
initrd = /boot/initrd.img-3.2.0-4-686
initrd = /boot/initrd.img-3.14-trunk-686
=head1 COPYRIGHT and LICENSE
Copyright (C) 2011-2014 Joachim Wiedorn
Copyright (C) 2011-2015 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
......@@ -106,7 +105,7 @@ the Free Software Foundation; either version 2 of the License, or
=head1 AUTHOR
B<lilconfig> was written by Joachim Wiedorn.
B<liloconfig> was written by Joachim Wiedorn.
This manual page was written by Joachim Wiedorn <joodevel at joonet.de>.
......
......@@ -219,8 +219,7 @@ LILO primarily accesses the following parts of the system:
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 much larger second-stage loader.
The kernel is loaded and started by the boot loader. Kernels typically
reside in the root directory or in /boot.
......@@ -713,7 +712,6 @@ There are four approaches of how such problems can be solved:
LILO depends on the BIOS to load the following items:
- /boot/boot.b
- /boot/map (created when running /sbin/lilo)
- all kernels
- the boot sectors of all other operating systems it boots
......@@ -786,11 +784,10 @@ 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 "BIOS restrictions" are
met.
Only the location of the boot sector matters - everything else (/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 "BIOS restrictions" are met.
Two disks, Linux on second disk, first disk has an extended partition
......@@ -2216,21 +2213,12 @@ Some of the files contained in lilo-21.tar.gz:
Perl script to convert the LaTeX source of the user's guide to plain
ASCII.
Files created after make in lilo/ (among others):
Files created after make in lilo source directory (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.
MS-DOS executable of the disk parameter dumper (optional).
Normal first-time installation
......@@ -2243,8 +2231,8 @@ First, you have to install the LILO files:
- run make to compile and assemble all parts.
- run make install to copy all LILO files to the directories where
they're installed. /sbin should now contain the file lilo, /usr/sbin
should contain keytab-lilo.pl, and /boot should contain boot.b,
chain.b, and os2_d.b.
should contain keytab-lilo.pl and /boot should contain some image
files (.bmp).
* E.g. /usr/src/lilo
......@@ -2380,7 +2368,7 @@ The basic procedure is quite straightforward (see also section "BIOS
restrictions"):
- a file system has to be created on the file system
- the kernel and boot.b have to be copied to the floppy disk
- the kernel has to be copied to the floppy disk
- /sbin/lilo has to be run to create the map file
This can be as easy as
......@@ -2388,17 +2376,15 @@ 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
/sbin/lilo -C - -b /dev/fd0 -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
configuration into a file), -b /dev/fd0 specifies that the boot sector
is written to the floppy disk, -c speeds up the load process and -m
/fd/map puts the map file on the floppy too.
......
......@@ -98,7 +98,7 @@ primary partitions will be described later.
MORE TERMINOLOGY
================
A boot record is "accessible", if it exists on a primary parition,
A boot record is "accessible", if it exists on a primary partition,
which may be marked "active"; or it is a Master Boot Record (MBR),
written to sector 0 of a drive.
......@@ -310,7 +310,7 @@ location is acceptable, as long as they are within the same RAID
partition which you are making bootable.
LILO variations: version 22.2 enforces the placement of the map file
on the RAID parition. Version 22.3 eliminates the need for the
on the RAID partition. Version 22.3 eliminates the need for the
boot.b and chain.b files, and relaxes the restriction that the
message file be on the RAID partition by copying it into the map
file. Likewise, any bitmap= file is copied into the map file, so it
......
# /etc/lilo.conf - systemwide LILO configuration (LILO 23)
# /etc/lilo.conf - systemwide LILO configuration (LILO 24)
# details see in manpages: lilo(8) and lilo.conf(5)
# +-------------------------------------------------------------+
......@@ -70,7 +70,8 @@ install = menu
# The first character of each part sets the text frontcolor,
# the second character of earch part sets the text backcolor,
# an upper-case character sets bold face text (frontcolor).
# i.g. 'menu-scheme=wm:rw:wm:Wm'. Possible colors:
#
# E.g. 'menu-scheme=wm:rw:wm:Wm'. Possible colors:
# k=black, b=blue, g=green, c=cyan, r=red, m=magenta, y=yellow, w=white.
menu-scheme = Wb:Yr:Wb:Wb
#menu-title = " DESDEMONA Boot-Manager "
......@@ -110,19 +111,40 @@ timeout = 100
# vga=ask stop and ask for user input: choice of text mode
# vga=<mode> use the corresponding text mode number. A list of
# available modes can be obtained by booting with
# vga=ask' and then pressing [Enter].
# 'vga=ask' and then pressing [Enter].
#
# Another way is the use of frame buffer mode. Then the kernel
# will switch from the normal vga text mode (80x25) to the frame
# buffer mode (if frame buffer support is in the kernel):
# vga=0x314 800x600 @ 16 bit
# vga=0x317 1024x768 @ 16 bit
# vga=0x318 1024x768 @ 24 bit
# buffer <mode> (if frame buffer support is in the kernel):
# 16bit: 32bit:
# 640x480 : 0x311 0x312
# 800x600 : 0x314 0x315
# 1024x768 : 0x317 0x318
# 1280x960 : 0x365 0x366
# 1280x1024: 0x31A 0x31B
# 1400x1050: 0x345 0x346
# 1600x1200: 0x333 0x334
# 1680x1050: 0x3D2 0x3D4
# 1920x1440: 0x337 0x338
#vga = ask
vga = normal
#vga = 0x317
# ---------------------------------------------------------------
# Set a password here and uncomment the 'restricted' lines in
# the image definitions below. Then a password must be typed
# to boot anything but a default configuration. If a command
# line is given, other than one specified by an 'append'
# statement in this lilo.conf, the password is required, but
# a standard default boot will not require one.
#
# If anyone have access to the console, with this password and
# the 'restricted' option you prevent booting with something
# like 'Linux init=/bin/sh' and thus becoming `root' without
# proper authorization.
#password = count4this
# Kernel command line options that apply to all installed images go
# here. See 'kernel-parameters.txt' in the Linux kernel 'Documentation'
# directory. I.g. for start into 'init 5' write: append="5"
......@@ -143,6 +165,8 @@ vga = normal
# usually with the initrd file. Configure all GNU/Linux systems
# on other partitions, too.
# Warning: labels must be less than 16 characters long.
# first example (default)
image = /boot/vmlinuz-3.12-1-generic
label = "Linux"
......
......@@ -3,7 +3,7 @@
# liloconfig - creating a new lilo.conf file
#
#
# Copyright 2011-2014 Joachim Wiedorn <joodevel at joonet.de>
# Copyright 2011-2015 Joachim Wiedorn <joodevel at joonet.de>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......@@ -31,7 +31,7 @@ use File::Copy;
#---- global variables
my $prog = $0;
$prog =~ s#.*/##;
my $version = "0.4";
my $version = "0.5";
#---- parameter check
# h: help, v: verbose, f: force
......@@ -88,35 +88,58 @@ sub main {
sub create_lilo_conf {
my $found = 0;
my $exit = 1;
# search for root device in fstab and convert it
$found = detect_root_device();
my $found1 = 0;
my $found2 = 0;
my $found3 = 0;
# read fstab and search for root device
$found1 = read_fstab();
## STEP 1 ##
if ($found1 == 0)
# nothing found, exit by error
{ $found2 = 0;}
elsif ($found1 == 1)
# identify root device: root_dev and root_id
{ $found2 = convert_root_device(); }
elsif ($found1 == 2)
# nothing found, but exit successfully
{ $exit = 0; $found2 = 0;}
## STEP 2 ##
if ($found2 == 0)
# nothing found, exit by error
{ $found3 = 0;}
elsif ($found2 == 1)
# convert root device to boot device
if ($found) { $found = convert_boot_device(); }
# finally write new lilo.conf file
if ($found) {
{ $found3 = convert_boot_device(); }
elsif ($found2 == 2)
# nothing found, but exit successfully
{ $exit = 0; $found2 = 3;}
## STEP 3 ##
if ($found3 == 0)
# nothing found, exit by error
{ $exit = 1;}
elsif ($found3 == 1) {
if ((-f $liloconf) and not (-w $liloconf)) {
print "E: Have no write permissions to $liloconf !\n";
$exit = 1;
}
else {
# finally write new/updated lilo.conf file
if ($opt_u) { $exit = update_lilo_conf(); }
else { $exit = write_lilo_conf(); }
}
}
elsif ($found3 == 2)
# nothing found, but exit successfully
{ $exit = 0;}
return $exit;
}
sub detect_root_device {
# read fstab and find root device;
my $found = read_fstab();
# identify root device: root_dev and root_id
if ($found) { $found = convert_root_device(); }
return $found;
}
sub read_fstab {
my $root_part;
......@@ -152,7 +175,7 @@ sub read_fstab {
print "E: It seems you want configure the base filesystem \n" .
"and I'm therefore simply going to exit successfully \n" .
"without trying to actually configure LILO properly. \n";
$found = 0;
$found = 2;
}
if ($broken_fstab) {