summaryrefslogtreecommitdiff
path: root/source/a/lilo
diff options
context:
space:
mode:
authorPatrick J Volkerding <volkerdi@slackware.com>2013-11-04 17:08:47 +0000
committerEric Hameleers <alien@slackware.com>2018-05-31 22:57:36 +0200
commit76fc4757ac91ac7947a01fb7b53dddf9a78a01d1 (patch)
tree9b98e6e193c7870cb27ac861394c1c4592850922 /source/a/lilo
parent9664bee729d487bcc0a0bc35859f8e13d5421c75 (diff)
downloadcurrent-76fc4757ac91ac7947a01fb7b53dddf9a78a01d1.tar.gz
Slackware 14.1slackware-14.1
Mon Nov 4 17:08:47 UTC 2013 Slackware 14.1 x86_64 stable is released! It's been another interesting release cycle here at Slackware bringing new features like support for UEFI machines, updated compilers and development tools, the switch from MySQL to MariaDB, and many more improvements throughout the system. Thanks to the team, the upstream developers, the dedicated Slackware community, and everyone else who pitched in to help make this release a reality. The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. Please consider supporting the Slackware project by picking up a copy from store.slackware.com. We're taking pre-orders now, and offer a discount if you sign up for a subscription. Have fun! :-)
Diffstat (limited to 'source/a/lilo')
-rwxr-xr-xsource/a/lilo/lilo.SlackBuild14
-rw-r--r--source/a/lilo/lilo.use_major_minor_instead_lvm_name.diff47
-rw-r--r--source/a/lilo/liloconfig55
3 files changed, 54 insertions, 62 deletions
diff --git a/source/a/lilo/lilo.SlackBuild b/source/a/lilo/lilo.SlackBuild
index 2df7618d..c481b015 100755
--- a/source/a/lilo/lilo.SlackBuild
+++ b/source/a/lilo/lilo.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009, 2010, 2011 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010, 2011, 2013 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -21,8 +21,8 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-VERSION=${VERSION:-23.2}
-BUILD=${BUILD:-3}
+VERSION=${VERSION:-24.0}
+BUILD=${BUILD:-4}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -47,12 +47,6 @@ tar xvf $CWD/lilo-$VERSION.tar.gz || exit 1
cd lilo-$VERSION
chown -R root:root .
-# Obsolete patch?
-## This is needed for LVM+udev+devtmpfs
-#( cd src
-# zcat $CWD/lilo.use_major_minor_instead_lvm_name.diff.gz | patch -p1 --verbose || exit 1
-#)
-
make || exit 1
make -i install DESTDIR=$PKG || exit 1
@@ -75,7 +69,7 @@ mkdir -p $PKG/sbin
cp -a $CWD/liloconfig $PKG/sbin/liloconfig
chmod 755 $PKG/sbin/liloconfig
# Hey, you're stomping on our name! Plus, it doesn't work.
-rm -f $PKG/usr/sbin/liloconfig
+rm -f $PKG/usr/sbin/liloconfig $PKG/usr/share/man/man8/liloconfig.8
mkdir -p $PKG/var/log/setup
cp -a $CWD/setup.liloconfig $PKG/var/log/setup/setup.liloconfig
cp -a $CWD/text.lilohelp $PKG/var/log/setup/text.lilohelp
diff --git a/source/a/lilo/lilo.use_major_minor_instead_lvm_name.diff b/source/a/lilo/lilo.use_major_minor_instead_lvm_name.diff
deleted file mode 100644
index 860347eb..00000000
--- a/source/a/lilo/lilo.use_major_minor_instead_lvm_name.diff
+++ /dev/null
@@ -1,47 +0,0 @@
---- lilo-22.8/geometry.c 2006-12-17 01:46:17.000000000 -0200
-+++ lilo-22.8-new/geometry.c 2009-12-18 02:09:54.000000000 -0200
-@@ -903,24 +903,17 @@
- void *next = NULL;
- char dmdev[PATH_MAX+1];
- char buf[PATH_MAX+1];
-- char *slash;
- int result;
-
- dev_open(&dev, device, -1);
- strncpy(dmdev, dev.name, PATH_MAX);
- dmdev[PATH_MAX] = 0;
-+
- do {
- memset(buf, 0, PATH_MAX + 1);
- if ((result = readlink(dmdev, buf, PATH_MAX)) < 0 && errno != EINVAL)
- die("device-mapper: readlink(\"%s\") failed with: %s",buf,
- strerror(errno));
-- if (result >= 0) {
-- if (buf[0] != '/' && (slash = strrchr(dmdev, '/')) != NULL)
-- slash++;
-- else
-- slash = dmdev;
-- strncpy(slash, buf, PATH_MAX - (slash-dmdev));
-- }
- if (realpath(dmdev, buf) == NULL)
- die("device-mapper: realpath(\"%s\") failed with: %s",dmdev,
- strerror(errno));
-@@ -930,13 +923,11 @@
-
- if (!(dmt = dm_task_create(DM_DEVICE_TABLE)))
- die("device-mapper: dm_task_create(DM_DEVICE_TABLE) failed");
-- slash = strrchr(dmdev, '/');
-- if (slash)
-- slash++;
-- else
-- slash = dmdev;
-- if (!dm_task_set_name(dmt, slash))
-- die("device-mapper: dm_task_set_name(\"%s\") failed",dmdev);
-+ // Using device name is flawed. Better to use device major and minor
-+ if (!dm_task_set_major(dmt, MAJOR(device)))
-+ die("device-mapper: dm_task_set_major(DM_DEVICE_TABLE) failed");
-+ if (!dm_task_set_minor(dmt, MINOR(device)))
-+ die("device-mapper: dm_task_set_minor(DM_DEVICE_TABLE) failed");
- if (!dm_task_run(dmt))
- die("device-mapper: dm_task_run(DM_DEVICE_TABLE) failed");
-
diff --git a/source/a/lilo/liloconfig b/source/a/lilo/liloconfig
index d8bc02dd..75e3b0eb 100644
--- a/source/a/lilo/liloconfig
+++ b/source/a/lilo/liloconfig
@@ -2,7 +2,7 @@
#
# Copyright 1994, 1998, 1999 Patrick Volkerding, Moorhead, Minnesota USA
# Copyright 2002, 2003 Slackware Linux, Inc, Concord, CA
-# Copyright 2007, 2008, 2011 Patrick Volkerding, Sebeka, Minnesota, USA
+# Copyright 2007, 2008, 2011, 2013 Patrick Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -26,6 +26,32 @@ TMP=/var/log/setup/tmp
CONSOLETYPE=standard
unset UTFVT
+# Most of the time LILO is not used on UEFI machines (in fact, it is useless
+# unless the machine is running in legacy BIOS mode). So, we'll detect if
+# this is a machine running UEFI and suggest skipping LILO installation.
+# We'll still allow it if the user wants it, though. It won't hurt anything,
+# and might be useful for booting in Legacy BIOS mode later.
+if [ -d /sys/firmware/efi ]; then
+ dialog --title "UEFI FIRMWARE DETECTED" \
+--backtitle "LILO (Linux Loader) installation" \
+--menu \
+"Since LILO (the traditional Linux Loader) does not work with machines \
+running UEFI firmware (except in Legacy BIOS mode), you probably do not \
+need to install it. Instead, you'll need ELILO, which is a version of \
+LILO designed to work with EFI/UEFI systems." \
+12 70 2 \
+"skip" "Skip installing LILO and proceed to ELILO installation" \
+"install" "Install LILO anyway" 2> $TMP/reply
+ if [ $? = 1 -o $? = 255 ]; then
+ exit
+ fi
+ REPLY="`cat $TMP/reply`"
+ rm -f $TMP/reply
+ if [ "$REPLY" = "skip" ]; then
+ exit
+ fi
+fi
+
# Set the OS root directory (called T_PX for some unknown reason).
# If an argument is given to this script and it is a directory, it
# is taken to be the root directory. First though, we check for a
@@ -52,6 +78,15 @@ if [ ! -d "$T_PX" ]; then
fi
fi
+# If os-prober is availible, we will use it to filter out unbootable
+# FAT/NTFS partitions. If it is not availble, we'll use /bin/true
+# instead to avoid filtering.
+if which os-prober > /dev/null ; then
+ OSPROBER=os-prober
+else
+ OSPROBER=true
+fi
+
# Determine LILO documentation directory:
LILODOCDIR="$(ls -d $T_PX/usr/doc/lilo-* 2> /dev/null | tail -n 1)"
if [ ! -d "$LILODOCDIR" ]; then
@@ -294,6 +329,7 @@ EOF
cat << EOF >> $T_PX/etc/lilo.conf
boot = $ROOT_DEVICE
#delay = 5
+#compact # faster, but won't work on all systems.
EOF
if [ $CONSOLETYPE = standard ]; then
cat << EOF >> $T_PX/etc/lilo.conf
@@ -396,6 +432,8 @@ EOF
cat << EOF >> $T_PX/etc/lilo.conf
boot = $LILO_TARGET
+#compact # faster, but won't work on all systems.
+
# Boot BMP Image.
# Bitmap in BMP format: 640x480x8
bitmap = /boot/slack.bmp
@@ -474,13 +512,18 @@ cat << EOF >> $T_PX/etc/lilo.conf
# End LILO global section
EOF
# OK, now let's look for Windows partitions:
- DOSP="`PROBE -l | grep "DOS
+ # If we have os-prober, use the Windows partition list from that:
+ if which os-prober > /dev/null ; then
+ DOSP="$(os-prober 2> /dev/null | grep Windows | cut -f 1 -d :)"
+ else # use PROBE output:
+ DOSP="$(PROBE -l | grep "DOS
Win
W95
FAT12
FAT16
-HPFS" | grep -v "Ext'd" | grep -v "Extend" | sort`"
- DOSP="`echo $DOSP | cut -f 1 -d ' '`"
+HPFS" | grep -v "Ext'd" | grep -v "Extend" | sort )"
+ DOSP="`echo $DOSP | cut -f 1 -d ' '`"
+ fi
if [ ! "$DOSP" = "" ]; then
TABLE="`echo $DOSP | cut -b1-8`"
cat << EOF >> $T_PX/etc/lilo.conf
@@ -896,7 +939,9 @@ default." 13 74 4 \
#
# Start LILO global section
boot = $LILO_TARGET
+
#compact # faster, but won't work on all systems.
+
EOF
# Boot splash
if [ "$PROMPT" = "prompt" ]; then
@@ -1096,7 +1141,7 @@ Win
W95
FAT12
FAT16
-HPFS" | grep -v "Ext'd" | grep -v "Extend" | sort >> $TMP/tmpmsg
+HPFS" | grep -v "Ext'd" | grep -v "Extend" | sort | grep "$($OSPROBER 2> /dev/null | grep Windows | cut -f 1 -d :)" >> $TMP/tmpmsg
echo >> $TMP/tmpmsg
echo "Which one would you like LILO to boot?" >> $TMP/tmpmsg
dialog --title "SELECT WINDOWS PARTITION" --no-collapse --inputbox \