summaryrefslogtreecommitdiffstats
path: root/source/a/lilo/liloconfig
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2013-11-04 17:08:47 +0000
committer Eric Hameleers <alien@slackware.com>2018-05-31 22:57:36 +0200
commit76fc4757ac91ac7947a01fb7b53dddf9a78a01d1 (patch)
tree9b98e6e193c7870cb27ac861394c1c4592850922 /source/a/lilo/liloconfig
parent9664bee729d487bcc0a0bc35859f8e13d5421c75 (diff)
downloadcurrent-76fc4757ac91ac7947a01fb7b53dddf9a78a01d1.tar.gz
current-76fc4757ac91ac7947a01fb7b53dddf9a78a01d1.tar.xz
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/liloconfig')
-rw-r--r--source/a/lilo/liloconfig55
1 files changed, 50 insertions, 5 deletions
diff --git a/source/a/lilo/liloconfig b/source/a/lilo/liloconfig
index d8bc02dd4..75e3b0eba 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 \