Imported Upstream version 24.1 upstream/24.1
authorJoachim Wiedorn <ad_debian@joonet.de>
Fri, 17 Oct 2014 00:09:37 +0000 (02:09 +0200)
committerJoachim Wiedorn <ad_debian@joonet.de>
Fri, 17 Oct 2014 00:09:37 +0000 (02:09 +0200)
37 files changed:
CHANGELOG
Makefile
NEWS
TOOLS
doc/README
doc/html/user_21-5.html
dos/Makefile
hooks/Makefile
hooks/initramfs/post-update.d/runlilo
hooks/kernel/postinst.d/chattr-lilo [new file with mode: 0644]
hooks/kernel/postinst.d/zz-runlilo
hooks/kernel/postrm.d/zz-runlilo
hooks/kernel/preinst.d/chattr-lilo [new file with mode: 0644]
hooks/kernel/prerm.d/chattr-lilo [new file with mode: 0644]
images/Makefile
lilo.lsm
man/Makefile
man/lilo-uuid-diskid.8
man/lilo-uuid-diskid.pod
man/lilo.8
man/lilo.conf.5
man/lilo.pod
man/liloconfig.8
man/liloconfig.pod
man/pod2manpage
sample/Makefile
sample/lilo.example.conf
scripts/Makefile
scripts/lilo-uuid-diskid
scripts/liloconfig
src/Makefile
src/device.c
src/geometry.c
src/lilo.c
src/lilo.h
src/partition.c
src/version.h

index b4684122421cb8d08215e5e3d53341265f8833ad..b9a3bc761a77ae9cef5ced255588119cb73f9497 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,4 +1,36 @@
-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
   --------------
 
   Documentations
   --------------
@@ -16,7 +48,7 @@ Changes for version 24.0 (unreleased) - Joachim Wiedorn
   -------
     - Support for kernel images on GPT hard disks in the first 15
         partitions, otherwise set comments (src/geometry.c, src/lilo.h)
   -------
     - 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
   -------
 
   General
   -------
index f135b425091e4ecc53527952b8e0e805e3ce5f60..c7f931c934cf4e7aba5f181a0f7f49d2fe4bd4bb 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,12 +1,19 @@
 # -*- makefile -*-
 #
 # -*- 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.
 #
 
 # 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
 #
 #
 #  make help
 #
@@ -33,13 +40,6 @@ help:
        @echo "  make distclean   # remove editor temps, & all of the above"
        @echo ""
 
        @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
 #
 #
 # everything above plus the statically linked version
 #
diff --git a/NEWS b/NEWS
index 83b9b212dc296ecf1a84580ce407bfa781694ff0..bf32875c1406c31d7d0baacc8c677874f28504c2 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,19 @@ NEWS about project LILO
 (For details see file 'CHANGELOG' in the source directory)
 
 
 (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.
 Version 24.0  (major and bugfix update of 23.2)
 
  o Update many manpages and add some from Debian.
diff --git a/TOOLS b/TOOLS
index ff3427d4e93edf26d423c779cfb6e6a81894e02c..de534403df83659fa6e87fed2a58449cb3562d65 100644 (file)
--- a/TOOLS
+++ b/TOOLS
@@ -14,9 +14,9 @@ bcc            0.16.14        0.16.17        bcc
                      
 bin86          0.16.14        0.16.17        as86, ld86
                      
                      
 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
 
                      
 perl           5.8.4          5.14.2         pod2man
 
index e7c2cc84780e4587fd5a1e19a50989d0fda32160..ba9f1a60f1ee78053cc434b0ff1361e17c3b5e97 100644 (file)
@@ -16,7 +16,7 @@ are only necessary when processing the technical overview document.
 
 To run LaTeX just type
 
 
 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
 
 LaTeX issues many "Overfull \hbox" warnings. They can be safely ignored.
 LaTeX will be run repeatedly until it stops issuing the message
index 61cc50f544b86fb96929ca03f6deaf8edc3306a5..614dc49e1d4b9ec3d6e912531b2655771b084bde 100644 (file)
@@ -3328,11 +3328,11 @@ class="description">Makes image name matching case-insensitive, i.e. &#8220;linu
      </dd><dt class="description">
 <span 
 class="cmtt-10x-x-109">LARGE</span><span 
      </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&#x00A0;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="description">Loads LILO&#x00A0;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 &#8220;small&#8221; images (e.g. &#8220;Image&#8221; or &#8220;zImage&#8221;).
      </dd><dt class="description">
 <span 
      reduces the maximum size of &#8220;small&#8221; images (e.g. &#8220;Image&#8221; or &#8220;zImage&#8221;).
      </dd><dt class="description">
 <span 
@@ -3858,7 +3858,7 @@ class="description">&#x00A0;<br
 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="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&#x00A0;would overwrite itself when trying to load such a kernel. This limitation
+class="cmtt-10x-x-109">_EBDA</span>). LILO&#x00A0;would overwrite itself when trying to load such a kernel. This limitation
      only applies to old kernels which are loaded below 0x10000 (e.g. &#8220;Image&#8221; or &#8220;zImage&#8221;). Try
      building the kernel with &#8220;bzImage&#8221;. 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
      only applies to old kernels which are loaded below 0x10000 (e.g. &#8220;Image&#8221; or &#8220;zImage&#8221;). Try
      building the kernel with &#8220;bzImage&#8221;. 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
index 1481da1e5432841feac20c809372dfab44d762c0..3340f2c78291ad394293f5fd94c9856385be1042 100644 (file)
@@ -1,4 +1,11 @@
 # -*- makefile -*-
 # -*- 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 for BCC compilation of 'lilo.com'
 #
 # Known to work with BCC version 0.16.15
index d8a01ffcf53f841e0771140c38f9bc1d2449b6fb..3aeb0684fd8aff61ad54a412e01bb835fb70a35d 100644 (file)
@@ -1,27 +1,51 @@
 # -*- makefile -*-
 # -*- 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
 
 
 # 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:
 
 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)
        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)
        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:
 
 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
        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
index 100cfed43cd6382d91834bf9b654ebadb98b4bcc..72b8f3b703626fcb9db2ee57ee65d6b8c134479d 100644 (file)
@@ -2,7 +2,7 @@
 #
 #  runlilo - postupdate script for modern initrd management
 #
 #
 #  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'
 #  All rights reserved.
 #
 #  Licensed under the terms contained in the file 'COPYING'
@@ -26,9 +26,10 @@ case "$PAR" in
 
   *)
     # Run the boot loader installer
 
   *)
     # Run the boot loader installer
+    # and ignore error on degraded mdadm RAID1
     if [ -f /sbin/lilo ];then
       if [ -f /etc/lilo.conf ];then
     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
       else
         echo "Warning: Not updating LILO; /etc/lilo.conf not found!" >&2
       fi
diff --git a/hooks/kernel/postinst.d/chattr-lilo b/hooks/kernel/postinst.d/chattr-lilo
new file mode 100644 (file)
index 0000000..dd2025a
--- /dev/null
@@ -0,0 +1,38 @@
+#!/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
index f7c39b1d357400ec317c8f22a5812d2f3c0ad33b..6fbd25585bfd49c1779d8d778e77bf16e151b4ca 100644 (file)
@@ -2,7 +2,7 @@
 #
 #  zz-runlilo - postinst script for modern kernel management
 #
 #
 #  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'
 #  All rights reserved.
 #
 #  Licensed under the terms contained in the file 'COPYING'
@@ -24,9 +24,10 @@ case "$PAR" in
 
   ever|configure)
     # Run the boot loader installer
 
   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
     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
       else
         echo "Warning: Not updating LILO; /etc/lilo.conf not found!"  >&2
       fi
index 671c16463110ab135a794118b97d85d6248def0c..c85bc4ab407aa1d277f85b63978a42dca4c37656 100644 (file)
@@ -2,7 +2,7 @@
 #
 #  zz-runlilo - postrm script for modern kernel management
 #
 #
 #  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'
 #  All rights reserved.
 #
 #  Licensed under the terms contained in the file 'COPYING'
@@ -24,10 +24,11 @@ case "$PAR" in
 
   ever|remove)
     # Run the boot loader installer
 
   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
     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
     ;;
       fi
     fi
     ;;
diff --git a/hooks/kernel/preinst.d/chattr-lilo b/hooks/kernel/preinst.d/chattr-lilo
new file mode 100644 (file)
index 0000000..4ae42a7
--- /dev/null
@@ -0,0 +1,38 @@
+#!/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
diff --git a/hooks/kernel/prerm.d/chattr-lilo b/hooks/kernel/prerm.d/chattr-lilo
new file mode 100644 (file)
index 0000000..0fa5117
--- /dev/null
@@ -0,0 +1,38 @@
+#!/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
index 93ce46dcebc17a2f30e3fb4b58798170ea5c8a6f..a4c2186ec51e0dcc3c3133cd0128e80b9160ce25 100644 (file)
@@ -1,4 +1,11 @@
 # -*- makefile -*-
 # -*- 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
 
 # adding variables
 include ../make.vars
@@ -6,6 +13,8 @@ include ../make.vars
 BINLILO := ../src/lilo
 BMPS8 := coffee.bmp
 BMPS4 := debian.bmp debian-de.bmp debianlilo.bmp inside.bmp onlyblue.bmp tuxlogo.bmp
 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)
 
 
 all: $(BMPS4) $(BMPS8)
@@ -21,6 +30,12 @@ $(BMPS8): %.bmp: %_256c.uu
 install: all
        mkdir -p $$DESTDIR$(BOOT_DIR)
        install -m 0644  $(BMPS4) $(BMPS8)  $$DESTDIR$(BOOT_DIR)
 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)
 
 clean:
        rm -f $(BMPS4) $(BMPS8)
@@ -29,4 +44,7 @@ distclean: clean
 
 uninstall:
        (cd $$DESTDIR$(BOOT_DIR); 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
 
 
index 63d11b545152c13df22a36f20890d3ffb3e597e6..0fd040b47d275c10c8b5ca8cecb0aedbe459659b 100644 (file)
--- a/lilo.lsm
+++ b/lilo.lsm
@@ -1,7 +1,7 @@
 Begin4
 Title:                 LILO
 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
 Description:   Generic boot loader for Linux. Distribution 
                includes full source, documentation and support files.  
 Keywords:              Linux, boot loader, LILO
@@ -10,7 +10,7 @@ Maintained-by:        Joachim Wiedorn <ad_debian@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)
 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.
 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.
index a980969a172bb7361e976c43468273a4d8d3a558..b6d2310a1cb8df08a0a97a6d7e271c898f2809eb 100644 (file)
@@ -1,5 +1,11 @@
-#!/usr/bin/make -f
 # -*- makefile -*-
 # -*- 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
 
 # adding variables
 include ../make.vars
index facfd7be5a724564f5bb573ec10387e3bd6179d9..13aa424981e9c2732f508fe6f76c959c6bd68c1b 100644 (file)
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07)
+.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
 .\"
 .\" Standard preamble:
 .\" ========================================================================
 .\"
 .\" Standard preamble:
 .\" ========================================================================
@@ -62,7 +62,7 @@
 .\" ========================================================================
 .\"
 .IX Title "LILO-UUID-DISKID 8"
 .\" ========================================================================
 .\"
 .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
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -98,11 +98,11 @@ Lines in the configuration file /etc/lilo.conf:
 \&  boot = /dev/disk/by\-id/ata\-SAMSUNG_SV1604N_S01FJ10X999999
 \&
 \&  #root = /dev/sda1
 \&  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"
 .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 
 .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 
@@ -112,7 +112,7 @@ the Free Software Foundation; either version 2 of the License, or
 .IX Header "AUTHOR"
 \&\fBlilo-uuid-diskid\fR was written by Joachim Wiedorn.
 .PP
 .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)
 .SH "SEE ALSO"
 .IX Header "SEE ALSO"
 \&\fBlilo\fR(8), \fBupdate-lilo\fR(8), \fBliloconfig\fR(8)
index 3d43ba1bbbf2fc7fc8aad967309ef31181f939dd..27fb4b990dbb24e848f14ebe9e4463d0a493ffb4 100644 (file)
@@ -2,8 +2,8 @@
 manpage:  LILO-UUID-DISKID
 section:  8
 title:    lilo documentation
 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
 
 
 =encoding utf8
 
@@ -47,11 +47,11 @@ Lines in the configuration file /etc/lilo.conf:
   boot = /dev/disk/by-id/ata-SAMSUNG_SV1604N_S01FJ10X999999
 
   #root = /dev/sda1
   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
 
 
 =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 
 
 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 
@@ -62,7 +62,7 @@ the Free Software Foundation; either version 2 of the License, or
 
 B<lilo-uuid-diskid> was written by Joachim Wiedorn.
 
 
 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
 
 
 =head1 SEE ALSO
 
index 02512f47124eb8998da23d588971f17a9a9e3b6d..c16e6da92e148285ad90d4791917a8751d15d511 100644 (file)
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07)
+.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
 .\"
 .\" Standard preamble:
 .\" ========================================================================
 .\"
 .\" Standard preamble:
 .\" ========================================================================
@@ -62,7 +62,7 @@
 .\" ========================================================================
 .\"
 .IX Title "LILO 8"
 .\" ========================================================================
 .\"
 .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
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -107,18 +107,18 @@ override the configuration file, may be specified  on the command line.
 .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;
 .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
 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
 (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
 .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"
 as boot device.
 .IP "\fB\-B\fR \fIbitmap-file\fR" 4
 .IX Item "-B bitmap-file"
@@ -204,7 +204,7 @@ table on master-device is undisturbed. If no valid Volume-ID (serial number) is
 present, then generate one and write it to the \s-1MBR\s0. If \fImbr\fR is set, the
 Standard Master Boot Loader will search partitions 1\-4 for an active flag, and
 boot the flagged partition. Only one active flag is allowed. If \fIext\fR is set,
 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
 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
@@ -248,6 +248,13 @@ executes. After execution the boot loader will erase this line because it is a
 once-only command. It is typically used in reboot scripts, just before calling
 \&'shutdown \-r'. Used without any arguments, it will cancel a \fIlock\fR\-ed or
 \&\fIfallback\fR command line.
 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
 .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
@@ -323,12 +330,12 @@ versions. The line beginning \*(L"CFLAGS=\*(R" will contain the compiler options
 generate this version of \s-1LILO\s0.
 .IP "\fB\-z\fR" 4
 .IX Item "-z"
 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
 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"
 .Ve
 .IP "\fB\-Z\fR \fIoption\fR" 4
 .IX Item "-Z option"
@@ -446,11 +453,11 @@ It is best to use the  default mechanism, as it works correctly in all cases.
 .Vb 3
 \& Copyright (C) 1992\-1998 Werner Almesberger
 \& Copyright (C) 1999\-2007 John Coffman
 .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
 .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"
 the \s-1COPYING\s0 file.
 .SH "AUTHOR"
 .IX Header "AUTHOR"
@@ -463,12 +470,12 @@ the \s-1COPYING\s0 file.
 .Ve
 .PP
 This manual page was written by Werner Almesberger and Joachim Wiedorn
 .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),
 .SH "SEE ALSO"
 .IX Header "SEE ALSO"
 \&\fBlilo.conf\fR(5),
-\&\fBliloconfig\fR(8), 
+\&\fBliloconfig\fR(8),
 \&\fBlilo-uuid-diskid\fR(8),
 \&\fBlilo-uuid-diskid\fR(8),
-\&\fBmkrescue\fR(8), 
+\&\fBmkrescue\fR(8),
 \&\fBfdisk\fR(8),
 \&\fBmkinitrd\fR(8)
 \&\fBfdisk\fR(8),
 \&\fBmkinitrd\fR(8)
index 557646b5a331f4165453413272d19c4541d30413..d0e16c1cafb325c6e03c4a1808763bf6c6a13aad 100644 (file)
@@ -19,7 +19,7 @@
 .\" this software without specific prior written permission. This work
 .\" is provided "as is" and without any express or implied warranties.
 .\"
 .\" 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
 .SH NAME
 lilo.conf \- configuration file for lilo
 .SH DESCRIPTION
@@ -72,7 +72,7 @@ other=/dev/hdb5
 This configuration file specifies that lilo uses the Master
 Boot Record on /dev/hda. (For a discussion of the various ways
 to use lilo, and the interaction with other operating systems,
 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:"
 .LP
 When booting, the boot loader will issue its 
 .I "boot:"
@@ -97,8 +97,9 @@ An option in an image description will override a global option.
 Comment lines may appear anywhere, and begin with the "#" character.
 
 .SH "GLOBAL OPTIONS"
 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
 .TP
 .BI "backup=" <backup-file>
 Specifies the location where a copy of any modified boot sector will be
@@ -231,7 +232,8 @@ rules are sufficient.  The strings which define the partition types
 are used in a
 .I change
 section (see below), with the suffixes "_normal" or "_hidden" appended.
 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 
 .TP
 .BI "compact"
 Tries to merge read requests for adjacent sectors into a single 
@@ -260,8 +262,8 @@ keys ALT, CTRL, or SHIFT, when held down, are taken as interrupts.
 This action is modified by specifying `prompt' (see below).
 .TP
 .BI "disk=" <device-name>
 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.
 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.
index 602c8579a87620e310ea65a53918dbccf7683043..39e6f684d47435ca376d66f9544bdd29c3183a2b 100644 (file)
@@ -2,8 +2,8 @@
 manpage:  LILO
 section:  8
 title:    lilo documentation
 manpage:  LILO
 section:  8
 title:    lilo documentation
-version:  23.3
-datum:    2013-05-01
+version:  24.1
+datum:    2014-10-15
 
 =encoding utf8
 
 
 =encoding utf8
 
@@ -44,19 +44,19 @@ override the configuration file, may be specified  on the command line.
 =item B<-A> I<master-device [N]>
 
 Used with a single argument, inquire of active partition on device I<master-device>;
 =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
 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
 (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
 
 =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>
 as boot device.
 
 =item B<-B> I<bitmap-file>
@@ -157,7 +157,7 @@ table on master-device is undisturbed. If no valid Volume-ID (serial number) is
 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,
 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.
 
 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.
 
@@ -207,6 +207,13 @@ once-only command. It is typically used in reboot scripts, just before calling
 'shutdown -r'. Used without any arguments, it will cancel a I<lock>-ed or
 I<fallback> command line.
 
 '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<-s> I<save-file>
 
 When lilo writes a new boot sector, it preserves the former contents of the boot
@@ -291,11 +298,11 @@ generate this version of LILO.
 
 =item B<-z>
 
 
 =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:
 
 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>
 
 
 =item B<-Z> I<option>
 
@@ -422,10 +429,10 @@ It is best to use the  default mechanism, as it works correctly in all cases.
 
  Copyright (C) 1992-1998 Werner Almesberger
  Copyright (C) 1999-2007 John Coffman
 
  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
 the COPYING file.
 
 =head1 AUTHOR
@@ -437,14 +444,14 @@ B<lilo> was written by:
  Joachim Wiedorn (since version 23.0).
 
 This manual page was written by Werner Almesberger and Joachim Wiedorn
  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),
 
 =head1 SEE ALSO
 
 B<lilo.conf>(5),
-B<liloconfig>(8), 
+B<liloconfig>(8),
 B<lilo-uuid-diskid>(8),
 B<lilo-uuid-diskid>(8),
-B<mkrescue>(8), 
+B<mkrescue>(8),
 B<fdisk>(8),
 B<mkinitrd>(8)
 
 B<fdisk>(8),
 B<mkinitrd>(8)
 
index 2ce52a182b28898e7c1d60a1fa3ad05f0a70fe47..b11d2dd9faa685c5571d07456dbba5ae2b7abea5 100644 (file)
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07)
+.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
 .\"
 .\" Standard preamble:
 .\" ========================================================================
 .\"
 .\" Standard preamble:
 .\" ========================================================================
@@ -62,7 +62,7 @@
 .\" ========================================================================
 .\"
 .IX Title "LILOCONFIG 8"
 .\" ========================================================================
 .\"
 .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
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -71,7 +71,7 @@
 liloconfig \- create new lilo.conf file (with diskid and uuid)
 .SH "SYNOPSIS"
 .IX Header "SYNOPSIS"
 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.
 .SH "DESCRIPTION"
 .IX Header "DESCRIPTION"
 liloconfig is an simple program for creating a new lilo.conf file.
@@ -79,6 +79,12 @@ After creating the new configuration file you must execute '/sbin/lilo'.
 .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
 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
 .SH "OPTIONS"
 .IX Header "OPTIONS"
 .IP "\fB\-h\fR" 4
@@ -90,6 +96,9 @@ Print verbose messages.
 .IP "\fB\-f\fR" 4
 .IX Item "-f"
 Force overriding existing lilo.conf.
 .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:
 .SH "EXAMPLES"
 .IX Header "EXAMPLES"
 Lines in the configuration file /etc/lilo.conf:
@@ -100,6 +109,8 @@ Lines in the configuration file /etc/lilo.conf:
 \&  #large\-memory
 \&  lba32
 \&  boot = /dev/sda
 \&  #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
 \&  map = /boot/map
 \&  install = menu
 \&  menu\-scheme = Wb:Yr:Wb:Wb
@@ -113,20 +124,20 @@ Lines in the configuration file /etc/lilo.conf:
 \&  #boot = /dev/sda
 \&  boot = /dev/disk/by\-id/ata\-SAMSUNG_SV1604N_S01FJ10X999999
 \&
 \&  #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
 \&      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
 \&      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
 \&
 \&  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
 \&      read\-only
 \&  #   restricted
 \&  #   alias = 2
@@ -135,7 +146,7 @@ Lines in the configuration file /etc/lilo.conf:
 .Ve
 .SH "COPYRIGHT and LICENSE"
 .IX Header "COPYRIGHT and LICENSE"
 .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 
 .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 
@@ -145,7 +156,7 @@ the Free Software Foundation; either version 2 of the License, or
 .IX Header "AUTHOR"
 \&\fBlilconfig\fR was written by Joachim Wiedorn.
 .PP
 .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)
 .SH "SEE ALSO"
 .IX Header "SEE ALSO"
 \&\fBlilo\fR(8), \fBupdate-lilo\fR(8), \fBlilo-uuid-diskid\fR(8)
index a00e67296cec99feb8712a242273a4ccff9e7caf..ce1b31a3709ed6506d1f4811924e38afce797642 100644 (file)
@@ -2,8 +2,8 @@
 manpage:  LILOCONFIG
 section:  8
 title:    liloconfig documentation
 manpage:  LILOCONFIG
 section:  8
 title:    liloconfig documentation
-version:  23.3
-datum:    2013-05-01
+version:  24.1
+datum:    2014-10-13
 
 =encoding utf8
 
 
 =encoding utf8
 
@@ -13,7 +13,7 @@ liloconfig - create new lilo.conf file (with diskid and uuid)
 
 =head1 SYNOPSIS
 
 
 =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
 
 
 =head1 DESCRIPTION
 
@@ -23,6 +23,12 @@ After creating the new configuration file you must execute '/sbin/lilo'.
 liloconfig use the lilo.example.conf file as template. In the final
 lilo.conf file you find many useful comments for custom changes.
 
 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
 =head1 OPTIONS
 
 =over 4
@@ -39,6 +45,10 @@ Print verbose messages.
 
 Force overriding existing lilo.conf.
 
 
 Force overriding existing lilo.conf.
 
+=item B<-u>
+
+Force overriding/update of boot line in lilo.conf.
+
 =back
 
 =head1 EXAMPLES
 =back
 
 =head1 EXAMPLES
@@ -50,6 +60,8 @@ Lines in the configuration file /etc/lilo.conf:
   #large-memory
   lba32
   boot = /dev/sda
   #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
   map = /boot/map
   install = menu
   menu-scheme = Wb:Yr:Wb:Wb
@@ -63,20 +75,20 @@ Lines in the configuration file /etc/lilo.conf:
   #boot = /dev/sda
   boot = /dev/disk/by-id/ata-SAMSUNG_SV1604N_S01FJ10X999999
 
   #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
       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
       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
 
   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
       read-only
   #   restricted
   #   alias = 2
@@ -85,7 +97,7 @@ Lines in the configuration file /etc/lilo.conf:
 
 =head1 COPYRIGHT and LICENSE
 
 
 =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 
 
 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 
@@ -96,7 +108,7 @@ the Free Software Foundation; either version 2 of the License, or
 
 B<lilconfig> was written by Joachim Wiedorn.
 
 
 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
 
 
 =head1 SEE ALSO
 
index c98936d7e25778ab28d1afdbb2504ae1731851b1..43f61e3c26ce622c569695898753ac8c7fe4f6df 100644 (file)
@@ -1,8 +1,8 @@
-#!/bin/bash
+#!/bin/sh
 #
 #       pod2manpage  -  convert pod file into manual page
 #       
 #
 #       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
 #       
 #       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
index aaf167034f06f716508589fc142fa450a55d6aea..c07ffcaab0a282daf3540e9ae58e9cd5ba52a7b3 100644 (file)
@@ -1,4 +1,11 @@
 # -*- makefile -*-
 # -*- 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
 
 # adding variables
 include ../make.vars
index b82bcf7a10dbaecb4e37cd48244692330e1b2546..3bc6724034064eeba38d2eac1026fc77e832aadc 100644 (file)
 # partitions above 1024 cylinders.
 lba32
 
 # 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
 
 # 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
 
 # This option may be needed for some software RAID installs.
 #raid-extra-boot = mbr-only
 
@@ -138,19 +144,19 @@ vga = normal
 # on other partitions, too.
 
 # first example (default)
 # on other partitions, too.
 
 # first example (default)
-image = /boot/vmlinuz-2.6.32-2-generic
+image = /boot/vmlinuz-3.12-1-generic
        label = "Linux"
        label = "Linux"
-       root = /dev/sda2
+#      root = /dev/sda2
        read-only
 #      restricted
 #      alias = 1
 #      optional
        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
 
 # 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
        read-only
 #      restricted
 #      alias = 2
@@ -160,7 +166,7 @@ image = /boot/vmlinuz-2.6.32-1-generic
 # third example
 image = /mnt/testsystem/boot/vmlinuz-2.6.26-1-custom
        label = "Testsystem"
 # 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
        read-only
 #      restricted
 #      alias = 3
@@ -173,7 +179,7 @@ image = /mnt/testsystem/boot/vmlinuz-2.6.26-1-custom
 # system.
 
 other = /dev/sda1
 # system.
 
 other = /dev/sda1
-       label = "Windows XP"
+       label = "MS-Windows"
 #      restricted
 #      alias = 4
 
 #      restricted
 #      alias = 4
 
@@ -183,7 +189,7 @@ other = /dev/sdb2
 #      alias = 5
 
 other = /dev/sdb3
 #      alias = 5
 
 other = /dev/sdb3
-       label = "Windows 2003"
+       label = "FreeBSD"
 #      restricted
 #      alias = 6
        boot-as = 0x80
 #      restricted
 #      alias = 6
        boot-as = 0x80
index 93345615d8e8e137d3605d40a607dda3fffa4652..b59391e92cecd8c2ba2aa8495939b4ec25f2988c 100644 (file)
@@ -1,4 +1,11 @@
 # -*- makefile -*-
 # -*- 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
 
 # adding variables
 include ../make.vars
index ab03744ade7667fe80525a48ea1e8496eb45a7e6..60866b9849bae06346bbb73054af082aeb4c7a31 100644 (file)
@@ -3,7 +3,7 @@
 #       lilo-uuid-diskid - convert boot and root options to diskid
 #                          and uuid in /etc/lilo.conf
 #
 #       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
 #       
 #       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#.*/##;
 #---- global variables
 my $prog = $0;
 $prog =~ s#.*/##;
-my $version = "0.3";
+my $version = "0.4";
 
 #---- parameter check
 our $opt_h = 0;
 
 #---- parameter check
 our $opt_h = 0;
@@ -42,7 +42,8 @@ pod2usage(1) if $opt_h;
 
 #---- other variables
 our $liloconf = "/etc/lilo.conf";
 
 #---- 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";
 our $fstabconf = "/etc/fstab";
 our $idpath = "/dev/disk/by-id";
 our $uuidpath = "/dev/disk/by-uuid";
@@ -64,11 +65,12 @@ sub main {
        }
 
        if (-f $liloconf) {
        }
 
        if (-f $liloconf) {
-               $liloconfold = $liloconf . "_old";
+               $liloconfold = $liloconf . ".old";
+               $liloconfnew = $liloconf . ".new";
                $exit = convert_lilo_conf();
        }
        else {
                $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;
                $exit = 1;
        }
        return $exit;
@@ -85,7 +87,7 @@ sub convert_lilo_conf {
 
        # at first read lilo.conf and search for 'boot'
        my $ok = 0;
 
        # 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);
 
        @sellines = grep(/^#?boot/, readline(MYFH));
        close(MYFH);
 
@@ -113,7 +115,7 @@ sub convert_lilo_conf {
                                write_boot_option();
                        }
                        else {
                                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;
                        }
                }
                                $exit = 1;
                        }
                }
@@ -122,7 +124,7 @@ sub convert_lilo_conf {
                }
        }
        else {
                }
        }
        else {
-               print "cannot use $liloconf: uncomplete configuration!\n";
+               print "E: cannot use $liloconf: uncomplete configuration!\n";
                $exit = 1;
        }
 
                $exit = 1;
        }
 
@@ -151,12 +153,12 @@ sub detect_boot_device {
                # found only ^#boot in lilo.conf, then /etc/fstab is needed
                if (-f $fstabconf) {
                        if($opt_v) {
                # 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 {
                        }
                        $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;
                }
        }
                        $exit = 1;
                }
        }
@@ -165,11 +167,11 @@ sub detect_boot_device {
                if($boot_disk =~ /$idpath/ 
                                or $boot_disk =~ /$uuidpath/
                                or $boot_disk =~ /$labpath/) {
                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 {
                        $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;
 
                        # is it a block device name ?
                        $_part = $boot_disk;
@@ -181,7 +183,7 @@ sub detect_boot_device {
                }
        }
        else {
                }
        }
        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;
                $exit = 1;
        }
        return $exit;
@@ -257,7 +259,7 @@ sub detect_root_device {
 
        # check if root device exist / also for raid volume
        if (-b $root_disk) {
 
        # 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_id = find_id_link($root_disk,$uuidpath);
                if (not -l "$uuidpath/$root_id") { $exit = 1; }
        }
@@ -269,7 +271,7 @@ sub detect_root_device {
                $root_link =~ s{^LABEL=}{/dev/disk/by-label/};
                $root_link =~ s{^UUID=}{/dev/disk/by-uuid/};
                if (not -l $root_link) {
                $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;
                }
        }
        return $exit;
@@ -285,7 +287,7 @@ sub find_id_link {
        my $newdevid = '';
        my $ok = 0;
 
        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);
        @sellinks = grep(!/\-part\d\d?$/, grep(!/^\.\.?$/, readdir(MYDH)));
        @sellinks = sort(@sellinks);
        closedir(MYDH);
@@ -305,7 +307,7 @@ sub find_id_link {
                }
        }
 
                }
        }
 
-       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);
 }
        
        return ($newdevid);
 }
@@ -329,8 +331,8 @@ sub write_boot_option {
                # copy all lines from lilo.conf_old into
                # new lilo.conf and add 'boot=' line
                my $ok = 0;
                # 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
 
                while (<MYFH_OLD>) {
                        # line read from MYFH_OLD
@@ -381,7 +383,7 @@ sub write_boot_option {
                chmod (0600,$liloconf);
        }
        else {
                chmod (0600,$liloconf);
        }
        else {
-               print "file $liloconf does not exist: nothing changed\n";
+               print "W: file $liloconf does not exist: nothing changed!\n";
        }
 }
 
        }
 }
 
@@ -424,7 +426,7 @@ lilo-uuid-diskid - convert boot / root options to diskid and uuid in lilo.conf
 
 =head1 SYNOPSIS
 
 
 =head1 SYNOPSIS
 
-lilo-uuid-diskid [-h] [-v] [lilo.conf]
+B<lilo-uuid-diskid> [B<-h>] [B<-v>] [B<lilo.conf>]
 
 =head1 DESCRIPTION
 
 
 =head1 DESCRIPTION
 
@@ -436,16 +438,6 @@ These conversions are necessary for use with newer kernel (>= 2.6.26) if it
 use the libata module for parallel and serial ATA interfaces of block devices
 (i. e. hard disks with IDE or SATA interface, usbsticks).
 
 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
 =head1 OPTIONS
 
 =over 4
@@ -460,8 +452,33 @@ Print verbose messages.
 
 =back
 
 
 =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.
 
 =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
 =cut
index 02219a5134cfba38a20574ea02e7cc79d62ae478..8bb0d11722a33cb651e618acf260e98ce49149b3 100644 (file)
@@ -2,7 +2,8 @@
 
 #       liloconfig -  creating a new lilo.conf file
 #       
 
 #       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
 #       
 #       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
@@ -30,14 +31,15 @@ use File::Copy;
 #---- global variables
 my $prog = $0;
 $prog =~ s#.*/##;
 #---- 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;
 
 #---- 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;
 
 # define perldoc usage
 pod2usage(1) if $opt_h;
 
@@ -71,12 +73,13 @@ sub main {
                $liloconfold = $liloconf . ".old";
                $liloconfnew = $liloconf . ".new";
        }
                $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 = 1;
        }
        else {
-               $exit = create_lilo_conf()
+               $exit = create_lilo_conf();
        }               
        return $exit;
 }
        }               
        return $exit;
 }
@@ -95,7 +98,10 @@ sub create_lilo_conf {
        if ($found) { $found = convert_boot_device(); }
 
        # finally write new lilo.conf file
        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;
 }
 
        return $exit;
 }
@@ -262,7 +268,7 @@ sub convert_boot_device {
        my $boot_disk = '';
        my $boot_link;
        # global variables: $boot_dev, $boot_id
        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
        if (-b $root_dev) {
                if ($root_dev =~ /\/dev\/md/) {
                        # search if the found partition is a raid volume
@@ -287,7 +293,7 @@ sub convert_boot_device {
                print "E: could not find root device $root_dev! \n";
                $found = 0;
        }
                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);
        if ($found) {
                if($opt_v) { print "Convert boot option $boot_disk into DISK ID\n"; }
                $boot_id = $idpath . "/" . find_id_link($boot_disk,$idpath);
@@ -298,7 +304,7 @@ sub convert_boot_device {
                        #$found = 0;
                }
        }
                        #$found = 0;
                }
        }
-
+       
        return $found;
 }
 
        return $found;
 }
 
@@ -308,7 +314,7 @@ sub check_raid {
        my $mdname;
        my $md;
        my @devices;
        my $mdname;
        my $md;
        my @devices;
-
+       
        # check if the found partition is a raid volume
        if($part =~ /\/dev\/md/)
        {
        # check if the found partition is a raid volume
        if($part =~ /\/dev\/md/)
        {
@@ -321,8 +327,8 @@ sub check_raid {
                @devices = sort(@devices[4..$#devices]);
                $part = "/dev/" . $devices[0];
                $part =~ s/\[.*$//;
                @devices = sort(@devices[4..$#devices]);
                $part = "/dev/" . $devices[0];
                $part =~ s/\[.*$//;
-
        }
        }
+       
        return $part;
 }
 
        return $part;
 }
 
@@ -333,8 +339,13 @@ sub write_lilo_conf {
 
        if (not $exit) {
                # create lilo.conf.new
 
        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) {
        }
 
        if (-f $liloconf and not -f $liloconfold) {
@@ -393,6 +404,7 @@ sub copy_template {
 #large-memory
 lba32
 boot = /dev/sda
 #large-memory
 lba32
 boot = /dev/sda
+root = /dev/sda1
 map = /boot/map
 install = menu
 menu-scheme = Wb:Yr:Wb:Wb
 map = /boot/map
 install = menu
 menu-scheme = Wb:Yr:Wb:Wb
@@ -410,7 +422,43 @@ vga = normal
        return $exit;
 }
 
        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 = '';
        
        my $oldline = '';
        my $newline = '';
@@ -423,24 +471,104 @@ sub write_boot_option {
                # line read from MYFH_TMP
                $oldline = $_;
 
                # line read from MYFH_TMP
                $oldline = $_;
 
+               # lines beginning direct with boot option
                if (/^boot/ and $ok == 0) {
                        if ($boot_id) {
                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 {
                        }
                        else {
-                               $oldline = "boot = $boot_dev\n";
+                               $newline = 'root = ' . $root_dev . "\n";
                        }
                        print MYFH_NEW $newline;
                        }
                        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;
                }
                        # 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;
                }
        }
                        print MYFH_NEW $oldline;
                }
        }
@@ -452,16 +580,93 @@ sub write_image_config {
 
        my $image;
        my $initrd;
 
        my $image;
        my $initrd;
+       my $initrd2;
        my $nr;
        my $nr2;
 
        my $nr;
        my $nr2;
 
+       # append to new lilo.conf
+       open(MYFH_NEW, ">> $liloconfnew") or die "Cannot open file: $!";
+
        # search for kernel image files
        # 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: $!";
 
 
        # 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
        $nr = 0;
        foreach $image (@vmlinuz) {
                # search for kernel initrd file
@@ -502,12 +707,12 @@ sub write_image_config {
                print MYFH_NEW     "#\t" . 'optional' . "\n";
                if($opt_v) { print "#\t" . 'optional' . "\n"; }
 
                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 {
                        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";
                }
 
                print MYFH_NEW     "\n";
@@ -518,9 +723,17 @@ sub write_image_config {
        }
 
        close(MYFH_NEW);
        }
 
        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__
 main();
 
 __END__
@@ -532,7 +745,7 @@ liloconfig - create new lilo.conf file (with diskid and uuid)
 
 =head1 SYNOPSIS
 
 
 =head1 SYNOPSIS
 
-liloconfig [-h] [-v] [-f] [lilo.conf]
+B<liloconfig> [B<-h>] [B<-v>] [B<-f>] [B<-u>] [B<lilo.conf>]
 
 =head1 DESCRIPTION
 
 
 =head1 DESCRIPTION
 
@@ -542,6 +755,34 @@ After creating the new configuration file you must execute '/sbin/lilo'.
 liloconfig use the lilo.example.conf file as template. In the final
 lilo.conf file you find many useful comments for custom changes.
 
 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:
 =head1 EXAMPLES
 
 Lines in the configuration file /etc/lilo.conf:
@@ -551,6 +792,8 @@ Lines in the configuration file /etc/lilo.conf:
   #large-memory
   lba32
   boot = /dev/sda
   #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
   map = /boot/map
   install = menu
   menu-scheme = Wb:Yr:Wb:Wb
@@ -567,7 +810,7 @@ Lines in the configuration file /etc/lilo.conf:
   image = /boot/vmlinuz-3.5.0-trunk-686
       label = "Linux"
       #root = /dev/sda1
   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
       read-only
   #   restricted
   #   alias = 1
@@ -577,33 +820,30 @@ Lines in the configuration file /etc/lilo.conf:
   image = /boot/vmlinuz-3.2.0-4-686
       label = "Linux Old"
       #root = /dev/sda1
   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
 
       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
 
 =cut
index feb144e7a6ba5447ed08ad889e0760b5e7336d04..0e766bb9f1c28fcd9032244f4b8277fae7841ab4 100644 (file)
@@ -1,6 +1,6 @@
 # -*- makefile -*-
 #
 # -*- makefile -*-
 #
-# Copyright 2009-2013 Joachim Wiedorn
+# Copyright 2009-2014 Joachim Wiedorn
 # All rights reserved.
 # 
 # Licensed under the terms contained in the file 'COPYING'
 # All rights reserved.
 # 
 # Licensed under the terms contained in the file 'COPYING'
@@ -23,7 +23,6 @@ NASM=nasm
 G=`cat foo1 foo2 | grep version | cut -d " " -f 3`
 
 CFLAGS=$(OPT) -Wall $(PCONFIG)
 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 \
 LIBS=$(DEVMAPPER)
 
 OBJS=lilo.o raid.o map.o geometry.o boot.o device.o common.o bsect.o cfg.o \
@@ -79,7 +78,7 @@ manpath:
        echo $(MAN_DIR)
 
 .c.o:
        echo $(MAN_DIR)
 
 .c.o:
-               $(CC) -c $(CFLAGS) $*.c
+               $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
 
 .s.o:
                $(AS86) -w -l $*.lis -o $*.o $*.s
 
 .s.o:
                $(AS86) -w -l $*.lis -o $*.o $*.s
@@ -91,7 +90,7 @@ manpath:
                dd if=$*.img of=$*.b bs=32 skip=1
 
 edit:          $(EDIT)
                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
 
 loader.i:      mkloader first.b second.b third.b bitmap.b mbr.b chain.b mbr2.b
                ./mkloader >loader.i
@@ -100,30 +99,30 @@ disk.com:  disk.b
                cp disk.b disk.com
 
 disk.s:                disk.S read.S bdata.h biosdata.S lilo.h Makefile
                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
 
 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
                        -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
                        -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
                -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
                -DSIZEKRNL=`wc -c <disk.com | sed "s/ //g"` \
                -DSIZEDISKB=512 -o pseudo1.s $(TMP).S
        rm -f $(TMP).S
@@ -131,7 +130,7 @@ pseudo1.s: bootsect.S pseudo.S disk.com
 pseudo2.s: bootsect.S pseudo.S
        $(MAKE) -C ../diagnose all
        cat bootsect.S pseudo.S >$(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
                -DSIZEKRNL=`wc -c <../diagnose/test4.com | sed "s/ //g"` \
                -DSIZEDISKB=512 -o pseudo2.s $(TMP).S
        rm -f $(TMP).S
@@ -139,7 +138,7 @@ pseudo2.s: bootsect.S pseudo.S
 pseudo3.s: bootsect.S pseudo.S
        $(MAKE) -C ../diagnose all
        cat bootsect.S pseudo.S >$(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
                -DSIZEKRNL=`wc -c <../diagnose/test5.com | sed "s/ //g"` \
                -DSIZEDISKB=512 -o pseudo3.s $(TMP).S
        rm -f $(TMP).S
@@ -176,13 +175,13 @@ dparam.s: dparam.S
                cp -p dparam.S dparam.s
 
 lilo:          $(OBJS)
                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)
 
 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
 
 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
 
 bitmap.o: bitmap.s common.s
 third.o: third.s common.s
@@ -191,25 +190,25 @@ first.o: first.s common.s
 chain.o: chain.s common.s
 
 first.s:       first.S lilo.h version.h Makefile
 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
 
 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
 
 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
 
 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
 
 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
 
 xxx.s:         chain.S lilo.h Makefile
-               $(CPP) chain.S -DXXX -o xxx.s
+               $(CPP) $(CPPFLAGS) chain.S -DXXX -o xxx.s
 
 $(OBJS):       Makefile
 
 
 $(OBJS):       Makefile
 
@@ -245,20 +244,23 @@ install:
 
        strip lilo
        cp lilo $$DESTDIR$(SBIN_DIR)/lilo
 
        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
        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
        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
 
 mkloader:      temp.c
-       $(CC) $(CFLAGS) -DLILO_BINARY -o mkloader temp.c
+       $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -DLILO_BINARY -o mkloader temp.c
 
 
 tidy:
 
 
 tidy:
index 93d3039a13ab153c366ce31b22afe69826870e20..459851af42b47f9704b3d1f0b30410b96b533aed 100644 (file)
@@ -2,7 +2,7 @@
  * 
  * Copyright 1992-1997 Werner Almesberger
  * Copyright 1999-2006 John Coffman
  * 
  * 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'
  * All rights reserved.
  * 
  * Licensed under the terms contained in the file 'COPYING'
@@ -347,7 +347,6 @@ void preload_dev_cache(void)
        cache_add(DEV_DIR "/fd1", 0x0201);
     }
     
        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 "/hdt", MAJOR_IDE10);
     cache_ide(DEV_DISK_DIR "/hds", MAJOR_IDE10);
     cache_ide(DEV_DISK_DIR "/hdr", MAJOR_IDE9);
@@ -360,11 +359,9 @@ void preload_dev_cache(void)
     
     cache_ide(DEV_DISK_DIR "/hdl", MAJOR_IDE6);
     cache_ide(DEV_DISK_DIR "/hdk", MAJOR_IDE6);
     
     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);
     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);
     
     for (i = MAX; i >= 0; i--) {
        sprintf(tmp, is_devfs() ? DEV_DISK_DIR "/md/%d" : DEV_DISK_DIR "/md%d", i);
@@ -385,8 +382,8 @@ void preload_dev_cache(void)
 
     cache_ide(DEV_DISK_DIR "/hdd", MAJOR_IDE2);
     cache_ide(DEV_DISK_DIR "/hdc", MAJOR_IDE2);
 
     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;
 }
     
     verbose = vsave;
 }
index 37db4552a1452af033b729facf5a32af759ef363..f033f839de63ed1c08d5693cae4cbd79cdb5e2a9 100644 (file)
@@ -2,7 +2,7 @@
  * 
  * Copyright 1992-1998 Werner Almesberger
  * Copyright 1999-2005 John Coffman
  * 
  * 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'
  * All rights reserved.
  * 
  * Licensed under the terms contained in the file 'COPYING'
@@ -280,33 +280,49 @@ int has_partitions_beta(dev_t dev)
 {
     int major = MAJOR(dev);
     
 {
     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 */
 
         )  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;
         )  return 0xFFFFFFF8;  /* 3 bit partition mask */
 
     return 0;
@@ -635,24 +651,22 @@ void geo_query_dev(GEOMETRY *geo,int device,int all)
            geo->sectors = fdprm.sect;
            geo->start = 0;
            break;
            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:
        case MAJOR_IDE2:
        case MAJOR_IDE3:
        case MAJOR_IDE4:
-#ifdef MAJOR_IDE5
        case MAJOR_IDE5:
        case MAJOR_IDE5:
-#endif
        case MAJOR_IDE6:
        case MAJOR_IDE7:
        case MAJOR_IDE8:
        case MAJOR_IDE9:
        case MAJOR_IDE10:
        case MAJOR_IDE6:
        case MAJOR_IDE7:
        case MAJOR_IDE8:
        case MAJOR_IDE9:
        case MAJOR_IDE10:
-       case MAJOR_ESDI:
        case MAJOR_XT:
        case MAJOR_XT:
-       case MAJOR_ACORN:
        MASK63:
            geo->device = 0x80 + (MINOR(device) >> 6) +
        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,
            if (!get_all) break;
            if (ioctl(fd,HDIO_GETGEO,&hdprm) < 0)
                die("geo_query_dev HDIO_GETGEO (dev 0x%04x): %s",device,
@@ -670,8 +684,17 @@ void geo_query_dev(GEOMETRY *geo,int device,int all)
        case MAJOR_SD6:
        case MAJOR_SD7:
        case MAJOR_SD8:
        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:
        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,
            if (!get_all) break;
            if (ioctl(fd,HDIO_GETGEO,&hdprm) < 0)
                die("geo_query_dev HDIO_GETGEO (dev 0x%04x): %s",device,
@@ -693,7 +716,7 @@ void geo_query_dev(GEOMETRY *geo,int device,int all)
                die("Sorry, cannot handle device 0x%04x",device);
            break;
        MASK31:
                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,
            if (!get_all) break;
            if (ioctl(fd,HDIO_GETGEO,&hdprm) < 0)
                die("geo_query_dev HDIO_GETGEO (dev 0x%04x): %s",device,
@@ -706,17 +729,26 @@ void geo_query_dev(GEOMETRY *geo,int device,int all)
            geo->sectors = hdprm.sectors;
            geo->start = hdprm.start;
            break;
            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:
        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,
            if (!get_all) break;
            if (ioctl(fd,HDIO_GETGEO,&hdprm) < 0)
                die("geo_query_dev HDIO_GETGEO (dev 0x%04x): %s",device,
@@ -729,40 +761,51 @@ void geo_query_dev(GEOMETRY *geo,int device,int all)
            geo->sectors = hdprm.sectors;
            geo->start = hdprm.start;
            break;
            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:
-       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_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:
-       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 (!get_all) break;
            if (ioctl(fd,HDIO_GETGEO,&hdprm) < 0)
                die("geo_query_dev HDIO_GETGEO (dev 0x%04x): %s",device,
@@ -783,7 +826,8 @@ void geo_query_dev(GEOMETRY *geo,int device,int all)
            if (max_partno[major] == 15)  goto MASK15;
            if (max_partno[major] == 7)   goto MASK7;
            
            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);
                (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);
@@ -806,19 +850,18 @@ int is_first(int device)
     if (walk && !walk->heads)
        die("Device 0x%04X: Configured as inaccessible.\n",device);
     if (walk && walk->bios != -1) return !(walk->bios & 0x7f);
     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);
 
     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:
            return !(MINOR(device) >> 6);
 
        case MAJOR_IDE2:
        case MAJOR_IDE3:
        case MAJOR_IDE4:
-#ifdef MAJOR_IDE5
        case MAJOR_IDE5:
        case MAJOR_IDE5:
-#endif
        case MAJOR_IDE6:
        case MAJOR_IDE7:
        case MAJOR_IDE8:
        case MAJOR_IDE6:
        case MAJOR_IDE7:
        case MAJOR_IDE8:
@@ -826,7 +869,7 @@ int is_first(int device)
        case MAJOR_IDE10:
        case MAJOR_ESDI:
        case MAJOR_XT:
        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_SD:
        case MAJOR_SD2:
@@ -836,50 +879,79 @@ int is_first(int device)
        case MAJOR_SD6:
        case MAJOR_SD7:
        case MAJOR_SD8:
        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_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:
-       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 */
 
        default:
            return 1; /* user knows what (s)he's doing ... I hope */
@@ -1102,6 +1174,7 @@ void geo_get(GEOMETRY *geo,int device,int user_device,int all)
        md_array_info_t md_array_info;
        md_disk_info_t md_disk_info;
        int raid_limit;
        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)
 
        sprintf(mdxxx, DEV_DISK_DIR "/md%d", MINOR(device));
        if ((md_fd=open(mdxxx,O_NOACCESS)) < 0)
index 09b40dcd5422454b4e22fe194e742663a2c48d8c..4cc4694e2c1b7752d46063c2d3dc8c53f36776b4 100644 (file)
@@ -2,7 +2,7 @@
  * 
  * Copyright 1992-1998 Werner Almesberger
  * Copyright 1999-2007 John Coffman
  * 
  * 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'
  * All rights reserved.
  * 
  * Licensed under the terms contained in the file 'COPYING'
@@ -829,7 +829,7 @@ fprintf(errstd,"REBOOT=\"%s\"\n", reboot_arg);
         }
         printf("  * Copyright (C) 1992-1998 Werner Almesberger  (until v20)\n"
                "  * Copyright (C) 1999-2007 John Coffman  (until v22)\n"
         }
         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"
                "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"
index c11330b4b166e30b0d7976f8e2a4117a593f51d9..102769c03c8573c03b49884d2098f9292dcff2de 100644 (file)
@@ -2,7 +2,7 @@
  * 
  * Copyright 1992-1998 Werner Almesberger
  * Copyright 1999-2006 John Coffman
  * 
  * 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'
  * All rights reserved.
  * 
  * Licensed under the terms contained in the file 'COPYING'
 #endif
 
 
 #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
 #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
 #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 */
 
 /* 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 */
 
 /* 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
 
 #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
 #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
 #endif
 
 #ifdef LCF_DSECS
index 50d99e930f18f7a8d1cc62b2072f4c2edcb547cf..329a90f8bb31ea7ecb11804fac1ac32c0cc818f3 100644 (file)
@@ -2,7 +2,7 @@
  * 
  * Copyright 1992-1998 Werner Almesberger
  * Copyright 1999-2005 John Coffman
  * 
  * 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'
  * All rights reserved.
  * 
  * Licensed under the terms contained in the file 'COPYING'
@@ -226,11 +226,10 @@ void part_verify(int dev_nr,int type)
        dos ? "  A DOS/Windows system may be rendered unbootable."
                "\n  The backup copy of this boot sector should be retained."
                : "" );
        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'");
 #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);
 #endif
     }
     cyl = part_table[part].cyl+((part_table[part].sector >> 6) << 8);
index 2eb7742667b0acecf2631ee8e8055c06cba909c7..a4889098dce76c59d0888e763a4dc6579b12dd28 100644 (file)
@@ -1,7 +1,7 @@
 /* version.h
  * 
  * Copyright 2005-2007 John Coffman
 /* 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'
  * All rights reserved.
  * 
  * Licensed under the terms contained in the file 'COPYING'
@@ -12,8 +12,8 @@
 #define VERSION_H
 
 #define VERSION_MAJOR 24
 #define VERSION_H
 
 #define VERSION_MAJOR 24
-#define VERSION_MINOR 0
+#define VERSION_MINOR 1
 #define VERSION_EDIT  ""
 #define VERSION_EDIT  ""
-#define VERSION_DATE "07-Juni-2013"
+#define VERSION_DATE "17-October-2014"
 
 #endif
 
 #endif