-Changes for version 24.0 (unreleased) - Joachim Wiedorn
+Changes for version 24.1 (17-October-2014) - Joachim Wiedorn
+
+ Documentations
+ --------------
+ - Add more information about -R option (one-time command-line).
+
+ Sources
+ -------
+ - Only warn if founded bad partition (src/partition.c).
+ - Install the .dat files of images, too (images/Makefile).
+ - Fix target 'all' in main Makefile.
+ - Install lilo.static, too, if existing.
+ - Add CFLAGS, CPPFLAGS, LDFLAGS everywhere needed
+ (useful e.g. for hardening in Debian).
+ - Add many major device numbers, especially for MMC cards and XVD
+ disks. Remove obsolete numbers (src/lilo.h, src/geometry.c).
+
+ General
+ -------
+ - Use 'lilo -H' in hook scripts to ignore error on degraded mdadm
+ RAID1 systems (thanks to M. Schnalke).
+ - Small update of script lilo-uuid-diskid.
+ - Large upgrade of script liloconfig:
+ * solve some bugs (see: Debian, Ubuntu)
+ * now with update function
+ * now with more tolerant file names of initram
+ * now with use of kernel links as fallback
+ - Update example config in lilo.example.conf.
+ - Update manpage of liloconfig and lilo-uuid-diskid.
+ - Add hooks for chattr, if vmlinuz files are on xfs filesystems.
+
+
+Changes for version 24.0 (07-June-2013) - Joachim Wiedorn
Documentations
--------------
-------
- 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.
+ - Update src/Makefile to always stripping lilo and lilo.static.
General
-------
# -*- makefile -*-
#
-# Copyright 2009-2013 Joachim Wiedorn
+# Copyright 2009-2014 Joachim Wiedorn
# All rights reserved.
#
# Licensed under the terms contained in the file 'COPYING'
# in the source directory.
#
+#
+# everything needed to run, just short of installation
+#
+all: test
+ make -C src all
+ make -C images all
+
#
# make help
#
@echo " make distclean # remove editor temps, & all of the above"
@echo ""
-#
-# everything needed to run, just short of installation
-#
-all: test
- $(MAKE) -C src all
- $(MAKE) -C images all
-
#
# everything above plus the statically linked version
#
(For details see file 'CHANGELOG' in the source directory)
+Version 24.1 (minor and bugfix update of 24.0)
+
+ o Install .dat files of images, too.
+ o Install lilo.static, if existing.
+ o Add CFLAGS, CPPFLAGS, LDFLAGS everywhere needed.
+ o Better support for degraded mdadm RAID1.
+ o Large upgrade of script liloconfig with bugfixes and
+ update function, with fallback to kernel links.
+ o Update example config file.
+ o Update manpage of liloconfig and lilo-uuid-diskid.
+ o Add major device numbers for MMC cards and XVD disks.
+
+
Version 24.0 (major and bugfix update of 23.2)
o Update many manpages and add some from Debian.
bin86 0.16.14 0.16.17 as86, ld86
-gcc 3.3.5 4.8.0 gcc
+gcc 3.3.5 4.9.1 gcc
-sharutils 4.6.3 4.11.1 uuencode, uudecode
+sharutils 4.6.3 4.14 uuencode, uudecode
perl 5.8.4 5.14.2 pod2man
To run LaTeX just type
- make
+ make -f Makefile.old
LaTeX issues many "Overfull \hbox" warnings. They can be safely ignored.
LaTeX will be run repeatedly until it stops issuing the message
</dd><dt class="description">
<span
class="cmtt-10x-x-109">LARGE</span><span
-class="cmtt-10x-x-109">_EDBA</span> </dt><dd
+class="cmtt-10x-x-109">_EBDA</span> </dt><dd
class="description">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 <span
class="cmtt-10x-x-109">LARGE</span><span
-class="cmtt-10x-x-109">_EDBA</span>
+class="cmtt-10x-x-109">_EBDA</span>
reduces the maximum size of “small” images (e.g. “Image” or “zImage”).
</dd><dt class="description">
<span
class="newline" />The kernel image (without the setup code) is bigger than 512 kbytes (or 448 kbytes, if built with
<span
class="cmtt-10x-x-109">LARGE</span><span
-class="cmtt-10x-x-109">_EDBA</span>). LILO would overwrite itself when trying to load such a kernel. This limitation
+class="cmtt-10x-x-109">_EBDA</span>). 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
# -*- makefile -*-
+#
+# Copyright 2009-2014 Joachim Wiedorn
+# All rights reserved.
+#
+# Licensed under the terms contained in the file 'COPYING'
+# in the source directory.
+#
# Makefile for BCC compilation of 'lilo.com'
#
# Known to work with BCC version 0.16.15
# -*- makefile -*-
+#
+# Copyright 2011-2014 Joachim Wiedorn
+# All rights reserved.
+#
+# Licensed under the terms contained in the file 'COPYING'
+# in the source directory.
+#
# adding variables
include ../make.vars
-POSTUP = initramfs/post-update.d
-POSTINST = kernel/postinst.d
-POSTRM = kernel/postrm.d
+# install also chattr-lilo hooks
+CHATTR := n
+
+POSTUPD := initramfs/post-update.d
+POSTINST := kernel/postinst.d
+POSTRM := kernel/postrm.d
+PREINST := kernel/preinst.d
+PRERM := kernel/prerm.d
all:
install:
- mkdir -p $$DESTDIR$(CFG_DIR)/$(POSTUP)
+ mkdir -p $$DESTDIR$(CFG_DIR)/$(POSTUPD)
mkdir -p $$DESTDIR$(CFG_DIR)/$(POSTINST)
mkdir -p $$DESTDIR$(CFG_DIR)/$(POSTRM)
- install -m 0755 $(POSTUP)/runlilo $$DESTDIR$(CFG_DIR)/$(POSTUP)
+ install -m 0755 $(POSTUPD)/runlilo $$DESTDIR$(CFG_DIR)/$(POSTUPD)
install -m 0755 $(POSTINST)/zz-runlilo $$DESTDIR$(CFG_DIR)/$(POSTINST)
install -m 0755 $(POSTRM)/zz-runlilo $$DESTDIR$(CFG_DIR)/$(POSTRM)
+ ifeq "$(CHATTR)" "y"
+ mkdir -p $$DESTDIR$(CFG_DIR)/$(PREINST)
+ mkdir -p $$DESTDIR$(CFG_DIR)/$(PRERM)
+ install -m 0755 $(POSTINST)/chattr-lilo $$DESTDIR$(CFG_DIR)/$(POSTINST)
+ install -m 0755 $(PREINST)/chattr-lilo $$DESTDIR$(CFG_DIR)/$(PREINST)
+ install -m 0755 $(PRERM)/chattr-lilo $$DESTDIR$(CFG_DIR)/$(PRERM)
+ endif
clean:
distclean:
uninstall:
- rm -f $$DESTDIR$(CFG_DIR)/$(POSTUP)/runlilo
+ rm -f $$DESTDIR$(CFG_DIR)/$(POSTUPD)/runlilo
rm -f $$DESTDIR$(CFG_DIR)/$(POSTINST)/zz-runlilo
rm -f $$DESTDIR$(CFG_DIR)/$(POSTRM)/zz-runlilo
+ ifeq "$(CHATTR)" "y"
+ rm -f $$DESTDIR$(CFG_DIR)/$(POSTINST)/chattr-lilo
+ rm -f $$DESTDIR$(CFG_DIR)/$(PREINST)/chattr-lilo
+ rm -f $$DESTDIR$(CFG_DIR)/$(PRERM)/chattr-lilo
+ endif
#
# runlilo - postupdate script for modern initrd management
#
-# Copyright 2010 Joachim Wiedorn
+# Copyright 2010-2014 Joachim Wiedorn
# All rights reserved.
#
# Licensed under the terms contained in the file 'COPYING'
*)
# Run the boot loader installer
+ # and ignore error on degraded mdadm RAID1
if [ -f /sbin/lilo ];then
if [ -f /etc/lilo.conf ];then
- lilo </dev/null >&2
+ lilo -H </dev/null >&2
else
echo "Warning: Not updating LILO; /etc/lilo.conf not found!" >&2
fi
--- /dev/null
+#!/bin/sh
+#
+# chattr-lilo - postinst script for sure kernel install/upgrade
+#
+# Copyright (C) 2012-2014 Joachim Wiedorn
+# All rights reserved.
+#
+# Licensed under the terms contained in the file 'COPYING'
+# in the source directory.
+#
+
+set -e
+
+CHATTR=`which chattr` || exit 0
+XFSINFO=`which xfs_info` || exit 0
+
+if test -x $XFSINFO; then
+ # check whether root partition is of xfs type
+ [ `LANG=C $XFSINFO / | grep -c "attr="` -eq 1 ] || exit 0
+fi
+
+# second argument gives the path and filename
+# first argument gives only the kernel version
+if [ -n "${2}" ]; then
+ IMAGE="${2}"
+elif [ -n "${1}" ]; then
+ IMAGE="/boot/vmlinuz-${1}"
+else
+ echo "[postinst.d] do not execute chattr"
+ exit 0
+fi
+
+if [ -f "$IMAGE" ]; then
+ echo "[postinst.d] chattr +i ${IMAGE}" >&2
+ $CHATTR +i "${IMAGE}"
+fi
+
+# end of file
#
# zz-runlilo - postinst script for modern kernel management
#
-# Copyright 2010 Joachim Wiedorn
+# Copyright 2010-2014 Joachim Wiedorn
# All rights reserved.
#
# Licensed under the terms contained in the file 'COPYING'
ever|configure)
# Run the boot loader installer
+ # and ignore error on degraded mdadm RAID1
if [ -f /sbin/lilo ]; then
if [ -f /etc/lilo.conf ]; then
- lilo </dev/null >&2
+ lilo -H </dev/null >&2
else
echo "Warning: Not updating LILO; /etc/lilo.conf not found!" >&2
fi
#
# zz-runlilo - postrm script for modern kernel management
#
-# Copyright 2010 Joachim Wiedorn
+# Copyright 2010-2014 Joachim Wiedorn
# All rights reserved.
#
# Licensed under the terms contained in the file 'COPYING'
ever|remove)
# Run the boot loader installer
+ # and ignore error on degraded mdadm RAID1
if [ -f /sbin/lilo ]; then
if [ -f /etc/lilo.conf ]; then
# Do not abort kernel removal in case of error
- lilo </dev/null >&2 || true
+ lilo -H </dev/null >&2 || true
fi
fi
;;
--- /dev/null
+#!/bin/sh
+#
+# chattr-lilo - preinst script for sure kernel install/upgrade
+#
+# Copyright (C) 2012-2014 Joachim Wiedorn
+# All rights reserved.
+#
+# Licensed under the terms contained in the file 'COPYING'
+# in the source directory.
+#
+
+set -e
+
+CHATTR=`which chattr` || exit 0
+XFSINFO=`which xfs_info` || exit 0
+
+if test -x $XFSINFO; then
+ # check whether root partition is of xfs type
+ [ `LANG=C $XFSINFO / | grep -c "attr="` -eq 1 ] || exit 0
+fi
+
+# second argument gives the path and filename
+# first argument gives only the kernel version
+if [ -n "${2}" ]; then
+ IMAGE="${2}"
+elif [ -n "${1}" ]; then
+ IMAGE="/boot/vmlinuz-${1}"
+else
+ echo "[preinst.d] do not execute chattr"
+ exit 0
+fi
+
+if [ -f "$IMAGE" ]; then
+ echo "[preinst.d] chattr -i ${IMAGE}" >&2
+ $CHATTR -i "${IMAGE}"
+fi
+
+# end of file
--- /dev/null
+#!/bin/sh
+#
+# chattr-lilo - prerm script for sure kernel upgrade/remove
+#
+# Copyright (C) 2012-2014 Joachim Wiedorn
+# All rights reserved.
+#
+# Licensed under the terms contained in the file 'COPYING'
+# in the source directory.
+#
+
+set -e
+
+CHATTR=`which chattr` || exit 0
+XFSINFO=`which xfs_info` || exit 0
+
+if test -x $XFSINFO; then
+ # check whether root partition is of xfs type
+ [ `LANG=C $XFSINFO / | grep -c "attr="` -eq 1 ] || exit 0
+fi
+
+# second argument gives the path and filename
+# first argument gives only the kernel version
+if [ -n "${2}" ]; then
+ IMAGE="${2}"
+elif [ -n "${1}" ]; then
+ IMAGE="/boot/vmlinuz-${1}"
+else
+ echo "[prerm.d] do not execute chattr"
+ exit 0
+fi
+
+if [ -f "$IMAGE" ]; then
+ echo "[prerm.d] chattr -i ${IMAGE}" >&2
+ $CHATTR -i "${IMAGE}"
+fi
+
+# end of file
# -*- makefile -*-
+#
+# Copyright 2009-2014 Joachim Wiedorn
+# All rights reserved.
+#
+# Licensed under the terms contained in the file 'COPYING'
+# in the source directory.
+#
# adding variables
include ../make.vars
BINLILO := ../src/lilo
BMPS8 := coffee.bmp
BMPS4 := debian.bmp debian-de.bmp debianlilo.bmp inside.bmp onlyblue.bmp tuxlogo.bmp
+NAME8 := coffee
+NAME4 := debian debian-de debianlilo inside onlyblue tuxlogo
all: $(BMPS4) $(BMPS8)
install: all
mkdir -p $$DESTDIR$(BOOT_DIR)
install -m 0644 $(BMPS4) $(BMPS8) $$DESTDIR$(BOOT_DIR)
+ for i in $(NAME8); do \
+ cp $${i}_256c.dat $$DESTDIR$(BOOT_DIR)/$${i}.dat; \
+ done
+ for i in $(NAME4); do \
+ cp $${i}_16c.dat $$DESTDIR$(BOOT_DIR)/$${i}.dat; \
+ done
clean:
rm -f $(BMPS4) $(BMPS8)
uninstall:
(cd $$DESTDIR$(BOOT_DIR); rm -f $(BMPS4) $(BMPS8))
+ for i in $(NAME4) $(NAME8); do \
+ rm -f $$DESTDIR$(BOOT_DIR)/$${i}.dat; \
+ done
Begin4
Title: LILO
-Version: 24.0
-Entered-date: 2013-06-07
+Version: 24.1
+Entered-date: 2014-10-17
Description: Generic boot loader for Linux. Distribution
includes full source, documentation and support files.
Keywords: Linux, boot loader, LILO
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: 751kB lilo-24.0.tar.gz
+Files: 754kB lilo-24.1.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.
-#!/usr/bin/make -f
# -*- makefile -*-
+#
+# Copyright 2009-2014 Joachim Wiedorn
+# All rights reserved.
+#
+# Licensed under the terms contained in the file 'COPYING'
+# in the source directory.
+#
# adding variables
include ../make.vars
-.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07)
+.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
.\"
.\" Standard preamble:
.\" ========================================================================
.\" ========================================================================
.\"
.IX Title "LILO-UUID-DISKID 8"
-.TH LILO-UUID-DISKID 8 "2013-05-01" "23.3" "lilo documentation"
+.TH LILO-UUID-DISKID 8 "2014-10-13" "24.1" "lilo documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
\& boot = /dev/disk/by\-id/ata\-SAMSUNG_SV1604N_S01FJ10X999999
\&
\& #root = /dev/sda1
-\& root = "UUID=/dev/disk/by\-uuid/18843936\-00f9\-4df0\-a373\-000d05a5dd44"
+\& root = "UUID=18843936\-00f9\-4df0\-a373\-000d05a5dd44"
.Ve
.SH "COPYRIGHT and LICENSE"
.IX Header "COPYRIGHT and LICENSE"
-Copyright (C) 2010\-2013 Joachim Wiedorn
+Copyright (C) 2010\-2014 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
.IX Header "AUTHOR"
\&\fBlilo-uuid-diskid\fR was written by Joachim Wiedorn.
.PP
-This manual page was written by Joachim Wiedorn <ad_debian at joonet.de>.
+This manual page was written by Joachim Wiedorn <joodevel at joonet.de>.
.SH "SEE ALSO"
.IX Header "SEE ALSO"
\&\fBlilo\fR(8), \fBupdate-lilo\fR(8), \fBliloconfig\fR(8)
manpage: LILO-UUID-DISKID
section: 8
title: lilo documentation
-version: 23.3
-datum: 2013-05-01
+version: 24.1
+datum: 2014-10-13
=encoding utf8
boot = /dev/disk/by-id/ata-SAMSUNG_SV1604N_S01FJ10X999999
#root = /dev/sda1
- root = "UUID=/dev/disk/by-uuid/18843936-00f9-4df0-a373-000d05a5dd44"
+ root = "UUID=18843936-00f9-4df0-a373-000d05a5dd44"
=head1 COPYRIGHT and LICENSE
-Copyright (C) 2010-2013 Joachim Wiedorn
+Copyright (C) 2010-2014 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
B<lilo-uuid-diskid> was written by Joachim Wiedorn.
-This manual page was written by Joachim Wiedorn <ad_debian at joonet.de>.
+This manual page was written by Joachim Wiedorn <joodevel at joonet.de>.
=head1 SEE ALSO
-.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07)
+.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
.\"
.\" Standard preamble:
.\" ========================================================================
.\" ========================================================================
.\"
.IX Title "LILO 8"
-.TH LILO 8 "2013-05-01" "23.3" "lilo documentation"
+.TH LILO 8 "2014-10-15" "24.1" "lilo documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.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
+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
+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.
+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.
.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
+device. \fI\*(L"\-b /dev/sdb5\*(R"\fR set the first logical partition on the second disk
as boot device.
.IP "\fB\-B\fR \fIbitmap-file\fR" 4
.IX Item "-B bitmap-file"
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 search for an active partition will include logical 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
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.
+.Sp
+This Command line starts with image identifier (as shown during map file update),
+then space, then kernel parameters. The kernel parameters are appended to kernel
+command line constructed routinely. In either case, it there were parameters
+or not, such one-time command will be treated by loaders code, as if it is set
+at 'boot:' prompt. This could lead to 'password:' prompt at boot time. Be warned!
+Refer to \fI\fIlilo.conf\fI\|(5)\fR for details.
.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
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
+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
+\& lilo \-z \-M /dev/sda
+\& lilo \-M /dev/sda
.Ve
.IP "\fB\-Z\fR \fIoption\fR" 4
.IX Item "-Z option"
.Vb 3
\& Copyright (C) 1992\-1998 Werner Almesberger
\& Copyright (C) 1999\-2007 John Coffman
-\& Copyright (C) 2009\-2013 Joachim Wiedorn
+\& Copyright (C) 2009\-2014 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
+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"
.Ve
.PP
This manual page was written by Werner Almesberger and Joachim Wiedorn
-<ad_debian at joonet.de>.
+<joodevel at joonet.de>.
.SH "SEE ALSO"
.IX Header "SEE ALSO"
\&\fBlilo.conf\fR(5),
-\&\fBliloconfig\fR(8),
+\&\fBliloconfig\fR(8),
\&\fBlilo-uuid-diskid\fR(8),
-\&\fBmkrescue\fR(8),
+\&\fBmkrescue\fR(8),
\&\fBfdisk\fR(8),
\&\fBmkinitrd\fR(8)
.\" this software without specific prior written permission. This work
.\" is provided "as is" and without any express or implied warranties.
.\"
-.TH LILO.CONF 5 "June 2011"
+.TH LILO.CONF 5 "June 2013"
.SH NAME
lilo.conf \- configuration file for lilo
.SH DESCRIPTION
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.pdf from the lilo documentation.)
+see html/user_21-5.html inside the old documentation.)
.LP
When booting, the boot loader will issue its
.I "boot:"
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.pdf (just slightly abbreviated).
+There are many possible keywords. The description below is almost
+literally from html/user_21-5.html inside the old documentation
+(just slightly abbreviated).
.TP
.BI "backup=" <backup-file>
Specifies the location where a copy of any modified boot sector will be
are used in a
.I change
section (see below), with the suffixes "_normal" or "_hidden" appended.
-See section "Partition type change rules" of user.pdf for more details.
+See section "Partition type change rules" of html/user_21-5.html inside
+the old documentation for more details.
.TP
.BI "compact"
Tries to merge read requests for adjacent sectors into a single
This action is modified by specifying `prompt' (see below).
.TP
.BI "disk=" <device-name>
-Defines non-standard parameters for the specified disk.
-See section "Disk geometry" of user.pdf for details.
+Defines non-standard parameters for the specified disk. See section
+"Disk geometry" of html/user_21-5.html inside the old documentation 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.
manpage: LILO
section: 8
title: lilo documentation
-version: 23.3
-datum: 2013-05-01
+version: 24.1
+datum: 2014-10-15
=encoding utf8
=item B<-A> I<master-device [N]>
Used with a single argument, inquire of active partition on device I<master-device>;
-e.g. I</dev/sda>. With N==0: deactivate all partitions on the device. With N in
+e.g. I</dev/sda>. 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
+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.
+in the partition will boot from a logical partition depends on the characteristics
+of the OS. LILO boot records for Linux may be booted from a logical partition.
=item B<-b> I<bootdev>
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
+device. I<"-b /dev/sdb5"> set the first logical partition on the second disk
as boot device.
=item B<-B> I<bitmap-file>
present, then generate one and write it to the MBR. If I<mbr> 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 I<ext> is set,
-the search for an active partition will include extended partitions as well.
+the search for an active partition will include logical 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 I<-A> option.
'shutdown -r'. Used without any arguments, it will cancel a I<lock>-ed or
I<fallback> command line.
+This Command line starts with image identifier (as shown during map file update),
+then space, then kernel parameters. The kernel parameters are appended to kernel
+command line constructed routinely. In either case, it there were parameters
+or not, such one-time command will be treated by loaders code, as if it is set
+at 'boot:' prompt. This could lead to 'password:' prompt at boot time. Be warned!
+Refer to I<lilo.conf(5)> for details.
+
=item B<-s> I<save-file>
When lilo writes a new boot sector, it preserves the former contents of the boot
=item B<-z>
-When used with the '-M' switch, clears the Volume-ID. Usually used in the
+When used with the '-M' switch, clears the Volume-ID. Usually used in the
following sequence to generate a new Volume-ID:
- lilo -z -M /dev/hda
- lilo -M /dev/hda
+ lilo -z -M /dev/sda
+ lilo -M /dev/sda
=item B<-Z> I<option>
Copyright (C) 1992-1998 Werner Almesberger
Copyright (C) 1999-2007 John Coffman
- Copyright (C) 2009-2013 Joachim Wiedorn
+ Copyright (C) 2009-2014 Joachim Wiedorn
-Redistribution and use in source and binary forms, with or without
-modification, are permitted under the terms of the BSD license found in
+Redistribution and use in source and binary forms, with or without
+modification, are permitted under the terms of the BSD license found in
the COPYING file.
=head1 AUTHOR
Joachim Wiedorn (since version 23.0).
This manual page was written by Werner Almesberger and Joachim Wiedorn
-<ad_debian at joonet.de>.
+<joodevel at joonet.de>.
=head1 SEE ALSO
B<lilo.conf>(5),
-B<liloconfig>(8),
+B<liloconfig>(8),
B<lilo-uuid-diskid>(8),
-B<mkrescue>(8),
+B<mkrescue>(8),
B<fdisk>(8),
B<mkinitrd>(8)
-.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07)
+.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
.\"
.\" Standard preamble:
.\" ========================================================================
.\" ========================================================================
.\"
.IX Title "LILOCONFIG 8"
-.TH LILOCONFIG 8 "2013-05-01" "23.3" "liloconfig documentation"
+.TH LILOCONFIG 8 "2014-10-13" "24.1" "liloconfig documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
liloconfig \- create new lilo.conf file (with diskid and uuid)
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
-\&\fBliloconfig\fR [\fB\-h\fR] [\fB\-v\fR] [\fB\-f\fR] [\fBlilo.conf\fR]
+\&\fBliloconfig\fR [\fB\-h\fR] [\fB\-v\fR] [\fB\-f\fR] [\fB\-u\fR] [\fBlilo.conf\fR]
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
liloconfig is an simple program for creating a new lilo.conf file.
.PP
liloconfig use the lilo.example.conf file as template. In the final
lilo.conf file you find many useful comments for custom changes.
+.PP
+Please pay attention about error messages if liloconfig cannot find
+any images (/boot/vmlinuz*) oder image symlinks (/vmlinuz, /vmlinu.old).
+Then you need to search for images by ourself and make some changes
+in the '/etc/lilo.conf' file. Otherwise no bootloader can be installed
+with '/sbin/lilo'.
.SH "OPTIONS"
.IX Header "OPTIONS"
.IP "\fB\-h\fR" 4
.IP "\fB\-f\fR" 4
.IX Item "-f"
Force overriding existing lilo.conf.
+.IP "\fB\-u\fR" 4
+.IX Item "-u"
+Force overriding/update of boot line in lilo.conf.
.SH "EXAMPLES"
.IX Header "EXAMPLES"
Lines in the configuration file /etc/lilo.conf:
\& #large\-memory
\& lba32
\& boot = /dev/sda
+\& #root = /dev/sda1
+\& root = "UUID=18843936\-00f9\-4df0\-a373\-000d05a5dd44"
\& map = /boot/map
\& install = menu
\& menu\-scheme = Wb:Yr:Wb:Wb
\& #boot = /dev/sda
\& boot = /dev/disk/by\-id/ata\-SAMSUNG_SV1604N_S01FJ10X999999
\&
-\& image = /boot/vmlinuz\-3.5.0\-trunk\-686
+\& image = /boot/vmlinuz\-3.12\-trunk\-686
\& label = "Linux"
\& #root = /dev/sda1
-\& root = "UUID=18843936\-00f9\-4df0\-a373\-000d05a5dd44"
+\& #root = "UUID=18843936\-00f9\-4df0\-a373\-000d05a5dd44"
\& read\-only
\& # restricted
\& # alias = 1
\& # optional
-\& initrd = /boot/initrd.img\-3.5.0\-trunk\-686
+\& initrd = /boot/initrd.img\-3.12\-trunk\-686
\&
\& image = /boot/vmlinuz\-3.2.0\-4\-686
\& label = "Linux Old"
\& #root = /dev/sda1
-\& root = "UUID=18843936\-00f9\-4df0\-a373\-000d05a5dd44"
+\& #root = "UUID=18843936\-00f9\-4df0\-a373\-000d05a5dd44"
\& read\-only
\& # restricted
\& # alias = 2
.Ve
.SH "COPYRIGHT and LICENSE"
.IX Header "COPYRIGHT and LICENSE"
-Copyright (C) 2011\-2013 Joachim Wiedorn
+Copyright (C) 2011\-2014 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
.IX Header "AUTHOR"
\&\fBlilconfig\fR was written by Joachim Wiedorn.
.PP
-This manual page was written by Joachim Wiedorn <ad_debian at joonet.de>.
+This manual page was written by Joachim Wiedorn <joodevel at joonet.de>.
.SH "SEE ALSO"
.IX Header "SEE ALSO"
\&\fBlilo\fR(8), \fBupdate-lilo\fR(8), \fBlilo-uuid-diskid\fR(8)
manpage: LILOCONFIG
section: 8
title: liloconfig documentation
-version: 23.3
-datum: 2013-05-01
+version: 24.1
+datum: 2014-10-13
=encoding utf8
=head1 SYNOPSIS
-B<liloconfig> [B<-h>] [B<-v>] [B<-f>] [B<lilo.conf>]
+B<liloconfig> [B<-h>] [B<-v>] [B<-f>] [B<-u>] [B<lilo.conf>]
=head1 DESCRIPTION
liloconfig use the lilo.example.conf file as template. In the final
lilo.conf file you find many useful comments for custom changes.
+Please pay attention about error messages if liloconfig cannot find
+any images (/boot/vmlinuz*) oder image symlinks (/vmlinuz, /vmlinu.old).
+Then you need to search for images by ourself and make some changes
+in the '/etc/lilo.conf' file. Otherwise no bootloader can be installed
+with '/sbin/lilo'.
+
=head1 OPTIONS
=over 4
Force overriding existing lilo.conf.
+=item B<-u>
+
+Force overriding/update of boot line in lilo.conf.
+
=back
=head1 EXAMPLES
#large-memory
lba32
boot = /dev/sda
+ #root = /dev/sda1
+ root = "UUID=18843936-00f9-4df0-a373-000d05a5dd44"
map = /boot/map
install = menu
menu-scheme = Wb:Yr:Wb:Wb
#boot = /dev/sda
boot = /dev/disk/by-id/ata-SAMSUNG_SV1604N_S01FJ10X999999
- image = /boot/vmlinuz-3.5.0-trunk-686
+ image = /boot/vmlinuz-3.12-trunk-686
label = "Linux"
#root = /dev/sda1
- root = "UUID=18843936-00f9-4df0-a373-000d05a5dd44"
+ #root = "UUID=18843936-00f9-4df0-a373-000d05a5dd44"
read-only
# restricted
# alias = 1
# optional
- initrd = /boot/initrd.img-3.5.0-trunk-686
+ initrd = /boot/initrd.img-3.12-trunk-686
image = /boot/vmlinuz-3.2.0-4-686
label = "Linux Old"
#root = /dev/sda1
- root = "UUID=18843936-00f9-4df0-a373-000d05a5dd44"
+ #root = "UUID=18843936-00f9-4df0-a373-000d05a5dd44"
read-only
# restricted
# alias = 2
=head1 COPYRIGHT and LICENSE
-Copyright (C) 2011-2013 Joachim Wiedorn
+Copyright (C) 2011-2014 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
B<lilconfig> was written by Joachim Wiedorn.
-This manual page was written by Joachim Wiedorn <ad_debian at joonet.de>.
+This manual page was written by Joachim Wiedorn <joodevel at joonet.de>.
=head1 SEE ALSO
-#!/bin/bash
+#!/bin/sh
#
# pod2manpage - convert pod file into manual page
#
-# Copyright 2009-2013 Joachim Wiedorn <ad_debian at joonet.de>
+# Copyright 2009-2014 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
# -*- makefile -*-
+#
+# Copyright 2009-2014 Joachim Wiedorn
+# All rights reserved.
+#
+# Licensed under the terms contained in the file 'COPYING'
+# in the source directory.
+#
# adding variables
include ../make.vars
# partitions above 1024 cylinders.
lba32
-# Specifies the boot device. This is where Lilo installs its boot
+# Defines the boot device. This is where Lilo installs its boot
# block. It can be either a partition, or the raw device, in which
# case it installs in the MBR, and will overwrite the current MBR.
# With newer kernel you should use the ID of the boot device, which
# can be found here: /dev/disks/by-id/ata*.
boot = /dev/sda
+# Defines the partition which is the root partition. This partition
+# will be mounted at first from the kernel. With newer kernel you
+# should use the UUID (UUID="...") of the root device, which can be
+# found here: /dev/disks/by-uuid/*.
+root = /dev/sda1
+
# This option may be needed for some software RAID installs.
#raid-extra-boot = mbr-only
# on other partitions, too.
# first example (default)
-image = /boot/vmlinuz-2.6.32-2-generic
+image = /boot/vmlinuz-3.12-1-generic
label = "Linux"
- root = /dev/sda2
+# root = /dev/sda2
read-only
# restricted
# alias = 1
# optional
- initrd = /boot/initrd.img-2.6.32-2-generic
+ initrd = /boot/initrd.img-3.12-1-generic
# second example
image = /boot/vmlinuz-2.6.32-1-generic
- label = "LinuxOLD"
- root = /dev/sdb1
+ label = "Linux OLD"
+# root = /dev/sdb1
read-only
# restricted
# alias = 2
# third example
image = /mnt/testsystem/boot/vmlinuz-2.6.26-1-custom
label = "Testsystem"
- root = /dev/sda3
+# root = /dev/sda3
read-only
# restricted
# alias = 3
# system.
other = /dev/sda1
- label = "Windows XP"
+ label = "MS-Windows"
# restricted
# alias = 4
# alias = 5
other = /dev/sdb3
- label = "Windows 2003"
+ label = "FreeBSD"
# restricted
# alias = 6
boot-as = 0x80
# -*- makefile -*-
+#
+# Copyright 2009-2014 Joachim Wiedorn
+# All rights reserved.
+#
+# Licensed under the terms contained in the file 'COPYING'
+# in the source directory.
+#
# adding variables
include ../make.vars
# lilo-uuid-diskid - convert boot and root options to diskid
# and uuid in /etc/lilo.conf
#
-# Copyright 2010-2011 Joachim Wiedorn <ad_debian at joonet.de>
+# Copyright 2010-2014 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
#---- global variables
my $prog = $0;
$prog =~ s#.*/##;
-my $version = "0.3";
+my $version = "0.4";
#---- parameter check
our $opt_h = 0;
#---- other variables
our $liloconf = "/etc/lilo.conf";
-our $liloconfold = '';
+our $liloconfold = $liloconf . ".old";
+our $liloconfnew = $liloconf . ".new";
our $fstabconf = "/etc/fstab";
our $idpath = "/dev/disk/by-id";
our $uuidpath = "/dev/disk/by-uuid";
}
if (-f $liloconf) {
- $liloconfold = $liloconf . "_old";
+ $liloconfold = $liloconf . ".old";
+ $liloconfnew = $liloconf . ".new";
$exit = convert_lilo_conf();
}
else {
- print "cannot open $liloconf: file not found!\n";
+ print "E: cannot open $liloconf: file not found!\n";
$exit = 1;
}
return $exit;
# at first read lilo.conf and search for 'boot'
my $ok = 0;
- open(MYFH, "<$liloconf") or die ("cannot open $liloconf: $!");
+ open(MYFH, "<$liloconf") or die ("E: cannot open $liloconf: $!");
@sellines = grep(/^#?boot/, readline(MYFH));
close(MYFH);
write_boot_option();
}
else {
- if($opt_v) { print "cannot open $boot_id: link does not exist!\n"; }
+ if($opt_v) { print "E: cannot open $boot_id: link does not exist!\n"; }
$exit = 1;
}
}
}
}
else {
- print "cannot use $liloconf: uncomplete configuration!\n";
+ print "E: cannot use $liloconf: uncomplete configuration!\n";
$exit = 1;
}
# found only ^#boot in lilo.conf, then /etc/fstab is needed
if (-f $fstabconf) {
if($opt_v) {
- print "no boot option in $liloconf: selecting from $fstabconf\n";
+ print "W: no boot option in $liloconf: selecting from $fstabconf\n";
}
$boot_disk = read_fstab($fstabconf);
}
else {
- print "no boot option in $liloconf and no file $fstabconf found!\n";
+ print "E: no boot option in $liloconf and no file $fstabconf found!\n";
$exit = 1;
}
}
if($boot_disk =~ /$idpath/
or $boot_disk =~ /$uuidpath/
or $boot_disk =~ /$labpath/) {
- print "boot option is already updated to $boot_disk\n";
+ print "Boot option is already updated to $boot_disk\n";
$bootready = 1; $exit = 1;
}
else {
- if($opt_v) { print "convert boot option $boot_disk into new ID\n"; }
+ if($opt_v) { print "Convert boot option $boot_disk into new ID\n"; }
# is it a block device name ?
$_part = $boot_disk;
}
}
else {
- if($opt_v) { print "cannot read $boot_disk: link does not exist!\n"; }
+ if($opt_v) { print "E: cannot read $boot_disk: link does not exist!\n"; }
$exit = 1;
}
return $exit;
# check if root device exist / also for raid volume
if (-b $root_disk) {
- if($opt_v) { print "convert root option $root_disk into new UUID\n"; }
+ if($opt_v) { print "Convert root option $root_disk into new UUID\n"; }
$root_id = find_id_link($root_disk,$uuidpath);
if (not -l "$uuidpath/$root_id") { $exit = 1; }
}
$root_link =~ s{^LABEL=}{/dev/disk/by-label/};
$root_link =~ s{^UUID=}{/dev/disk/by-uuid/};
if (not -l $root_link) {
- if($opt_v) { print "cannot check $root_link: link does not exist!\n"; }
+ if($opt_v) { print "W: cannot check $root_link: link does not exist!\n"; }
}
}
return $exit;
my $newdevid = '';
my $ok = 0;
- opendir(MYDH, "$path_id") or die("cannot open $path_id: $! \n");
+ opendir(MYDH, "$path_id") or die("E: cannot open $path_id: $! \n");
@sellinks = grep(!/\-part\d\d?$/, grep(!/^\.\.?$/, readdir(MYDH)));
@sellinks = sort(@sellinks);
closedir(MYDH);
}
}
- if($opt_v and not $ok) { print "$olddev not converted: link not useful\n\n"; }
+ if($opt_v and not $ok) { print "W: $olddev not converted: link not useful!\n\n"; }
return ($newdevid);
}
# copy all lines from lilo.conf_old into
# new lilo.conf and add 'boot=' line
my $ok = 0;
- open(MYFH_NEW, "> $liloconf") or die("cannot open $liloconf: $!");
- open(MYFH_OLD, "< $liloconfold") or die ("cannot open $liloconfold: $!");
+ open(MYFH_NEW, "> $liloconf") or die("E: cannot open $liloconf: $!");
+ open(MYFH_OLD, "< $liloconfold") or die ("E: cannot open $liloconfold: $!");
while (<MYFH_OLD>) {
# line read from MYFH_OLD
chmod (0600,$liloconf);
}
else {
- print "file $liloconf does not exist: nothing changed\n";
+ print "W: file $liloconf does not exist: nothing changed!\n";
}
}
=head1 SYNOPSIS
-lilo-uuid-diskid [-h] [-v] [lilo.conf]
+B<lilo-uuid-diskid> [B<-h>] [B<-v>] [B<lilo.conf>]
=head1 DESCRIPTION
use the libata module for parallel and serial ATA interfaces of block devices
(i. e. hard disks with IDE or SATA interface, usbsticks).
-=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=18843936-00f9-4df0-a373-000d05a5dd44"
-
=head1 OPTIONS
=over 4
=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=18843936-00f9-4df0-a373-000d05a5dd44"
+
+=head1 COPYRIGHT and LICENSE
+
+Copyright (C) 2010-2014 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<lilo-uuid-diskid> was written by Joachim Wiedorn.
+This manual page was written by Joachim Wiedorn <joodevel at joonet.de>.
+
+=head1 SEE ALSO
+
+B<lilo>(8), B<update-lilo>(8), B<liloconfig>(8)
+
=cut
# liloconfig - creating a new lilo.conf file
#
-# Copyright 2011-2013 Joachim Wiedorn <ad_debian@joonet.de>
+#
+# Copyright 2011-2014 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
#---- global variables
my $prog = $0;
$prog =~ s#.*/##;
-my $version = "0.2";
+my $version = "0.4";
#---- parameter check
# h: help, v: verbose, f: force
our $opt_h = 0;
our $opt_v = 0;
our $opt_f = 0;
-getopts('hvf');
+our $opt_u = 0;
+getopts('hvfu');
# define perldoc usage
pod2usage(1) if $opt_h;
$liloconfold = $liloconf . ".old";
$liloconfnew = $liloconf . ".new";
}
- if (-f $liloconf and not $opt_f) {
- print "$prog: $liloconf already exist! Please use '-f' for overwriting.\n";
+ if (-f $liloconf and not $opt_f and not $opt_u) {
+ print $prog .": " . $liloconf .
+ " already exist! Please force overwriting with '-f' or '-u'.\n";
$exit = 1;
}
else {
- $exit = create_lilo_conf()
+ $exit = create_lilo_conf();
}
return $exit;
}
if ($found) { $found = convert_boot_device(); }
# finally write new lilo.conf file
- if ($found) { $exit = write_lilo_conf(); }
+ if ($found) {
+ if ($opt_u) { $exit = update_lilo_conf(); }
+ else { $exit = write_lilo_conf(); }
+ }
return $exit;
}
my $boot_disk = '';
my $boot_link;
# global variables: $boot_dev, $boot_id
-
+
if (-b $root_dev) {
if ($root_dev =~ /\/dev\/md/) {
# search if the found partition is a raid volume
print "E: could not find root device $root_dev! \n";
$found = 0;
}
-
+
if ($found) {
if($opt_v) { print "Convert boot option $boot_disk into DISK ID\n"; }
$boot_id = $idpath . "/" . find_id_link($boot_disk,$idpath);
#$found = 0;
}
}
-
+
return $found;
}
my $mdname;
my $md;
my @devices;
-
+
# check if the found partition is a raid volume
if($part =~ /\/dev\/md/)
{
@devices = sort(@devices[4..$#devices]);
$part = "/dev/" . $devices[0];
$part =~ s/\[.*$//;
-
}
+
return $part;
}
if (not $exit) {
# create lilo.conf.new
- write_boot_option();
- write_image_config();
+ write_bootroot_option();
+ if ( not write_image_config() ) {
+ if ( not write_imagelinks_config() ) {
+ print "E: Cannot find any images or image symlinks!\n";
+ $exit = 1;
+ }
+ }
}
if (-f $liloconf and not -f $liloconfold) {
#large-memory
lba32
boot = /dev/sda
+root = /dev/sda1
map = /boot/map
install = menu
menu-scheme = Wb:Yr:Wb:Wb
return $exit;
}
-sub write_boot_option {
+sub update_lilo_conf {
+
+ my @status;
+ my $exit = 0;
+
+ if (-f $liloconf) {
+ # copy old config
+ system("cat $liloconf >$conftmp_2");
+
+ # create lilo.conf.new
+ update_bootroot_option();
+ }
+
+ if (-f $liloconf and not -f $liloconfold) {
+ # move old lilo.conf to lilo.conf.old
+ @status = stat($liloconf);
+ move ($liloconf, $liloconfold) or die "Cannot rename file: $!\n";
+ utime ($status[9],$status[9],$liloconfold);
+ chmod (0600,$liloconfold);
+ print "Old file moved to: $liloconfold \n";
+ }
+ if (-f $liloconfnew) {
+ move ($liloconfnew, $liloconf) or die "Cannot move file: $!\n";
+ chmod (0600,$liloconf);
+ print "New file created as: $liloconf \n";
+ print "Now you must execute '/sbin/lilo' to " .
+ "activate this new configuation!\n\n";
+ }
+ else {
+ print "E: Cannot find temporary file $conftmp_1!\n";
+ $exit = 1;
+ }
+
+ return $exit;
+}
+
+sub write_bootroot_option {
my $oldline = '';
my $newline = '';
# line read from MYFH_TMP
$oldline = $_;
+ # lines beginning direct with boot option
if (/^boot/ and $ok == 0) {
if ($boot_id) {
- $oldline = "#boot = $boot_dev\n";
- $newline = "boot = $boot_id\n";
- print MYFH_NEW $oldline;
- if($opt_v) { print $oldline; }
+ $newline = "#boot = " . $boot_dev . "\n";
+ print MYFH_NEW $newline;
+ if($opt_v) { print $newline; }
+ $newline = "boot = " . $boot_id . "\n";
+ }
+ else {
+ $newline = "boot = " . $boot_dev . "\n";
+ }
+ print MYFH_NEW $newline;
+ if($opt_v) { print $newline; print "\n";}
+ # convert only one time
+ $ok = 1;
+ }
+ # lines beginning direct with root option
+ elsif (/^root\ =/) {
+ if ($root_id) {
+ $newline = '#root = ' . $root_dev . "\n";
+ print MYFH_NEW $newline;
+ if($opt_v) { print $newline; }
+ $newline = 'root = "' . $root_id . '"' . "\n";
}
else {
- $oldline = "boot = $boot_dev\n";
+ $newline = 'root = ' . $root_dev . "\n";
}
print MYFH_NEW $newline;
- if($opt_v) { print $newline; }
- if($opt_v) { print "\n"; }
+ if($opt_v) { print $newline; print "\n";}
+ }
+ # print the rest into file, but not old commented root lines
+ elsif ( not (/^\#boot\ =/ or /^\#root\ =/) ) {
+ print MYFH_NEW $oldline;
+ }
+ }
+ close(MYFH_TMP);
+ close(MYFH_NEW);
+}
+sub update_bootroot_option {
+
+ my $oldline = '';
+ my $newline = '';
+ my $ok = 0;
+
+ open(MYFH_NEW, "> $liloconfnew") or die "Cannot open file: $!";
+ open(MYFH_TMP, "< $conftmp_2") or die "Cannot read file: $!";
+
+ while (<MYFH_TMP>) {
+ # read (old) line from MYFH_TMP
+ $oldline = $_;
+
+ # lines beginning direct with boot option
+ if (/^boot/ and $ok == 0) {
+ if ($boot_id) {
+ $newline = "#boot = " . $boot_dev . "\n";
+ print MYFH_NEW $newline;
+ if($opt_v) { print $newline; }
+ $newline = "boot = " . $boot_id . "\n";
+ }
+ else {
+ $newline = "boot = " . $boot_dev . "\n";
+ }
+ print MYFH_NEW $newline;
+ if($opt_v) { print $newline; print "\n";}
# convert only one time
$ok = 1;
}
- else {
+ # lines beginning direct with root option
+ elsif (/^root\ =/) {
+ if ($root_id) {
+ $newline = '#root = ' . $root_dev . "\n";
+ print MYFH_NEW $newline;
+ if($opt_v) { print $newline; }
+ $newline = 'root = "' . $root_id . '"' . "\n";
+ }
+ else {
+ $newline = 'root = ' . $root_dev . "\n";
+ }
+ print MYFH_NEW $newline;
+ if($opt_v) { print $newline; print "\n";}
+ }
+ # lines beginning with one tabulator or with two - eight spaces
+ elsif (/^\troot\ =/ or /^\ {2,8}root\ =/) {
+ if ($root_id) {
+ $newline = "\t" . '#root = ' . $root_dev . "\n";
+ print MYFH_NEW $newline;
+ if($opt_v) { print $newline; }
+ $newline = "\t" . 'root = "' . $root_id . '"' . "\n";
+ }
+ else {
+ $newline = "\t" . 'root = ' . $root_dev . "\n";
+ }
+ print MYFH_NEW $newline;
+ if($opt_v) { print $newline; print "\n";}
+ }
+ # print the rest into file, but not old commented root lines
+ elsif ( not (/^\#boot\ =/ or /^\#root\ =/ or /^\t\#root\ =/ or /^\ {2,8}\#root\ =/) ) {
print MYFH_NEW $oldline;
}
}
my $image;
my $initrd;
+ my $initrd2;
my $nr;
my $nr2;
+ # append to new lilo.conf
+ open(MYFH_NEW, ">> $liloconfnew") or die "Cannot open file: $!";
+
# search for kernel image files
- my @vmlinuz = readpipe("/bin/ls -t -1 /boot/vmlinuz-* 2>/dev/null");
+ my @vmlinuz = readpipe("/bin/ls -t -1 /boot/vmlinuz* 2>/dev/null");
+
+ # create some lines for each kernel image
+ $nr = 0;
+ foreach $image (@vmlinuz) {
+ # search for kernel initrd file
+ chomp $image;
+ $initrd = $image;
+ $initrd =~ s/vmlinuz/initrd\.img/;
+ $initrd2 = $initrd;
+ $initrd2 =~ s/\.img//;
+ $nr2 = $nr + 1;
+
+ print MYFH_NEW 'image = ' . $image . "\n";
+ if($opt_v) { print 'image = ' . $image . "\n"; }
+
+ if ($nr == 0) {
+ print MYFH_NEW "\t" . 'label = "Linux"' . "\n";
+ if($opt_v) { print "\t" . 'label = "Linux"' . "\n"; }
+ }
+ elsif ($nr == 1) {
+ print MYFH_NEW "\t" . 'label = "Linux Old"' . "\n";
+ if($opt_v) { print "\t" . 'label = "Linux Old"' . "\n"; }
+ }
+
+ print MYFH_NEW "\t" . 'read-only' . "\n";
+ if($opt_v) { print "\t" . 'read-only' . "\n"; }
+ print MYFH_NEW "#\t" . 'restricted' . "\n";
+ if($opt_v) { print "#\t" . 'restricted' . "\n"; }
+ print MYFH_NEW "#\t" . 'alias = ' . "$nr2" . "\n";
+ if($opt_v) { print "#\t" . 'alias = ' . "$nr2" . "\n"; }
+ print MYFH_NEW "#\t" . 'optional' . "\n";
+ if($opt_v) { print "#\t" . 'optional' . "\n"; }
+
+ if (-e $initrd) {
+ print MYFH_NEW "\t" . 'initrd = ' . $initrd . "\n";
+ if($opt_v) { print "\t" . 'initrd = ' . $initrd . "\n"; }
+ }
+ elsif (-e $initrd2) {
+ print MYFH_NEW "\t" . 'initrd = ' . $initrd2 . "\n";
+ if($opt_v) { print "\t" . 'initrd = ' . $initrd2 . "\n"; }
+ }
+ else {
+ if($opt_v) { print "W: initrd $initrd could not be found!\n" }
+ }
+
+ print MYFH_NEW "\n";
+ if($opt_v) { print "\n"; }
+
+ $nr++;
+ last if ($nr > 1);
+ }
+
+ close(MYFH_NEW);
+
+ if ($nr == 0) {
+ print "No images '/boot/vmlinuz*' found!\n";
+ if($opt_v) { print "\n"; }
+ }
+ elsif( not $opt_v ) {
+ print "$nr images '/boot/vmlinuz*' found.\n";
+ }
+ return ($nr > 0); # if =0 this is an error
+}
+
+sub write_imagelinks_config {
+
+ my $image;
+ my $initrd;
+ my $nr;
+ my $nr2;
# append to new lilo.conf
open(MYFH_NEW, ">> $liloconfnew") or die "Cannot open file: $!";
- # create some line for each kernel image
+ # search for kernel image files
+ my @vmlinuz = readpipe("/bin/ls -t -1 /vmlinuz /vmlinuz.old 2>/dev/null");
+
+ # create some lines for each kernel image
$nr = 0;
foreach $image (@vmlinuz) {
# search for kernel initrd file
print MYFH_NEW "#\t" . 'optional' . "\n";
if($opt_v) { print "#\t" . 'optional' . "\n"; }
- if (-f $initrd) {
+ if (-e $initrd) {
print MYFH_NEW "\t" . 'initrd = ' . $initrd . "\n";
if($opt_v) { print "\t" . 'initrd = ' . $initrd . "\n"; }
}
else {
- if($opt_v) { print "initrd $initrd could not be found!\n" }
+ if($opt_v) { print "W: initrd $initrd could not be found!\n" }
}
print MYFH_NEW "\n";
}
close(MYFH_NEW);
-}
-
-
+
+ if ($nr == 0) {
+ print "No image symlinks '/vmlinuz*' found!\n";
+ if($opt_v) { print "\n"; }
+ }
+ elsif( not $opt_v ) {
+ print "$nr image symlinks '/vmlinuz*' found.\n";
+ }
+ return ($nr > 0); # if =0 this is an error
+}
+
main();
__END__
=head1 SYNOPSIS
-liloconfig [-h] [-v] [-f] [lilo.conf]
+B<liloconfig> [B<-h>] [B<-v>] [B<-f>] [B<-u>] [B<lilo.conf>]
=head1 DESCRIPTION
liloconfig use the lilo.example.conf file as template. In the final
lilo.conf file you find many useful comments for custom changes.
+Please pay attention about error messages if liloconfig cannot find
+any images (/boot/vmlinuz*) oder image symlinks (/vmlinuz, /vmlinu.old).
+Then you need to search for images by ourself and make some changes
+in the '/etc/lilo.conf' file. Otherwise no bootloader can be installed
+with '/sbin/lilo'.
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<-h>
+
+Print a brief help.
+
+=item B<-v>
+
+Print verbose messages.
+
+=item B<-f>
+
+Force overriding existing lilo.conf.
+
+=item B<-u>
+
+Force overriding/update of boot line in lilo.conf.
+
+=back
+
=head1 EXAMPLES
Lines in the configuration file /etc/lilo.conf:
#large-memory
lba32
boot = /dev/sda
+ #root = /dev/sda1
+ root = "UUID=18843936-00f9-4df0-a373-000d05a5dd44"
map = /boot/map
install = menu
menu-scheme = Wb:Yr:Wb:Wb
image = /boot/vmlinuz-3.5.0-trunk-686
label = "Linux"
#root = /dev/sda1
- root = "UUID=18843936-00f9-4df0-a373-000d05a5dd44"
+ #root = "UUID=18843936-00f9-4df0-a373-000d05a5dd44"
read-only
# restricted
# alias = 1
image = /boot/vmlinuz-3.2.0-4-686
label = "Linux Old"
#root = /dev/sda1
- root = "UUID=18843936-00f9-4df0-a373-000d05a5dd44"
+ #root = "UUID=18843936-00f9-4df0-a373-000d05a5dd44"
read-only
# restricted
# alias = 2
# optional
initrd = /boot/initrd.img-3.2.0-4-686
-=head1 OPTIONS
-
-=over 4
-
-=item B<-h>
-
-Print a brief help.
+=head1 COPYRIGHT and LICENSE
-=item B<-v>
+Copyright (C) 2011-2014 Joachim Wiedorn
-Print verbose messages.
+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.
-=item B<-f>
+=head1 AUTHOR
-Force overriding existing lilo.conf.
+B<liloconfig> was written by Joachim Wiedorn.
-=back
+This manual page was written by Joachim Wiedorn <joodevel at joonet.de>.
-=head1 AUTHOR
+=head1 SEE ALSO
-B<liloconfig> was written by Joachim Wiedorn.
+B<lilo>(8), B<update-lilo>(8), B<lilo-uuid-diskid>(8)
=cut
# -*- makefile -*-
#
-# Copyright 2009-2013 Joachim Wiedorn
+# Copyright 2009-2014 Joachim Wiedorn
# All rights reserved.
#
# Licensed under the terms contained in the file 'COPYING'
G=`cat foo1 foo2 | grep version | cut -d " " -f 3`
CFLAGS=$(OPT) -Wall $(PCONFIG)
-LDFLAGS=#-Xlinker -qmagic
LIBS=$(DEVMAPPER)
OBJS=lilo.o raid.o map.o geometry.o boot.o device.o common.o bsect.o cfg.o \
echo $(MAN_DIR)
.c.o:
- $(CC) -c $(CFLAGS) $*.c
+ $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
.s.o:
$(AS86) -w -l $*.lis -o $*.o $*.s
dd if=$*.img of=$*.b bs=32 skip=1
edit: $(EDIT)
- $(CC) $(CFLAGS) -DSTANDALONE -o edit $(EDIT) $(LDFLAGS)
+ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -DSTANDALONE -o edit $(EDIT)
loader.i: mkloader first.b second.b third.b bitmap.b mbr.b chain.b mbr2.b
./mkloader >loader.i
cp disk.b disk.com
disk.s: disk.S read.S bdata.h biosdata.S lilo.h Makefile
- $(CPP) -traditional $(PCONFIG) -o disk.s disk.S
+ $(CPP) $(CPPFLAGS) -traditional $(PCONFIG) -o disk.s disk.S
mbr.s: mbr.S lilo.h Makefile
- $(CPP) -traditional $(PCONFIG) -DMBR=0xafbbe760 \
+ $(CPP) $(CPPFLAGS) -traditional $(PCONFIG) -DMBR=0xafbbe760 \
-o mbr.s mbr.S
mbr.b: mbr.img
dd if=$*.img of=$*.b bs=32 skip=49
mbr2.s: mbr.S lilo.h Makefile
- $(CPP) -traditional $(PCONFIG) -DMBX=0x93c00848 \
+ $(CPP) $(CPPFLAGS) -traditional $(PCONFIG) -DMBX=0x93c00848 \
-o mbr2.s mbr.S
mbr2.b: mbr2.img
dd if=$*.img of=$*.b bs=32 skip=49
bootsect.s: bootsect.S disk.b
- $(CPP) -traditional $(PCONFIG) \
+ $(CPP) $(CPPFLAGS) -traditional $(PCONFIG) \
-DSIZEDISKB=`wc -c <disk.b | sed "s/ //g"` \
-o bootsect.s bootsect.S
pseudo1.s: bootsect.S pseudo.S disk.com
cat bootsect.S pseudo.S >$(TMP).S
- $(CPP) -traditional $(PCONFIG) \
+ $(CPP) $(CPPFLAGS) -traditional $(PCONFIG) \
-DSIZEKRNL=`wc -c <disk.com | sed "s/ //g"` \
-DSIZEDISKB=512 -o pseudo1.s $(TMP).S
rm -f $(TMP).S
pseudo2.s: bootsect.S pseudo.S
$(MAKE) -C ../diagnose all
cat bootsect.S pseudo.S >$(TMP).S
- $(CPP) -traditional $(PCONFIG) \
+ $(CPP) $(CPPFLAGS) -traditional $(PCONFIG) \
-DSIZEKRNL=`wc -c <../diagnose/test4.com | sed "s/ //g"` \
-DSIZEDISKB=512 -o pseudo2.s $(TMP).S
rm -f $(TMP).S
pseudo3.s: bootsect.S pseudo.S
$(MAKE) -C ../diagnose all
cat bootsect.S pseudo.S >$(TMP).S
- $(CPP) -traditional $(PCONFIG) \
+ $(CPP) $(CPPFLAGS) -traditional $(PCONFIG) \
-DSIZEKRNL=`wc -c <../diagnose/test5.com | sed "s/ //g"` \
-DSIZEDISKB=512 -o pseudo3.s $(TMP).S
rm -f $(TMP).S
cp -p dparam.S dparam.s
lilo: $(OBJS)
- $(CC) -o lilo $(LDFLAGS) $(OBJS) $(LIBS)
+ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o lilo $(OBJS) $(LIBS)
lilo.static: $(OBJS)
- $(CC) -o lilo.static -static $(LDFLAGS) $(OBJS) $(LIBS)
+ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o lilo.static -static $(OBJS) $(LIBS)
common.s: common.h
- $(CPP) -C -traditional -DLILO_ASM -o common.s common.h
+ $(CPP) $(CPPFLAGS) -C -traditional -DLILO_ASM -o common.s common.h
bitmap.o: bitmap.s common.s
third.o: third.s common.s
chain.o: chain.s common.s
first.s: first.S lilo.h version.h Makefile
- $(CPP) $(PCONFIG) -DFIRST=0x62177489 -o first.s first.S
+ $(CPP) $(CPPFLAGS) $(PCONFIG) -DFIRST=0x62177489 -o first.s first.S
second.s: second.S read.S volume.S mapper.S biosdata.S shs3.S bdata.h lilo.h version.h \
graph.S menu.S strlen.S bitmap.S crt.S display4.S Makefile
- $(CPP) $(PCONFIG) -DTEXT=0x9dd476ec second.S -o second.s
+ $(CPP) $(CPPFLAGS) $(PCONFIG) -DTEXT=0x9dd476ec second.S -o second.s
third.s: second.S read.S volume.S mapper.S biosdata.S shs3.S bdata.h lilo.h version.h \
graph.S menu.S strlen.S bitmap.S crt.S display4.S Makefile
- $(CPP) $(PCONFIG) -DMENU=0x2012a4a7 second.S -o third.s
+ $(CPP) $(CPPFLAGS) $(PCONFIG) -DMENU=0x2012a4a7 second.S -o third.s
bitmap.s: second.S read.S volume.S mapper.S biosdata.S shs3.S bdata.h lilo.h version.h \
graph.S menu.S strlen.S bitmap.S crt.S display4.S Makefile
- $(CPP) $(PCONFIG) -DBITMAP=0x2ece2fbe second.S -o bitmap.s
+ $(CPP) $(CPPFLAGS) $(PCONFIG) -DBITMAP=0x2ece2fbe second.S -o bitmap.s
chain.s: chain.S lilo.h version.h first.b Makefile
- $(CPP) $(PCONFIG) -DCHAIN=0x536a7646 chain.S -o chain.s
+ $(CPP) $(CPPFLAGS) $(PCONFIG) -DCHAIN=0x536a7646 chain.S -o chain.s
xxx.s: chain.S lilo.h Makefile
- $(CPP) chain.S -DXXX -o xxx.s
+ $(CPP) $(CPPFLAGS) chain.S -DXXX -o xxx.s
$(OBJS): Makefile
strip lilo
cp lilo $$DESTDIR$(SBIN_DIR)/lilo
- [ -x lilo.static ] && strip lilo.static
+ if [ -f lilo.static ]; then \
+ strip lilo.static; \
+ cp lilo.static $$DESTDIR$(SBIN_DIR)/lilo.static; \
+ fi
cp ../mkrescue $$DESTDIR$(USRSBIN_DIR)/mkrescue
cp ../keytab-lilo.pl $$DESTDIR$(USRSBIN_DIR)/keytab-lilo
dep:
sed '/\#\#\# Dependencies/q' <Makefile >tmp_make
- $(CPP) $(CFLAGS) -MM *.c >>tmp_make
+ $(CPP) $(CFLAGS) $(CPPFLAGS) -MM *.c >>tmp_make
mv tmp_make Makefile
version: common.c lilo.h common.h
- $(CC) $(CFLAGS) -DSHS_MAIN -o version common.c
+ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -DSHS_MAIN -o version common.c
mkloader: temp.c
- $(CC) $(CFLAGS) -DLILO_BINARY -o mkloader temp.c
+ $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -DLILO_BINARY -o mkloader temp.c
tidy:
*
* Copyright 1992-1997 Werner Almesberger
* Copyright 1999-2006 John Coffman
- * Copyright 2009-2011 Joachim Wiedorn
+ * Copyright 2009-2014 Joachim Wiedorn
* All rights reserved.
*
* Licensed under the terms contained in the file 'COPYING'
cache_add(DEV_DIR "/fd1", 0x0201);
}
-#if 1
cache_ide(DEV_DISK_DIR "/hdt", MAJOR_IDE10);
cache_ide(DEV_DISK_DIR "/hds", MAJOR_IDE10);
cache_ide(DEV_DISK_DIR "/hdr", MAJOR_IDE9);
cache_ide(DEV_DISK_DIR "/hdl", MAJOR_IDE6);
cache_ide(DEV_DISK_DIR "/hdk", MAJOR_IDE6);
-#ifdef MAJOR_IDE5
+
cache_ide(DEV_DISK_DIR "/hdj", MAJOR_IDE5);
cache_ide(DEV_DISK_DIR "/hdi", MAJOR_IDE5);
-#endif
-#endif
for (i = MAX; i >= 0; i--) {
sprintf(tmp, is_devfs() ? DEV_DISK_DIR "/md/%d" : DEV_DISK_DIR "/md%d", i);
cache_ide(DEV_DISK_DIR "/hdd", MAJOR_IDE2);
cache_ide(DEV_DISK_DIR "/hdc", MAJOR_IDE2);
- cache_ide(DEV_DISK_DIR "/hdb", MAJOR_HD);
- cache_ide(DEV_DISK_DIR "/hda", MAJOR_HD);
+ cache_ide(DEV_DISK_DIR "/hdb", MAJOR_IDE);
+ cache_ide(DEV_DISK_DIR "/hda", MAJOR_IDE);
verbose = vsave;
}
*
* Copyright 1992-1998 Werner Almesberger
* Copyright 1999-2005 John Coffman
- * Copyright 2009-2011 Joachim Wiedorn
+ * Copyright 2009-2014 Joachim Wiedorn
* All rights reserved.
*
* Licensed under the terms contained in the file 'COPYING'
{
int major = MAJOR(dev);
- if (
- major == MAJOR_HD || major == MAJOR_IDE2 ||
- major == MAJOR_IDE3 || major == MAJOR_IDE4 ||
- major == MAJOR_IDE5 || major == MAJOR_IDE6 ||
- major == MAJOR_EMD ||
- (major >= MAJOR_IDE7 && major <= MAJOR_IDE10) ||
- major == MAJOR_XT || major == MAJOR_ESDI || major == MAJOR_ACORN
- ) return 0xFFFFFFC0; /* 6 bit partition mask */
+ if (
+ major == MAJOR_IDE ||
+ major == MAJOR_IDE2 ||
+ major == MAJOR_IDE3 ||
+ major == MAJOR_IDE4 ||
+ major == MAJOR_IDE5 ||
+ major == MAJOR_IDE6 ||
+ major == MAJOR_EMD ||
+ (major >= MAJOR_IDE7 && major <= MAJOR_IDE10) ||
+ major == MAJOR_XT ||
+ major == MAJOR_ESDI ||
+ major == MAJOR_ACORN
+ ) return 0xFFFFFFC0; /* 6 bit partition mask */
- if (
- major == MAJOR_SD || (major >= MAJOR_SD2 && major <= MAJOR_SD8) ||
- major == MAJOR_AMI_HYP || major == MAJOR_HPT370 ||
- (major >= MAJOR_EXPR && major <= MAJOR_EXPR+3) ||
- (major >= MAJOR_I2O && major <= MAJOR_I2O+7) ||
- (major >= MAJOR_SMART2 && major <= MAJOR_SMART2+7) ||
- (major >= MAJOR_CISS && major <= MAJOR_CISS+7) ||
- major == MAJOR_FTL || major == MAJOR_NFTL || major == MAJOR_DOC ||
- (major >= MAJOR_SD9 && major <= MAJOR_SD16) ||
- (major >= MAJOR_SATA1 && major <= MAJOR_SATA2)
- ) return 0xFFFFFFF0; /* 4 bit partition mask */
-
- if ( major == MAJOR_CARM1 || major == MAJOR_CARM2
+ if (
+ major == MAJOR_CARM1 ||
+ major == MAJOR_CARM2
) return 0xFFFFFFE0; /* 5 bit partition mask */
- if ( major == MAJOR_IBM_iSER ||
- (major >= MAJOR_DAC960 && major <= MAJOR_DAC960+7) ||
- (major >= MAJOR_DAC960_8 && major <= MAJOR_DAC960_8+7)
+ if (
+ major == MAJOR_SD ||
+ (major >= MAJOR_SD2 && major <= MAJOR_SD8) ||
+ (major >= MAJOR_SD9 && major <= MAJOR_SD16) ||
+ major == MAJOR_AMI ||
+ major == MAJOR_HPT370 ||
+ (major >= MAJOR_EXPR && major <= MAJOR_EXPR4) ||
+ (major >= MAJOR_EXPR5 && major <= MAJOR_EXPR12) ||
+ (major >= MAJOR_I2O && major <= MAJOR_I2O7) ||
+ (major >= MAJOR_SMART && major <= MAJOR_SMART8) ||
+ (major >= MAJOR_CISS && major <= MAJOR_CISS8) ||
+ major == MAJOR_FTL ||
+ major == MAJOR_NFTL ||
+ major == MAJOR_DOC ||
+ major == MAJOR_PP ||
+ major == MAJOR_PPCD ||
+ major == MAJOR_PPFD ||
+ (major >= MAJOR_SATA1 && major <= MAJOR_SATA2)
+ ) return 0xFFFFFFF0; /* 4 bit partition mask */
+
+ if (
+ major == MAJOR_IBM_ISER ||
+ (major >= MAJOR_DAC && major <= MAJOR_DAC8) ||
+ (major >= MAJOR_DAC9 && major <= MAJOR_DAC16)
) return 0xFFFFFFF8; /* 3 bit partition mask */
return 0;
geo->sectors = fdprm.sect;
geo->start = 0;
break;
- case MAJOR_HD:
+ case MAJOR_ACORN:
+ case MAJOR_ESDI:
+ case MAJOR_IDE:
case MAJOR_IDE2:
case MAJOR_IDE3:
case MAJOR_IDE4:
-#ifdef MAJOR_IDE5
case MAJOR_IDE5:
-#endif
case MAJOR_IDE6:
case MAJOR_IDE7:
case MAJOR_IDE8:
case MAJOR_IDE9:
case MAJOR_IDE10:
- case MAJOR_ESDI:
case MAJOR_XT:
- case MAJOR_ACORN:
MASK63:
geo->device = 0x80 + (MINOR(device) >> 6) +
- (MAJOR(device) == MAJOR_HD ? 0 : last_dev(MAJOR_HD,64));
+ (MAJOR(device) == MAJOR_IDE ? 0 : last_dev(MAJOR_IDE,64));
if (!get_all) break;
if (ioctl(fd,HDIO_GETGEO,&hdprm) < 0)
die("geo_query_dev HDIO_GETGEO (dev 0x%04x): %s",device,
case MAJOR_SD6:
case MAJOR_SD7:
case MAJOR_SD8:
+ case MAJOR_SD9:
+ case MAJOR_SD10:
+ case MAJOR_SD11:
+ case MAJOR_SD12:
+ case MAJOR_SD13:
+ case MAJOR_SD14:
+ case MAJOR_SD15:
+ case MAJOR_SD16:
+ case MAJOR_XVD:
MASK15:
- geo->device = 0x80 + last_dev(MAJOR_HD,64) + (MINOR(device) >> 4);
+ geo->device = 0x80 + last_dev(MAJOR_IDE,64) + (MINOR(device) >> 4);
if (!get_all) break;
if (ioctl(fd,HDIO_GETGEO,&hdprm) < 0)
die("geo_query_dev HDIO_GETGEO (dev 0x%04x): %s",device,
die("Sorry, cannot handle device 0x%04x",device);
break;
MASK31:
- geo->device = 0x80 + last_dev(MAJOR_HD,64) + (MINOR(device) >> 5);
+ geo->device = 0x80 + last_dev(MAJOR_IDE,64) + (MINOR(device) >> 5);
if (!get_all) break;
if (ioctl(fd,HDIO_GETGEO,&hdprm) < 0)
die("geo_query_dev HDIO_GETGEO (dev 0x%04x): %s",device,
geo->sectors = hdprm.sectors;
geo->start = hdprm.start;
break;
- case MAJOR_DAC960:
- case MAJOR_DAC960+1:
- case MAJOR_DAC960+2:
- case MAJOR_DAC960+3:
- case MAJOR_DAC960+4:
- case MAJOR_DAC960+5:
- case MAJOR_DAC960+6:
- case MAJOR_DAC960+7:
- case MAJOR_IBM_iSER:
+ case MAJOR_DAC:
+ case MAJOR_DAC2:
+ case MAJOR_DAC3:
+ case MAJOR_DAC4:
+ case MAJOR_DAC5:
+ case MAJOR_DAC6:
+ case MAJOR_DAC7:
+ case MAJOR_DAC8:
+ case MAJOR_DAC9:
+ case MAJOR_DAC10:
+ case MAJOR_DAC11:
+ case MAJOR_DAC12:
+ case MAJOR_DAC13:
+ case MAJOR_DAC14:
+ case MAJOR_DAC15:
+ case MAJOR_DAC16:
+ case MAJOR_IBM_ISER:
+ case MAJOR_MMC:
MASK7:
- geo->device = 0x80 + last_dev(MAJOR_HD,64) + (MINOR(device) >> 3);
+ geo->device = 0x80 + last_dev(MAJOR_IDE,64) + (MINOR(device) >> 3);
if (!get_all) break;
if (ioctl(fd,HDIO_GETGEO,&hdprm) < 0)
die("geo_query_dev HDIO_GETGEO (dev 0x%04x): %s",device,
geo->sectors = hdprm.sectors;
geo->start = hdprm.start;
break;
- case MAJOR_AMI_HYP:
- case MAJOR_HPT370:
+ case MAJOR_AMI:
+ case MAJOR_CISS:
+ case MAJOR_CISS2:
+ case MAJOR_CISS3:
+ case MAJOR_CISS4:
+ case MAJOR_CISS5:
+ case MAJOR_CISS6:
+ case MAJOR_CISS7:
+ case MAJOR_CISS8:
+ case MAJOR_DOC:
case MAJOR_EXPR:
- case MAJOR_EXPR+1:
- case MAJOR_EXPR+2:
- case MAJOR_EXPR+3:
+ case MAJOR_EXPR2:
+ case MAJOR_EXPR3:
+ case MAJOR_EXPR4:
+ case MAJOR_EXPR5:
+ case MAJOR_EXPR6:
+ case MAJOR_EXPR7:
+ case MAJOR_EXPR8:
+ case MAJOR_EXPR9:
+ case MAJOR_EXPR10:
+ case MAJOR_EXPR11:
+ case MAJOR_EXPR12:
+ case MAJOR_HPT370:
case MAJOR_FTL:
case MAJOR_NFTL:
- case MAJOR_DOC:
- case MAJOR_SMART2+0:
- case MAJOR_SMART2+1:
- case MAJOR_SMART2+2:
- case MAJOR_SMART2+3:
- case MAJOR_SMART2+4:
- case MAJOR_SMART2+5:
- case MAJOR_SMART2+6:
- case MAJOR_SMART2+7:
- case MAJOR_CISS+0:
- case MAJOR_CISS+1:
- case MAJOR_CISS+2:
- case MAJOR_CISS+3:
- case MAJOR_CISS+4:
- case MAJOR_CISS+5:
- case MAJOR_CISS+6:
- case MAJOR_CISS+7:
case MAJOR_I2O:
- case MAJOR_I2O+1:
- case MAJOR_I2O+2:
- case MAJOR_I2O+3:
- case MAJOR_I2O+4:
- case MAJOR_I2O+5:
- case MAJOR_I2O+6:
- case MAJOR_I2O+7:
- geo->device = 0x80 + last_dev(MAJOR_HD,64) + (MINOR(device) >> 4);
+ case MAJOR_I2O2:
+ case MAJOR_I2O3:
+ case MAJOR_I2O4:
+ case MAJOR_I2O5:
+ case MAJOR_I2O6:
+ case MAJOR_I2O7:
+ case MAJOR_I2O8:
+ case MAJOR_PP:
+ case MAJOR_PPCD:
+ case MAJOR_PPFD:
+ case MAJOR_SMART:
+ case MAJOR_SMART2:
+ case MAJOR_SMART3:
+ case MAJOR_SMART4:
+ case MAJOR_SMART5:
+ case MAJOR_SMART6:
+ case MAJOR_SMART7:
+ case MAJOR_SMART8:
+ geo->device = 0x80 + last_dev(MAJOR_IDE,64) + (MINOR(device) >> 4);
if (!get_all) break;
if (ioctl(fd,HDIO_GETGEO,&hdprm) < 0)
die("geo_query_dev HDIO_GETGEO (dev 0x%04x): %s",device,
if (max_partno[major] == 15) goto MASK15;
if (max_partno[major] == 7) goto MASK7;
- if ((MAJOR(device)>=120 && MAJOR(device)<=127) ||
+ if ((MAJOR(device)>=60 && MAJOR(device)<=63) ||
+ (MAJOR(device)>=120 && MAJOR(device)<=127) ||
(MAJOR(device)>=240 && MAJOR(device)<=254) )
die("Linux experimental device 0x%04x needs to be defined.\n"
"Check 'man lilo.conf' under 'disk=' and 'max-partitions='", device);
if (walk && !walk->heads)
die("Device 0x%04X: Configured as inaccessible.\n",device);
if (walk && walk->bios != -1) return !(walk->bios & 0x7f);
+
switch (MAJOR(device)) {
case MAJOR_FD:
return !(device & 3);
- case MAJOR_HD:
+ case MAJOR_IDE:
return !(MINOR(device) >> 6);
case MAJOR_IDE2:
case MAJOR_IDE3:
case MAJOR_IDE4:
-#ifdef MAJOR_IDE5
case MAJOR_IDE5:
-#endif
case MAJOR_IDE6:
case MAJOR_IDE7:
case MAJOR_IDE8:
case MAJOR_IDE10:
case MAJOR_ESDI:
case MAJOR_XT:
- return MINOR(device) >> 6 ? 0 : !last_dev(MAJOR_HD,64);
+ return MINOR(device) >> 6 ? 0 : !last_dev(MAJOR_IDE,64);
case MAJOR_SD:
case MAJOR_SD2:
case MAJOR_SD6:
case MAJOR_SD7:
case MAJOR_SD8:
- case MAJOR_AMI_HYP:
- case MAJOR_HPT370:
- case MAJOR_EXPR+0:
- case MAJOR_EXPR+1:
- case MAJOR_EXPR+2:
- case MAJOR_EXPR+3:
- case MAJOR_NFTL:
+ case MAJOR_SD9:
+ case MAJOR_SD10:
+ case MAJOR_SD11:
+ case MAJOR_SD12:
+ case MAJOR_SD13:
+ case MAJOR_SD14:
+ case MAJOR_SD15:
+ case MAJOR_SD16:
+ case MAJOR_XVD:
+ case MAJOR_AMI:
+ case MAJOR_CISS:
+ case MAJOR_CISS2:
+ case MAJOR_CISS3:
+ case MAJOR_CISS4:
+ case MAJOR_CISS5:
+ case MAJOR_CISS6:
+ case MAJOR_CISS7:
+ case MAJOR_CISS8:
case MAJOR_DOC:
- case MAJOR_SMART2+0:
- case MAJOR_SMART2+1:
- case MAJOR_SMART2+2:
- case MAJOR_SMART2+3:
- case MAJOR_SMART2+4:
- case MAJOR_SMART2+5:
- case MAJOR_SMART2+6:
- case MAJOR_SMART2+7:
- case MAJOR_CISS+0:
- case MAJOR_CISS+1:
- case MAJOR_CISS+2:
- case MAJOR_CISS+3:
- case MAJOR_CISS+4:
- case MAJOR_CISS+5:
- case MAJOR_CISS+6:
- case MAJOR_CISS+7:
+ case MAJOR_HPT370:
+ case MAJOR_EXPR:
+ case MAJOR_EXPR2:
+ case MAJOR_EXPR3:
+ case MAJOR_EXPR4:
+ case MAJOR_EXPR5:
+ case MAJOR_EXPR6:
+ case MAJOR_EXPR7:
+ case MAJOR_EXPR8:
+ case MAJOR_EXPR9:
+ case MAJOR_EXPR10:
+ case MAJOR_EXPR11:
+ case MAJOR_EXPR12:
case MAJOR_I2O:
- case MAJOR_I2O+1:
- case MAJOR_I2O+2:
- case MAJOR_I2O+3:
- case MAJOR_I2O+4:
- case MAJOR_I2O+5:
- case MAJOR_I2O+6:
- case MAJOR_I2O+7:
- return MINOR(device) >> 4 ? 0 : !last_dev(MAJOR_HD,64);
-
- case MAJOR_DAC960:
- case MAJOR_DAC960+1:
- case MAJOR_DAC960+2:
- case MAJOR_DAC960+3:
- case MAJOR_DAC960+4:
- case MAJOR_DAC960+5:
- case MAJOR_DAC960+6:
- case MAJOR_DAC960+7:
- case MAJOR_IBM_iSER:
- return MINOR(device) >> 3 ? 0 : !last_dev(MAJOR_HD,64);
+ case MAJOR_I2O2:
+ case MAJOR_I2O3:
+ case MAJOR_I2O4:
+ case MAJOR_I2O5:
+ case MAJOR_I2O6:
+ case MAJOR_I2O7:
+ case MAJOR_I2O8:
+ case MAJOR_NFTL:
+ case MAJOR_PP:
+ case MAJOR_PPCD:
+ case MAJOR_PPFD:
+ case MAJOR_SMART:
+ case MAJOR_SMART2:
+ case MAJOR_SMART3:
+ case MAJOR_SMART4:
+ case MAJOR_SMART5:
+ case MAJOR_SMART6:
+ case MAJOR_SMART7:
+ case MAJOR_SMART8:
+ return MINOR(device) >> 4 ? 0 : !last_dev(MAJOR_IDE,64);
+
+ case MAJOR_DAC:
+ case MAJOR_DAC2:
+ case MAJOR_DAC3:
+ case MAJOR_DAC4:
+ case MAJOR_DAC5:
+ case MAJOR_DAC6:
+ case MAJOR_DAC7:
+ case MAJOR_DAC8:
+ case MAJOR_DAC9:
+ case MAJOR_DAC10:
+ case MAJOR_DAC11:
+ case MAJOR_DAC12:
+ case MAJOR_DAC13:
+ case MAJOR_DAC14:
+ case MAJOR_DAC15:
+ case MAJOR_DAC16:
+ case MAJOR_IBM_ISER:
+ case MAJOR_MMC:
+ return MINOR(device) >> 3 ? 0 : !last_dev(MAJOR_IDE,64);
default:
return 1; /* user knows what (s)he's doing ... I hope */
md_array_info_t md_array_info;
md_disk_info_t md_disk_info;
int raid_limit;
+ raid_limit = 0;
sprintf(mdxxx, DEV_DISK_DIR "/md%d", MINOR(device));
if ((md_fd=open(mdxxx,O_NOACCESS)) < 0)
*
* Copyright 1992-1998 Werner Almesberger
* Copyright 1999-2007 John Coffman
- * Copyright 2009-2013 Joachim Wiedorn
+ * Copyright 2009-2014 Joachim Wiedorn
* All rights reserved.
*
* Licensed under the terms contained in the file 'COPYING'
}
printf(" * Copyright (C) 1992-1998 Werner Almesberger (until v20)\n"
" * Copyright (C) 1999-2007 John Coffman (until v22)\n"
- " * Copyright (C) 2009-2013 Joachim Wiedorn (since v23)\n"
+ " * Copyright (C) 2009-2014 Joachim Wiedorn (since v23)\n"
"This program comes with ABSOLUTELY NO WARRANTY. This is free software \n"
"distributed under the BSD License (3-clause). Details can be found in \n"
"the file COPYING, which is distributed with this software.\n"
*
* Copyright 1992-1998 Werner Almesberger
* Copyright 1999-2006 John Coffman
- * Copyright 2009-2013 Joachim Wiedorn
+ * Copyright 2009-2014 Joachim Wiedorn
* All rights reserved.
*
* Licensed under the terms contained in the file 'COPYING'
#endif
-/* the known major device numbers */
-#define MAJMIN_RAM 0x101 /* RAM disk */
+/* the known major device numbers of block devices */
+/* see: linux-3.xx/Documentation/devices.txt */
+#define MAJMIN_RAM 0x101 /* RAM disk */
+
#ifdef LCF_MDPRAID
-#define MAJOR_MDP_SORT 1 /* Convert MAJOR_MDP to this for sorting */
-#endif
-#define MAJOR_EMD_SORT 2 /* Convert MAJOR_EMD to this for sorting */
-#define MAJOR_HPT370_SORT 2 /* Convert MAJOR_HPT370 to this for sorting */
-#define MAJOR_FD 2 /* floppy disks */
-#define MAJOR_HD 3 /* IDE-type hard disks */
-#define MAJOR_LOOP 7 /* Loopback devices 0-15 */
-#define MAJOR_SD 8 /* SCSI disks 0-15 */
-#define MAJOR_MD 9 /* multi-disk RAID sets */
-#define MAJOR_XT 13 /* XT-type hard disks */
-#define MAJOR_ACORN 21 /* Acorn MFM controller */
-#define MAJOR_IDE2 22 /* IDE on second interface */
-#define MAJOR_IDE3 33 /* IDE on third interface */
-#define MAJOR_IDE4 34 /* IDE on fourth interface */
-#define MAJOR_ESDI 36 /* PS/2 ESDI drives */
-#define MAJOR_FTL 44 /* Flash Transition Layer on Memory Technology Device */
-#define MAJOR_PP 45 /* Parallel Port IDE drive */
-#define MAJOR_PPFD 47 /* Parallel Port floppy drive */
-#define MAJOR_DAC960 48 /* First Mylex DAC960 PCI RAID controller */
-#if !BETA_TEST || 1
-#define MAJOR_IDE5 56 /* IDE on fifth interface */
+#define MAJOR_MDP_SORT 1 /*** Convert MAJOR_MDP to this for sorting ***/
#endif
-#define MAJOR_IDE6 57 /* IDE on sixth interface */
-#define MAJOR_LVM 58 /* Logical Volume Manager block device */
-#define MAJOR_EXPR 60 /* Experimental devices 60..63 */
-/*#define MAJOR_FL 62 / M-Systems Disk-On-Chip 2000 ***experimental*** */
-
-#define MAJOR_SD_SORT 64 /*** MAJOR_SD converted to this for sorting ***/
-#define MAJOR_SD2 65 /* SCSI disks 16-31 */
-#define MAJOR_SD3 66 /* SCSI disks 32-47 */
-#define MAJOR_SD4 67 /* SCSI disks 48-63 */
-#define MAJOR_SD5 68 /* SCSI disks 64-79 */
-#define MAJOR_SD6 69 /* SCSI disks 80-95 */
-#define MAJOR_SD7 70 /* SCSI disks 96-111 */
-#define MAJOR_SD8 71 /* SCSI disks 112-127 */
-#define MAJOR_SMART2 72 /* First Compaq Smart/2 Major 72-79 */
-#define MAJOR_I2O 80 /* First I2O block device 80-87 */
-#define MAJOR_IDE7 88 /* IDE on seventh interface */
-#define MAJOR_IDE8 89 /* IDE on eighth interface */
-#define MAJOR_IDE9 90 /* IDE on ninth interface */
-#define MAJOR_IDE10 91 /* IDE on tenth interface */
-#define MAJOR_PPDD 92 /* PPDD encrypted disks - not supported */
-#define MAJOR_NFTL 93 /* NAND Flash Translation Layer (Disk-On-Chip) */
-#define MAJOR_DOC 100 /* Disk-On-Chip driver */
-#define MAJOR_AMI_HYP 101 /* AMI Hyper Disk RAID controller */
-#define MAJOR_CISS 104 /* First CCISS Major 104-111 */
-#define MAJOR_IBM_iSER 112 /* IBM iSeries virtual disk */
-#define MAJOR_HPT370 114 /* HPT370 controller */
-#define MAJOR_EVMS 117 /* Enterprise Volume Management System */
-#define MAJOR_SD9 128 /* SCSI disks 129 */
-#define MAJOR_SD16 135 /* SCSI disks -255 */
-#define MAJOR_DAC960_8 136 /* Ninth Mylex DAC960 PCI RAID controller */
-#define MAJOR_EMD 153 /* Enhanced multi-disk RAID sets */
-#define MAJOR_CARM1 160 /* Carmel SATA Disk on first 8-port controller */
-#define MAJOR_CARM2 161 /* Carmel SATA Disk on 2nd 8-port controller */
+#define MAJOR_EMD_SORT 2 /*** Convert MAJOR_EMD to this for sorting ***/
+#define MAJOR_HPT370_SORT 2 /*** Convert MAJOR_HPT370 to this for sorting ***/
+
+#define MAJOR_FD 2 /* floppy disks (dev/fd..) */
+#define MAJOR_IDE 3 /* first IDE hard disk iface (/dev/hd..) */
+#define MAJOR_LOOP 7 /* loopback devices 0-15 (dev/loop..) */
+#define MAJOR_SD 8 /* SCSI disks 0-15 (dev/sd..) */
+#define MAJOR_MD 9 /* metadisk RAID devices (/dev/md..) */
+
+#define MAJOR_SCD 11 /* SCSI CD-ROM devices (/dev/scd..) */
+#define MAJOR_XT 13 /* XT hard disks drives (deleted since kernel v3.9) */
+#define MAJOR_SONY 15 /* Sony CDU-31A/CDU-33A CD-ROM (/dev/sonycd) */
+#define MAJOR_GSCD 16 /* GoldStar CD-ROM (/dev/gscd) */
+#define MAJOR_OPT 17 /* Optics Storage CD-ROM (/dev/optcd) */
+#define MAJOR_SJCD 18 /* Sanyo CD-ROM (/dev/sjcd) */
+#define MAJOR_HIT 20 /* Hitachi CD-ROM (/dev/hitcd) */
+
+#define MAJOR_ACORN 21 /* Acorn MFM hard drives (/dev/mfm..) */
+#define MAJOR_IDE2 22 /* second IDE hard disk iface (/dev/hd..) */
+
+#define MAJOR_CDU 24 /* Sony CDU-535 CD-ROM (/dev/cdu535) */
+#define MAJOR_MAT 25 /* First Matsushita CD-ROM (/dev/sbpcd..) */
+#define MAJOR_MAT2 26 /* Second Matsushita CD-ROM (/dev/sbpcd..) */
+#define MAJOR_MAT3 27 /* Third Matsushita CD-ROM (/dev/sbpcd..) */
+#define MAJOR_MAT4 28 /* Fourth Matsushita CD-ROM (/dev/sbpcd..) */
+#define MAJOR_CM205 30 /* Philips LMS CM-205 CD-ROM (/dev/cm205cd) */
+#define MAJOR_CM206 32 /* Philips LMS CM-206 CD-ROM (/dev/cm206cd) */
+
+#define MAJOR_IDE3 33 /* third IDE hard disk iface (/dev/hd..) */
+#define MAJOR_IDE4 34 /* fourth IDE hard disk iface (/dev/hd..) */
+
+#define MAJOR_ESDI 36 /* PS/2 ESDI hard disk drives (obsolete) */
+#define MAJOR_FTL 44 /* Flash Transition Layer on Memory Technology Device */
+#define MAJOR_PP 45 /* Parallel Port IDE disk devices (/dev/pd..) */
+#define MAJOR_PPCD 46 /* Parallel Port ATAPI CD-ROM devices (/dev/pcd..) */
+#define MAJOR_PPFD 47 /* Parallel Port ATAPI floppy drive (/dev/pf..) */
+
+#define MAJOR_DAC 48 /* First Mylex DAC960 PCI RAID iface (/dev/rd/c0..) */
+#define MAJOR_DAC2 49 /* Second Mylex DAC960 PCI RAID iface (/dev/rd/c1..) */
+#define MAJOR_DAC3 50 /* Third Mylex DAC960 PCI RAID iface (/dev/rd/c2..) */
+#define MAJOR_DAC4 51 /* Fourth Mylex DAC960 PCI RAID iface (/dev/rd/c3..) */
+#define MAJOR_DAC5 52 /* Fifth Mylex DAC960 PCI RAID iface (/dev/rd/c4..) */
+#define MAJOR_DAC6 53 /* Sixth Mylex DAC960 PCI RAID iface (/dev/rd/c5..) */
+#define MAJOR_DAC7 54 /* Seventh Mylex DAC960 PCI RAID iface (/dev/rd/c6..) */
+#define MAJOR_DAC8 55 /* Eighth Mylex DAC960 PCI RAID iface (/dev/rd/c7..) */
+
+#define MAJOR_IDE5 56 /* fifth IDE hard disk iface (/dev/hd..) */
+#define MAJOR_IDE6 57 /* sixth IDE hard disk iface (/dev/hd..) */
+#define MAJOR_LVM 58 /* Logical Volume Manager block device */
+
+#define MAJOR_EXPR 60 /* Experimental devices (without official numbers) */
+#define MAJOR_EXPR2 61 /* Experimental devices (without official numbers) */
+#define MAJOR_EXPR3 62 /* Experimental devices (without official numbers) */
+#define MAJOR_EXPR4 63 /* Experimental devices (without official numbers) */
+
+#define MAJOR_SD_SORT 64 /*** MAJOR_SD converted to this for sorting ***/
+
+#define MAJOR_SD2 65 /* SCSI disks 16-31 (/dev/sd..) */
+#define MAJOR_SD3 66 /* SCSI disks 32-47 (/dev/sd..) */
+#define MAJOR_SD4 67 /* SCSI disks 48-63 (/dev/sd..) */
+#define MAJOR_SD5 68 /* SCSI disks 64-79 (/dev/sd..) */
+#define MAJOR_SD6 69 /* SCSI disks 80-95 (/dev/sd..) */
+#define MAJOR_SD7 70 /* SCSI disks 96-111 (/dev/sd..) */
+#define MAJOR_SD8 71 /* SCSI disks 112-127 (/dev/sd..) */
+
+#define MAJOR_SMART 72 /* First Compaq Smart/2 iface (/dev/ida/c0d..) */
+#define MAJOR_SMART2 73 /* Second Compaq Smart/2 iface (/dev/ida/c1d..) */
+#define MAJOR_SMART3 74 /* Third Compaq Smart/2 iface (/dev/ida/c1d..) */
+#define MAJOR_SMART4 75 /* Fourth Compaq Smart/2 iface (/dev/ida/c1d..) */
+#define MAJOR_SMART5 76 /* Fifth Compaq Smart/2 iface (/dev/ida/c1d..) */
+#define MAJOR_SMART6 77 /* Sixth Compaq Smart/2 iface (/dev/ida/c1d..) */
+#define MAJOR_SMART7 78 /* Seventh Compaq Smart/2 iface (/dev/ida/c1d..) */
+#define MAJOR_SMART8 79 /* Eighth Compaq Smart/2 iface (/dev/ida/c1d..) */
+
+#define MAJOR_I2O 80 /* First I2O hard disk iface (/dev/i2o/hd..) */
+#define MAJOR_I2O2 81 /* Second I2O hard disk iface (/dev/i2o/hd..) */
+#define MAJOR_I2O3 82 /* Third I2O hard disk iface (/dev/i2o/hd..) */
+#define MAJOR_I2O4 83 /* Fourth I2O hard disk iface (/dev/i2o/hd..) */
+#define MAJOR_I2O5 84 /* Fifth I2O hard disk iface (/dev/i2o/hd..) */
+#define MAJOR_I2O6 85 /* Sixth I2O hard disk iface (/dev/i2o/hd..) */
+#define MAJOR_I2O7 86 /* Seventh I2O hard disk iface (/dev/i2o/hd..) */
+#define MAJOR_I2O8 87 /* Eighth I2O hard disk iface (/dev/i2o/hd..) */
+
+#define MAJOR_IDE7 88 /* Seventh IDE hard disk iface (/dev/hd..) */
+#define MAJOR_IDE8 89 /* Eighth IDE hard disk iface (/dev/hd..) */
+#define MAJOR_IDE9 90 /* Ninth IDE hard disk iface (/dev/hd..) */
+#define MAJOR_IDE10 91 /* Tenth IDE hard disk iface (/dev/hd..) */
+
+#define MAJOR_PPDD 92 /* PPDD encrypted disks (not supported) */
+#define MAJOR_NFTL 93 /* NAND Flash Translation Layer (Disk-On-Chip) */
+#define MAJOR_DOC 100 /* Disk-On-Chip driver (obsolete) */
+#define MAJOR_AMI 101 /* AMI Hyper Disk RAID controller (/dev/amiraid/ar..) */
+
+#define MAJOR_CISS 104 /* First CCISS Drive Array iface (/dev/cciss/c0..) */
+#define MAJOR_CISS2 105 /* Second CCISS Drive Array iface (/dev/cciss/c1..) */
+#define MAJOR_CISS3 106 /* Third CCISS Drive Array iface (/dev/cciss/c2..) */
+#define MAJOR_CISS4 107 /* Fourth CCISS Drive Array iface (/dev/cciss/c3..) */
+#define MAJOR_CISS5 108 /* Fifth CCISS Drive Array iface (/dev/cciss/c4..) */
+#define MAJOR_CISS6 109 /* Sixth CCISS Drive Array iface (/dev/cciss/c5..) */
+#define MAJOR_CISS7 110 /* Seventh CCISS Drive Array iface (/dev/cciss/c6..) */
+#define MAJOR_CISS8 111 /* Seventh CCISS Drive Array iface (/dev/cciss/c7..) */
+
+#define MAJOR_IBM_ISER 112 /* IBM iSeries virtual disk (/dev/iseries/vd..) */
+#define MAJOR_HPT370 114 /* Software RAID interfaces e.g.HPT370 (/dev/ataraid/..) */
+#define MAJOR_EVMS 117 /* Enterprise Volume Management System (/dev/evms/EVM..) */
+
+#define MAJOR_EXPR5 120 /* Experimental devices (without official numbers) */
+#define MAJOR_EXPR6 121 /* Experimental devices (without official numbers) */
+#define MAJOR_EXPR7 122 /* Experimental devices (without official numbers) */
+#define MAJOR_EXPR8 123 /* Experimental devices (without official numbers) */
+#define MAJOR_EXPR9 124 /* Experimental devices (without official numbers) */
+#define MAJOR_EXPR10 125 /* Experimental devices (without official numbers) */
+#define MAJOR_EXPR11 126 /* Experimental devices (without official numbers) */
+#define MAJOR_EXPR12 127 /* Experimental devices (without official numbers) */
+
+#define MAJOR_SD9 128 /* SCSI disks 128-143 (/dev/sd..) */
+#define MAJOR_SD10 129 /* SCSI disks 144-159 (/dev/sd..) */
+#define MAJOR_SD11 130 /* SCSI disks 160-175 (/dev/sd..) */
+#define MAJOR_SD12 131 /* SCSI disks 176-191 (/dev/sd..) */
+#define MAJOR_SD13 132 /* SCSI disks 192-207 (/dev/sd..) */
+#define MAJOR_SD14 133 /* SCSI disks 208-223 (/dev/sd..) */
+#define MAJOR_SD15 134 /* SCSI disks 224-239 (/dev/sd..) */
+#define MAJOR_SD16 135 /* SCSI disks 240-255 (/dev/sd..) */
+
+#define MAJOR_DAC9 136 /* Ninth Mylex DAC960 PCI RAID iface (/dev/rd/c8..) */
+#define MAJOR_DAC10 137 /* Tenth Mylex DAC960 PCI RAID iface (/dev/rd/c9..) */
+#define MAJOR_DAC11 138 /* Eleventh Mylex DAC960 PCI RAID iface (/dev/rd/c10..) */
+#define MAJOR_DAC12 139 /* Twelfth Mylex DAC960 PCI RAID iface (/dev/rd/c11..) */
+#define MAJOR_DAC13 140 /* Thirteenth Mylex DAC960 PCI RAID iface (/dev/rd/c12..) */
+#define MAJOR_DAC14 141 /* Fourteenth Mylex DAC960 PCI RAID iface (/dev/rd/c13..) */
+#define MAJOR_DAC15 142 /* Fifteenth Mylex DAC960 PCI RAID iface (/dev/rd/c14..) */
+#define MAJOR_DAC16 143 /* Sixteenth Mylex DAC960 PCI RAID iface (/dev/rd/c15..) */
+
+#define MAJOR_EMD 153 /* Enhanced multi-disk RAID sets (/dev/emd/..) */
+#define MAJOR_CARM1 160 /* First Carmel SATA Disk controller (/dev/carmel/..) */
+#define MAJOR_CARM2 161 /* Second Carmel SATA Disk controller (/dev/carmel/..) */
+#define MAJOR_MMC 179 /* MMC card block devices (/dev/mmcblk..) */
+#define MAJOR_USB 180 /* USB block devices (/dev/ub..) */
+
+#define MAJOR_VXDSK 199 /* Veritas volume manager (VxVM) volumes (/dev/vx/dsk/..) */
+#define MAJOR_VXDMP 201 /* Veritas VxVM dynamic multipath devices (/dev/vx/dmp/..) */
+#define MAJOR_XVD 202 /* Xen Virtual Block Device Disks (/dev/xv..) */
/* don't use the following */
-#define MAJOR_MDP 254 /* Enhanced multi-disk RAID sets [experimental?] */
+#define MAJOR_MDP 254 /* Enhanced multi-disk RAID sets [experimental] */
/* high partitions (>15) on SATA hard disks */
-#define MAJOR_SATA1 259 /* high SATA disk partitions */
-#define MAJOR_SATA2 260 /* high SATA disk partitions */
+#define MAJOR_SATA1 259 /* high SATA disk partitions (Block Extended Major) */
+#define MAJOR_SATA2 260 /* high SATA disk partitions (Block Extended Major) (obsolete) */
+
-#define MAX_TOKEN 1023 /* max device Token length */
-#define MAX_IMAGE_NAME 15 /* maximum name length (w/o terminating NUL) */
-#define MAX_DESCR_SECTORS 12 /* upper limit on MAX_DESCR_SECS */
+#define MAX_TOKEN 1023 /* max device Token length */
+#define MAX_IMAGE_NAME 15 /* maximum name length (w/o terminating NUL) */
+#define MAX_DESCR_SECTORS 12 /* upper limit on MAX_DESCR_SECS */
#ifdef LCF_PASS160
#undef SHS_PASSWORDS
-#define SHS_PASSWORDS /* use this one if SHS passwords are in use */
-#define MAX_PW_CRC 5 /* max # of longwords in password digest */
-#define PW_FILE_SUFFIX ".shs" /* suffix for the file that saves password digest */
+#define SHS_PASSWORDS /* use this one if SHS passwords are in use */
+#define MAX_PW_CRC 5 /* max # of longwords in password digest */
+#define PW_FILE_SUFFIX ".shs" /* suffix for the file that saves password digest */
#else
-#define CRC_PASSWORDS /* use this one if CRC passwords are in use */
-#define MAX_PW_CRC 2 /* max # of CRC-32's in password */
-#define PW_FILE_SUFFIX ".crc" /* suffix for the file that saves password CRC's */
+#define CRC_PASSWORDS /* use this one if CRC passwords are in use */
+#define MAX_PW_CRC 2 /* max # of CRC-32's in password */
+#define PW_FILE_SUFFIX ".crc" /* suffix for the file that saves password CRC's */
#endif
#ifdef LCF_DSECS
*
* Copyright 1992-1998 Werner Almesberger
* Copyright 1999-2005 John Coffman
- * Copyright 2009-2013 Joachim Wiedorn
+ * Copyright 2009-2014 Joachim Wiedorn
* All rights reserved.
*
* Licensed under the terms contained in the file 'COPYING'
dos ? " A DOS/Windows system may be rendered unbootable."
"\n The backup copy of this boot sector should be retained."
: "" );
+ fprintf (errstd, "I will assume that you know what you're doing and I will proceed.\n");
#if 0
if (!dos && !cfg_get_flag(cf_options,"ignore-table"))
die("You may proceed by using either '-P ignore' or 'ignore-table'");
-#else
- if (!yesno("\nProceed? ", 0)) exit(0);
#endif
}
cyl = part_table[part].cyl+((part_table[part].sector >> 6) << 8);
/* version.h
*
* Copyright 2005-2007 John Coffman
- * Copyright 2009-2013 Joachim Wiedorn
+ * Copyright 2009-2014 Joachim Wiedorn
* All rights reserved.
*
* Licensed under the terms contained in the file 'COPYING'
#define VERSION_H
#define VERSION_MAJOR 24
-#define VERSION_MINOR 0
+#define VERSION_MINOR 1
#define VERSION_EDIT ""
-#define VERSION_DATE "07-Juni-2013"
+#define VERSION_DATE "17-October-2014"
#endif