slackware-current/source/a/elilo/eliloconfig

221 lines
8.2 KiB
Text
Raw Normal View History

#!/bin/sh
Mon Mar 20 18:26:23 UTC 2023 a/coreutils-9.2-x86_64-1.txz: Upgraded. a/elilo-3.16-x86_64-14.txz: Rebuilt. eliloconfig: check first for /sys/firmware/efi/efivars, and then check for the older /sys/firmware/efi/vars directory. We should be able to install an EFI menu entry if either one is present. Thanks to AlleyTrotter. a/xz-5.4.2-x86_64-1.txz: Upgraded. ap/mpg123-1.31.3-x86_64-1.txz: Upgraded. ap/squashfs-tools-4.6-x86_64-1.txz: Upgraded. ap/vim-9.0.1418-x86_64-1.txz: Upgraded. Fixed security issues: NULL pointer dereference issue in utfc_ptr2len. Incorrect Calculation of Buffer Size. Heap-based Buffer Overflow. Thanks to marav for the heads-up. For more information, see: https://www.cve.org/CVERecord?id=CVE-2023-1264 https://www.cve.org/CVERecord?id=CVE-2023-1175 https://www.cve.org/CVERecord?id=CVE-2023-1170 (* Security fix *) l/imagemagick-7.1.1_4-x86_64-1.txz: Upgraded. l/libsigc++-2.12.0-x86_64-1.txz: Upgraded. l/netpbm-11.01.01-x86_64-1.txz: Upgraded. n/curl-8.0.1-x86_64-1.txz: Upgraded. This update fixes security issues: SSH connection too eager reuse still. HSTS double-free. GSS delegation too eager connection re-use. FTP too eager connection reuse. SFTP path ~ resolving discrepancy. TELNET option IAC injection. For more information, see: https://curl.se/docs/CVE-2023-27538.html https://curl.se/docs/CVE-2023-27537.html https://curl.se/docs/CVE-2023-27536.html https://curl.se/docs/CVE-2023-27535.html https://curl.se/docs/CVE-2023-27534.html https://curl.se/docs/CVE-2023-27533.html https://www.cve.org/CVERecord?id=CVE-2023-27538 https://www.cve.org/CVERecord?id=CVE-2023-27537 https://www.cve.org/CVERecord?id=CVE-2023-27536 https://www.cve.org/CVERecord?id=CVE-2023-27535 https://www.cve.org/CVERecord?id=CVE-2023-27534 https://www.cve.org/CVERecord?id=CVE-2023-27533 (* Security fix *) x/fcitx5-gtk-5.0.23-x86_64-1.txz: Upgraded. x/libva-utils-2.18.0-x86_64-1.txz: Upgraded. xap/vim-gvim-9.0.1418-x86_64-1.txz: Upgraded. xfce/xfce4-screensaver-4.18.0-x86_64-1.txz: Upgraded.
2023-03-20 19:26:23 +01:00
# Copyright 2013, 2016, 2017, 2023 Patrick Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# This script installs the elilo boot loader, the kernel, and optionally
Fri Oct 18 22:51:09 UTC 2024 a/elilo-3.16-x86_64-17.txz: Rebuilt. eliloconfig: adapt to new naming and lack of huge kernel. Thanks to gildbg. ap/cups-browsed-2.1.0-x86_64-1.txz: Upgraded. Removed support for legacy CUPS browsing and for LDAP Legacy CUPS browsing is not needed any more and, our implementation accepting any UDP packet on port 631, causes vulnerabilities, and our LDAP support is does not comly with RFC 7612 and is therefore limited. Fixes CVE-2024-47176 and CVE-2024-47850 Default `BrowseRemoteProtocols` should not include `cups` protocol Works around CVE-2024-47176, the fix is the complete removal of legacy CUPS Browsing functionality. For more information, see: https://www.cve.org/CVERecord?id=CVE-2024-47176 https://www.cve.org/CVERecord?id=CVE-2024-47850 (* Security fix *) l/dav1d-1.5.0-x86_64-1.txz: Upgraded. l/gvfs-1.56.1-x86_64-1.txz: Upgraded. l/libcupsfilters-2.1.0-x86_64-1.txz: Upgraded. `cfGetPrinterAttributes5()`: Validate response attributes before return The IPP print destination which we are querying can be corrupted or forged, so validate the response to strenghten security. Fixes CVE-2024-47076. For more information, see: https://www.cve.org/CVERecord?id=CVE-2024-47076 (* Security fix *) l/libppd-2.1.0-x86_64-1.txz: Upgraded. Prevent PPD generation based on invalid IPP response Overtaken from CUPS 2.x: Validate IPP attributes in PPD generator, refactor make-and-model code, PPDize preset and template names, quote PPD localized strings. Fixes CVE-2024-47175. For more information, see: https://www.cve.org/CVERecord?id=CVE-2024-47175 (* Security fix *) l/python-MarkupSafe-3.0.2-x86_64-1.txz: Upgraded. l/python-psutil-6.1.0-x86_64-1.txz: Upgraded. x/fcitx5-qt-5.1.8-x86_64-1.txz: Upgraded.
2024-10-19 00:51:09 +02:00
# an initrd into the EFI System Partition. A boot menu entry can also be
# installed using efibootmgr. The kernel used will be whatever the symlink
Tue Oct 22 23:55:03 UTC 2024 a/elilo-3.16-x86_64-18.txz: Rebuilt. eliloconfig: if we don't find initrd-generic.img, try to fall back on /boot/initrd.gz. Thanks to rworkman. a/kernel-firmware-20241022_e1d9577-noarch-1.txz: Upgraded. a/kernel-generic-6.11.5-x86_64-1.txz: Upgraded. a/less-668-x86_64-1.txz: Upgraded. a/openssl11-solibs-1.1.1zb-x86_64-1.txz: Upgraded. a/sysvinit-3.11-x86_64-1.txz: Upgraded. a/usbutils-018-x86_64-1.txz: Upgraded. d/kernel-headers-6.11.5-x86-1.txz: Upgraded. d/parallel-20241022-noarch-1.txz: Upgraded. d/swig-4.3.0-x86_64-1.txz: Upgraded. k/kernel-source-6.11.5-noarch-1.txz: Upgraded. l/libvisio-0.1.8-x86_64-1.txz: Upgraded. l/python-trove-classifiers-2024.10.21.16-x86_64-1.txz: Upgraded. n/openssl11-1.1.1zb-x86_64-1.txz: Upgraded. Apply patch to fix a security issue: Harden BN_GF2m_poly2arr against misuse. This CVE was fixed by the 1.1.1zb release that is only available to subscribers to OpenSSL's premium extended support. The patch was prepared by backporting from the OpenSSL-3.0 repo. The reported version number has been updated so that vulnerability scanners calm down. Thanks to Ken Zalewski for the patch! For more information, see: https://www.cve.org/CVERecord?id=CVE-2024-9143 (* Security fix *) xap/gucharmap-16.0.2-x86_64-1.txz: Upgraded. xap/mozilla-thunderbird-128.3.3esr-x86_64-1.txz: Upgraded. This is a bugfix release. For more information, see: https://www.mozilla.org/en-US/thunderbird/128.3.3esr/releasenotes/ isolinux/initrd.img: Rebuilt. kernels/*: Upgraded. usb-and-pxe-installers/usbboot.img: Rebuilt.
2024-10-23 01:55:03 +02:00
# /boot/vmlinuz-generic points to, and if /boot/initrd-generic.img (or the
# traditional /boot/initrd.gz) exists, that will be installed as the initrd.
#
# The EFI System Partition is expected to be mounted on /boot/efi before
# running this script.
TMP=/var/log/setup/tmp
# 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
# directory named $T_PX, and that gets the first priority.
if [ ! -d "$T_PX" ]; then
if [ ! "$1" = "" ]; then
if [ -d "$1" ]; then
T_PX="$1"
fi
else
# Are we on the installer image?
if [ -r /usr/lib/setup/SeTpartitions ]; then
T_PX=/mnt
# Or, are we on a running system?
elif [ -r /etc/slackware-version ]; then
T_PX=/
# One more installer-likely thing:
elif [ -r /usr/lib/setup/setup ]; then
T_PX=/mnt
else
# We will have to assume we're on an installed and running system.
T_PX=/
fi
fi
fi
# Determine the root partition (such as /dev/sda1)
ROOT_DEVICE=$2
if [ "$ROOT_DEVICE" = "" ]; then
if [ -r $TMP/SeTrootdev ]; then
ROOT_DEVICE="$(cat $TMP/SeTrootdev)"
else
ROOT_DEVICE="$(mount | grep ' / ' | cut -f 1 -d ' ' | head -n 1)"
fi
fi
# If the system is not running under EFI, skip running this script:
if [ ! -d /sys/firmware/efi ]; then
if [ "$T_PX" = "/" ]; then
echo "ERROR: System is not running under UEFI."
fi
exit
fi
# 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 $T_PX/boot/efi ; then
if [ "$T_PX" = "/" ]; then
echo "ERROR: No EFI System Partition mounted on /boot/efi."
fi
exit
fi
fi
# Figure out the device and partition number of the ESP:
DEVLEN=8
PARTLEN=9
if mount | grep vfat | grep -wq /boot/efi ; then
mount | grep vfat | grep -w /boot/efi | grep -q -e nvme -e mmcblk && DEVLEN=12 && PARTLEN=14
EFI_DEVICE=$(mount | grep vfat | grep -w /boot/efi | cut -b 1-${DEVLEN})
EFI_PARTITION=$(mount | grep vfat | grep -w /boot/efi | cut -f 1 -d ' ' | cut -b ${PARTLEN}- | sed 's/[^0-9]*//g')
else
mount | grep vfat | grep -w $T_PX/boot/efi | grep -q -e nvme -e mmcblk && DEVLEN=12 && PARTLEN=14
EFI_DEVICE=$(mount | grep vfat | grep -w $T_PX/boot/efi | cut -b 1-${DEVLEN})
EFI_PARTITION=$(mount | grep vfat | grep -w $T_PX/boot/efi | cut -f 1 -d ' ' | cut -b ${PARTLEN}- | sed 's/[^0-9]*//g')
fi
# There better be a kernel:
Fri Oct 18 22:51:09 UTC 2024 a/elilo-3.16-x86_64-17.txz: Rebuilt. eliloconfig: adapt to new naming and lack of huge kernel. Thanks to gildbg. ap/cups-browsed-2.1.0-x86_64-1.txz: Upgraded. Removed support for legacy CUPS browsing and for LDAP Legacy CUPS browsing is not needed any more and, our implementation accepting any UDP packet on port 631, causes vulnerabilities, and our LDAP support is does not comly with RFC 7612 and is therefore limited. Fixes CVE-2024-47176 and CVE-2024-47850 Default `BrowseRemoteProtocols` should not include `cups` protocol Works around CVE-2024-47176, the fix is the complete removal of legacy CUPS Browsing functionality. For more information, see: https://www.cve.org/CVERecord?id=CVE-2024-47176 https://www.cve.org/CVERecord?id=CVE-2024-47850 (* Security fix *) l/dav1d-1.5.0-x86_64-1.txz: Upgraded. l/gvfs-1.56.1-x86_64-1.txz: Upgraded. l/libcupsfilters-2.1.0-x86_64-1.txz: Upgraded. `cfGetPrinterAttributes5()`: Validate response attributes before return The IPP print destination which we are querying can be corrupted or forged, so validate the response to strenghten security. Fixes CVE-2024-47076. For more information, see: https://www.cve.org/CVERecord?id=CVE-2024-47076 (* Security fix *) l/libppd-2.1.0-x86_64-1.txz: Upgraded. Prevent PPD generation based on invalid IPP response Overtaken from CUPS 2.x: Validate IPP attributes in PPD generator, refactor make-and-model code, PPDize preset and template names, quote PPD localized strings. Fixes CVE-2024-47175. For more information, see: https://www.cve.org/CVERecord?id=CVE-2024-47175 (* Security fix *) l/python-MarkupSafe-3.0.2-x86_64-1.txz: Upgraded. l/python-psutil-6.1.0-x86_64-1.txz: Upgraded. x/fcitx5-qt-5.1.8-x86_64-1.txz: Upgraded.
2024-10-19 00:51:09 +02:00
if [ ! -r $T_PX/boot/vmlinuz-generic ]; then
if [ "$T_PX" = "/" ]; then
Fri Oct 18 22:51:09 UTC 2024 a/elilo-3.16-x86_64-17.txz: Rebuilt. eliloconfig: adapt to new naming and lack of huge kernel. Thanks to gildbg. ap/cups-browsed-2.1.0-x86_64-1.txz: Upgraded. Removed support for legacy CUPS browsing and for LDAP Legacy CUPS browsing is not needed any more and, our implementation accepting any UDP packet on port 631, causes vulnerabilities, and our LDAP support is does not comly with RFC 7612 and is therefore limited. Fixes CVE-2024-47176 and CVE-2024-47850 Default `BrowseRemoteProtocols` should not include `cups` protocol Works around CVE-2024-47176, the fix is the complete removal of legacy CUPS Browsing functionality. For more information, see: https://www.cve.org/CVERecord?id=CVE-2024-47176 https://www.cve.org/CVERecord?id=CVE-2024-47850 (* Security fix *) l/dav1d-1.5.0-x86_64-1.txz: Upgraded. l/gvfs-1.56.1-x86_64-1.txz: Upgraded. l/libcupsfilters-2.1.0-x86_64-1.txz: Upgraded. `cfGetPrinterAttributes5()`: Validate response attributes before return The IPP print destination which we are querying can be corrupted or forged, so validate the response to strenghten security. Fixes CVE-2024-47076. For more information, see: https://www.cve.org/CVERecord?id=CVE-2024-47076 (* Security fix *) l/libppd-2.1.0-x86_64-1.txz: Upgraded. Prevent PPD generation based on invalid IPP response Overtaken from CUPS 2.x: Validate IPP attributes in PPD generator, refactor make-and-model code, PPDize preset and template names, quote PPD localized strings. Fixes CVE-2024-47175. For more information, see: https://www.cve.org/CVERecord?id=CVE-2024-47175 (* Security fix *) l/python-MarkupSafe-3.0.2-x86_64-1.txz: Upgraded. l/python-psutil-6.1.0-x86_64-1.txz: Upgraded. x/fcitx5-qt-5.1.8-x86_64-1.txz: Upgraded.
2024-10-19 00:51:09 +02:00
echo "ERROR: No kernel found at /boot/vmlinuz-generic."
fi
exit
fi
dialog --title "INSTALL ELILO" \
--backtitle "ELILO (EFI Linux Loader) installation" \
--menu "ELILO is a Linux boot loader for \
EFI based systems. Installing ELILO will allow you to boot your Linux \
system from the hard drive after selecting it from the UEFI boot menu. \
Since an EFI System Partition was detected on this machine, it is \
recommended that you install ELILO now. Please select an option:" \
13 70 2 \
"install" "Install ELILO on the EFI System Partition" \
"skip" "Do not install ELILO" 2> $TMP/reply
if [ $? = 1 -o $? = 255 ]; then
exit
fi
REPLY="`cat $TMP/reply`"
rm -f $TMP/reply
if [ "$REPLY" = "skip" ]; then
exit
fi
mkdir -p $T_PX/boot/efi/EFI/Slackware 1> /dev/null 2> /dev/null
cat << EOF > $T_PX/boot/efi/EFI/Slackware/elilo.conf
chooser=simple
delay=1
timeout=1
#
EOF
cp -a $T_PX/boot/elilo-x86_64.efi $T_PX/boot/efi/EFI/Slackware/elilo.efi 1> /dev/null 2> /dev/null
Tue Oct 22 23:55:03 UTC 2024 a/elilo-3.16-x86_64-18.txz: Rebuilt. eliloconfig: if we don't find initrd-generic.img, try to fall back on /boot/initrd.gz. Thanks to rworkman. a/kernel-firmware-20241022_e1d9577-noarch-1.txz: Upgraded. a/kernel-generic-6.11.5-x86_64-1.txz: Upgraded. a/less-668-x86_64-1.txz: Upgraded. a/openssl11-solibs-1.1.1zb-x86_64-1.txz: Upgraded. a/sysvinit-3.11-x86_64-1.txz: Upgraded. a/usbutils-018-x86_64-1.txz: Upgraded. d/kernel-headers-6.11.5-x86-1.txz: Upgraded. d/parallel-20241022-noarch-1.txz: Upgraded. d/swig-4.3.0-x86_64-1.txz: Upgraded. k/kernel-source-6.11.5-noarch-1.txz: Upgraded. l/libvisio-0.1.8-x86_64-1.txz: Upgraded. l/python-trove-classifiers-2024.10.21.16-x86_64-1.txz: Upgraded. n/openssl11-1.1.1zb-x86_64-1.txz: Upgraded. Apply patch to fix a security issue: Harden BN_GF2m_poly2arr against misuse. This CVE was fixed by the 1.1.1zb release that is only available to subscribers to OpenSSL's premium extended support. The patch was prepared by backporting from the OpenSSL-3.0 repo. The reported version number has been updated so that vulnerability scanners calm down. Thanks to Ken Zalewski for the patch! For more information, see: https://www.cve.org/CVERecord?id=CVE-2024-9143 (* Security fix *) xap/gucharmap-16.0.2-x86_64-1.txz: Upgraded. xap/mozilla-thunderbird-128.3.3esr-x86_64-1.txz: Upgraded. This is a bugfix release. For more information, see: https://www.mozilla.org/en-US/thunderbird/128.3.3esr/releasenotes/ isolinux/initrd.img: Rebuilt. kernels/*: Upgraded. usb-and-pxe-installers/usbboot.img: Rebuilt.
2024-10-23 01:55:03 +02:00
if [ -r $T_PX/boot/initrd-generic.img -o -r $T_PX/boot/initrd.gz ]; then
cp $T_PX/boot/vmlinuz-generic $T_PX/boot/efi/EFI/Slackware/vmlinuz 1> /dev/null 2> /dev/null
touch -r $T_PX/boot/vmlinuz-generic $T_PX/boot/efi/EFI/Slackware/vmlinuz
Tue Oct 22 23:55:03 UTC 2024 a/elilo-3.16-x86_64-18.txz: Rebuilt. eliloconfig: if we don't find initrd-generic.img, try to fall back on /boot/initrd.gz. Thanks to rworkman. a/kernel-firmware-20241022_e1d9577-noarch-1.txz: Upgraded. a/kernel-generic-6.11.5-x86_64-1.txz: Upgraded. a/less-668-x86_64-1.txz: Upgraded. a/openssl11-solibs-1.1.1zb-x86_64-1.txz: Upgraded. a/sysvinit-3.11-x86_64-1.txz: Upgraded. a/usbutils-018-x86_64-1.txz: Upgraded. d/kernel-headers-6.11.5-x86-1.txz: Upgraded. d/parallel-20241022-noarch-1.txz: Upgraded. d/swig-4.3.0-x86_64-1.txz: Upgraded. k/kernel-source-6.11.5-noarch-1.txz: Upgraded. l/libvisio-0.1.8-x86_64-1.txz: Upgraded. l/python-trove-classifiers-2024.10.21.16-x86_64-1.txz: Upgraded. n/openssl11-1.1.1zb-x86_64-1.txz: Upgraded. Apply patch to fix a security issue: Harden BN_GF2m_poly2arr against misuse. This CVE was fixed by the 1.1.1zb release that is only available to subscribers to OpenSSL's premium extended support. The patch was prepared by backporting from the OpenSSL-3.0 repo. The reported version number has been updated so that vulnerability scanners calm down. Thanks to Ken Zalewski for the patch! For more information, see: https://www.cve.org/CVERecord?id=CVE-2024-9143 (* Security fix *) xap/gucharmap-16.0.2-x86_64-1.txz: Upgraded. xap/mozilla-thunderbird-128.3.3esr-x86_64-1.txz: Upgraded. This is a bugfix release. For more information, see: https://www.mozilla.org/en-US/thunderbird/128.3.3esr/releasenotes/ isolinux/initrd.img: Rebuilt. kernels/*: Upgraded. usb-and-pxe-installers/usbboot.img: Rebuilt.
2024-10-23 01:55:03 +02:00
if [ -r $T_PX/boot/initrd-generic.img ]; then
cp $T_PX/boot/initrd-generic.img $T_PX/boot/efi/EFI/Slackware/initrd.gz 1> /dev/null 2> /dev/null
touch -r $T_PX/boot/initrd-generic.img $T_PX/boot/efi/EFI/Slackware/initrd.gz
else # we know from the previous test that /boot/initrd.gz exists:
cp $T_PX/boot/initrd.gz $T_PX/boot/efi/EFI/Slackware/initrd.gz 1> /dev/null 2> /dev/null
touch -r $T_PX/boot/initrd $T_PX/boot/efi/EFI/Slackware/initrd.gz
fi
cat << EOF >> $T_PX/boot/efi/EFI/Slackware/elilo.conf
image=vmlinuz
label=vmlinuz
initrd=initrd.gz
EOF
else
Fri Oct 18 22:51:09 UTC 2024 a/elilo-3.16-x86_64-17.txz: Rebuilt. eliloconfig: adapt to new naming and lack of huge kernel. Thanks to gildbg. ap/cups-browsed-2.1.0-x86_64-1.txz: Upgraded. Removed support for legacy CUPS browsing and for LDAP Legacy CUPS browsing is not needed any more and, our implementation accepting any UDP packet on port 631, causes vulnerabilities, and our LDAP support is does not comly with RFC 7612 and is therefore limited. Fixes CVE-2024-47176 and CVE-2024-47850 Default `BrowseRemoteProtocols` should not include `cups` protocol Works around CVE-2024-47176, the fix is the complete removal of legacy CUPS Browsing functionality. For more information, see: https://www.cve.org/CVERecord?id=CVE-2024-47176 https://www.cve.org/CVERecord?id=CVE-2024-47850 (* Security fix *) l/dav1d-1.5.0-x86_64-1.txz: Upgraded. l/gvfs-1.56.1-x86_64-1.txz: Upgraded. l/libcupsfilters-2.1.0-x86_64-1.txz: Upgraded. `cfGetPrinterAttributes5()`: Validate response attributes before return The IPP print destination which we are querying can be corrupted or forged, so validate the response to strenghten security. Fixes CVE-2024-47076. For more information, see: https://www.cve.org/CVERecord?id=CVE-2024-47076 (* Security fix *) l/libppd-2.1.0-x86_64-1.txz: Upgraded. Prevent PPD generation based on invalid IPP response Overtaken from CUPS 2.x: Validate IPP attributes in PPD generator, refactor make-and-model code, PPDize preset and template names, quote PPD localized strings. Fixes CVE-2024-47175. For more information, see: https://www.cve.org/CVERecord?id=CVE-2024-47175 (* Security fix *) l/python-MarkupSafe-3.0.2-x86_64-1.txz: Upgraded. l/python-psutil-6.1.0-x86_64-1.txz: Upgraded. x/fcitx5-qt-5.1.8-x86_64-1.txz: Upgraded.
2024-10-19 00:51:09 +02:00
cp $T_PX/boot/vmlinuz-generic $T_PX/boot/efi/EFI/Slackware/vmlinuz 1> /dev/null 2> /dev/null
touch -r $T_PX/boot/vmlinuz-generic $T_PX/boot/efi/EFI/Slackware/vmlinuz
cat << EOF >> $T_PX/boot/efi/EFI/Slackware/elilo.conf
image=vmlinuz
label=vmlinuz
EOF
fi
cat << EOF >> $T_PX/boot/efi/EFI/Slackware/elilo.conf
read-only
append="root=$ROOT_DEVICE vga=normal ro"
EOF
dialog --title "INSTALL BOOT MENU ENTRY?" \
--backtitle "ELILO (EFI Linux Loader) installation" \
--menu "Would you like to install \
a boot menu entry so that you can easily select Slackware when you boot your \
machine? WARNING: DO NOT install a boot menu entry on Apple hardware. \
Apple computers use a different type of EFI firmware, and efibootmgr has \
been known to damage them. On all other computers, it is recommended to add \
a boot menu entry. Please select an option:" \
14 70 2 \
"install" "Install a boot menu entry" \
"skip" "Do not install a boot menu entry" 2> $TMP/reply
if [ $? = 1 -o $? = 255 ]; then
exit
fi
REPLY="`cat $TMP/reply`"
rm -f $TMP/reply
if [ "$REPLY" = "skip" ]; then
exit
fi
efibootmgr -v | rev | cut -f 2- | rev | grep Boot0 | grep Slackware | while read line ; do
# Reject entries that don't exactly match as not our business
if [ ! "$(echo $line | cut -f 2- -d ' ')" = "Slackware" ]; then
continue
fi
ENTRY="$(efibootmgr -v | grep "^$(echo $line | cut -b1-8)")"
dialog --title "REMOVE OLD \"Slackware\" EFI BOOT ENTRY?" \
--backtitle "ELILO (EFI Linux Loader) installation" \
--yesno "An old Slackware boot entry has been found in your EFI boot menu. \
Would you like to remove this before installing the new Slackware boot \
entry? This is recommended.\n\nOld EFI boot menu entry:\n$ENTRY" 13 70
if [ ! $? = 0 ]; then
continue
fi
# Remove the boot entry:
efibootmgr -q -B -b $(echo $line | cut -b5-8)
sleep 1
done
efibootmgr -q -c -d $EFI_DEVICE -p $EFI_PARTITION -l "\\EFI\\Slackware\\elilo.efi" -L "Slackware"
sleep 1
efibootmgr -v | rev | cut -f 2- | rev | grep Boot0 | grep Slackware | while read line ; do
# Reject entries that don't exactly match as not our business
if [ ! "$(echo $line | cut -f 2- -d ' ')" = "Slackware" ]; then
continue
fi
ENTRY="$(efibootmgr -v | grep "^$(echo $line | cut -b1-8)")"
if echo $ENTRY | grep -q -F "\EFI\Slackware\elilo.efi" ; then
dialog --title "EFI BOOT ENTRY INSTALLED" \
--backtitle "ELILO (EFI Linux Loader) installation" \
--msgbox "A Slackware boot entry has been installed to your EFI boot
menu.\n\nEFI boot menu entry:\n$ENTRY" 11 70
fi
done
# Done.