Skip to content

Commit

Permalink
(e)liloconfig need patching to make them work properly on Slackware L…
Browse files Browse the repository at this point in the history
…ive.

The cause is the use of hard-coded '/mnt' instead of using $T_PX variable.
In Slackware's official installer, the computer's hard disk is always mounted
at /mnt so that there is no apparent issue.
Slackware Live's 'setup2hd' however, needs to mount the hard disk on /setup2hd
because /mnt is already used.
  • Loading branch information
alienbob committed Nov 16, 2016
1 parent 9077db7 commit 43a3f13
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 1 deletion.
4 changes: 3 additions & 1 deletion make_slackware_live.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1337,7 +1337,9 @@ if ls ${LIVE_ROOTDIR}/boot/vmlinuz-huge-* 1>/dev/null 2>/dev/null; then
rm -r usr sbin
cd - 1>/dev/null
# Fix some occurrences of '/mnt' that should not be used in the Live ISO:
sed -i -e 's, /mnt, ${T_PX},g' -e 's,T_PX=/mnt,T_PX=/setup2hd,g' ${LIVE_ROOTDIR}/usr/share/${LIVEMAIN}/*
sed -i -e 's, /mnt, ${T_PX},g' -e 's,=/mnt/,=${T_PX}/,g' -e 's,T_PX=/mnt,T_PX=/setup2hd,g' ${LIVE_ROOTDIR}/usr/share/${LIVEMAIN}/*
patch ${LIVE_ROOTDIR}/usr/sbin/liloconfig ${LIVE_TOOLDIR}/patches/liloconfig.patch
patch ${LIVE_ROOTDIR}/usr/sbin/eliloconfig ${LIVE_TOOLDIR}/patches/eliloconfig.patch
# Fix some occurrences of '/usr/lib/setup/' are covered by $PATH:
sed -i -e 's,/usr/lib/setup/,,g' -e 's,:/usr/lib/setup,:/usr/share/${LIVEMAIN},g' ${LIVE_ROOTDIR}/usr/share/${LIVEMAIN}/*
# Add the Slackware Live HD installer:
Expand Down
25 changes: 25 additions & 0 deletions patches/eliloconfig.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
--- eliloconfig.orig 2016-04-01 20:37:40.000000000 +0200
+++ eliloconfig 2016-11-12 01:32:24.804762277 +0100
@@ -75,9 +75,9 @@
exit
fi

-# If there's no vfat mounted on /boot/efi or /mnt/boot/efi, forget it:
+# If there's no vfat mounted on /boot/efi or $T_PX/boot/efi, forget it:
if ! mount | grep vfat | grep -wq /boot/efi ; then
- if ! mount | grep vfat | grep -wq /mnt/boot/efi ; then
+ if ! mount | grep vfat | grep -wq $T_PX/boot/efi ; then
if [ "$T_PX" = "/" ]; then
echo "ERROR: No EFI System Partition mounted on /boot/efi."
fi
@@ -90,8 +90,8 @@
EFI_DEVICE=$(mount | grep vfat | grep -w /boot/efi | cut -b 1-8)
EFI_PARTITION=$(mount | grep vfat | grep -w /boot/efi | cut -f 1 -d ' ' | cut -b 9- | tr -d [a-z])
else
- EFI_DEVICE=$(mount | grep vfat | grep -w /mnt/boot/efi | cut -b 1-8)
- EFI_PARTITION=$(mount | grep vfat | grep -w /mnt/boot/efi | cut -f 1 -d ' ' | cut -b 9- | tr -d [a-z])
+ EFI_DEVICE=$(mount | grep vfat | grep -w $T_PX/boot/efi | cut -b 1-8)
+ EFI_PARTITION=$(mount | grep vfat | grep -w $T_PX/boot/efi | cut -f 1 -d ' ' | cut -b 9- | tr -d [a-z])
fi

# There better be a kernel:
22 changes: 22 additions & 0 deletions patches/liloconfig.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
--- liloconfig.orig 2016-07-12 01:21:03.000000000 +0200
+++ liloconfig 2016-11-12 11:57:41.585974417 +0100
@@ -767,7 +767,7 @@

# If we're installing from the umsdos.gz rootdisk, suggest skipping LILO:
if [ ! "$T_PX" = "/" ]; then
- if mount | grep " on /mnt " | grep umsdos 1> /dev/null 2> /dev/null ; then
+ if mount | grep " on $T_PX " | grep umsdos 1> /dev/null 2> /dev/null ; then
dialog --title "SKIP LILO CONFIGURATION? (RECOMMENDED)" --yesno "Since \
you are installing to a FAT partition, it's suggested that you do not \
configure LILO at this time. (Instead, use your bootdisk. For booting \
@@ -1236,8 +1236,8 @@
if [ -r $TMP/lilo.conf ]; then
dialog --title "YOUR NEW /etc/lilo.conf" --textbox "$TMP/lilo.conf" 22 70
else
- if [ -r /mnt/etc/lilo.conf ]; then
- dialog --title "YOUR OLD /etc/lilo.conf" --textbox "/mnt/etc/lilo.conf" 22 70
+ if [ -r $T_PX/etc/lilo.conf ]; then
+ dialog --title "YOUR OLD /etc/lilo.conf" --textbox "$T_PX/etc/lilo.conf" 22 70
elif [ "$T_PX" = "/" -a -r /etc/lilo.conf ]; then
dialog --title "YOUR OLD /etc/lilo.conf" --textbox "/etc/lilo.conf" 22 70
else

0 comments on commit 43a3f13

Please sign in to comment.