aboutsummaryrefslogtreecommitdiffstats
path: root/make_slackware_live.sh
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xmake_slackware_live.sh54
1 files changed, 40 insertions, 14 deletions
diff --git a/make_slackware_live.sh b/make_slackware_live.sh
index 6ac1175..d48d2c3 100755
--- a/make_slackware_live.sh
+++ b/make_slackware_live.sh
@@ -35,7 +35,7 @@
# -----------------------------------------------------------------------------
# Version of the Live OS generator:
-VERSION="1.8.1.1"
+VERSION="1.8.1.2"
# Timestamp:
THEDATE=$(date +%Y%m%d)
@@ -383,6 +383,17 @@ function cleanup() {
trap 'echo "*** $0 FAILED at line $LINENO ***"; cleanup; exit 1' ERR INT TERM
+# Slackware since September 2024 no longer has a kernel-modules package,
+# nor kernel-huge; all modules are added to the kernel-generic package:
+function find_modulespackage() {
+ local MYDIR=$1
+ if ls ${MYDIR}/var/log/packages/kernel*modules* 1>/dev/null 2>/dev/null; then
+ echo modules
+ else
+ echo generic
+ fi
+} # End of find_modulespackage()
+
# Uncompress the initrd based on the compression algorithm used:
function uncompressfs() {
if $(file "${1}" | grep -qi ": gzip"); then
@@ -409,7 +420,8 @@ function full_pkgname() {
# fi
#done
#echo "$FL"
- echo "$(find ${TOPDIR}/ -name "${PACK}-*.t?z" 2>/dev/null |grep -E "\<${PACK//+/\\+}-[^-]+-[^-]+-[^-]+.t?z" |head -1)"
+ # Return the file with the most recent timestamp:
+ echo "$(find ${TOPDIR}/ -name "${PACK}-*.t?z" -exec ls -t {} + 2>/dev/null |grep -E "\<${PACK//+/\\+}-[^-]+-[^-]+-[^-]+.t?z" |head -1)"
else
echo ""
fi
@@ -1020,8 +1032,8 @@ function secureboot() {
if [ "${SHIM_VENDOR}" = "fedora" ]; then
# The version of Fedora's shim package - always use the latest!
- SHIM_MAJVER=15.6
- SHIM_MINVER=2
+ SHIM_MAJVER=15.8
+ SHIM_MINVER=3
SHIMSRC="https://kojipkgs.fedoraproject.org/packages/shim/${SHIM_MAJVER}/${SHIM_MINVER}/x86_64/shim-x64-${SHIM_MAJVER}-${SHIM_MINVER}.x86_64.rpm"
echo "-- Downloading/installing the SecureBoot signed shim from Fedora."
wget -q --progress=dot:mega --show-progress ${SHIMSRC} -O - \
@@ -1037,7 +1049,7 @@ function secureboot() {
# ${LIVE_STAGING}/EFI/BOOT/fbx64.efi
elif [ "${SHIM_VENDOR}" = "opensuse" ]; then
SHIM_MAJVER=15.4
- SHIM_MINVER=6.1
+ SHIM_MINVER=7.2
SHIMSRC="https://download.opensuse.org/repositories/openSUSE:/Factory/standard/x86_64/shim-${SHIM_MAJVER}-${SHIM_MINVER}.x86_64.rpm"
echo "-- Downloading/installing the SecureBoot signed shim from openSUSE."
wget -q --progress=dot:mega --show-progress ${SHIMSRC} -O - \
@@ -1052,9 +1064,9 @@ function secureboot() {
#install -D -m0644 usr/share/efi/x86_64/fallback.efi \
# ${LIVE_STAGING}/EFI/BOOT/fallback.efi
elif [ "${SHIM_VENDOR}" = "debian" ]; then
- DEBSHIM_VER=1.40
+ DEBSHIM_VER=1.44
DEBMOKM_VER=1
- SHIM_MAJVER=15.7
+ SHIM_MAJVER=15.8
SHIM_MINVER=1
SHIMSRC="http://ftp.de.debian.org/debian/pool/main/s/shim-signed/shim-signed_${DEBSHIM_VER}+${SHIM_MAJVER}-${SHIM_MINVER}_amd64.deb"
MOKMSRC="http://ftp.de.debian.org/debian/pool/main/s/shim-helpers-amd64-signed/shim-helpers-amd64-signed_${DEBMOKM_VER}+${SHIM_MAJVER}+${SHIM_MINVER}_amd64.deb"
@@ -1730,11 +1742,12 @@ for SPS in ${SL_SERIES} ; do
if [ "$SPS" = "a" -a "$CORE2RAM" = "NO" ] || [ "$SPS" = "${MINLIST}" ]; then
# We need to take care of a few things first:
+ KPKGDET=$(find_modulespackage $INSTDIR)
if [ "$SL_ARCH" = "x86_64" -o "$SMP32" = "NO" ]; then
- KGEN=$(ls --indicator-style=none ${INSTDIR}/var/log/packages/kernel*modules* |grep -v smp |head -1 |rev | cut -d- -f3 |tr _ - |rev)
+ KGEN=$(ls --indicator-style=none ${INSTDIR}/var/log/packages/kernel*${KPKGDET}* |grep -v smp |head -1 |rev | cut -d- -f3 |tr _ - |rev)
KVER=$(ls --indicator-style=none ${INSTDIR}/lib/modules/ |grep -v smp |head -1)
else
- KGEN=$(ls --indicator-style=none ${INSTDIR}/var/log/packages/kernel*modules* |grep smp |head -1 |rev | cut -d- -f3 |tr _ - |rev)
+ KGEN=$(ls --indicator-style=none ${INSTDIR}/var/log/packages/kernel*${KPKGDET}* |grep smp |head -1 |rev | cut -d- -f3 |tr _ - |rev)
KVER=$(ls --indicator-style=none ${INSTDIR}/lib/modules/ |grep smp |head -1)
fi
if [ -z "$KVER" ]; then
@@ -1742,6 +1755,13 @@ for SPS in ${SL_SERIES} ; do
cleanup
exit 1
else
+ # Do we use old style (vmlinuz-generic-$KGEN) or new style
+ # (vmlinuz-$KGEN-generic) kernel image name?
+ if [ -f ${INSTDIR}/boot/vmlinuz-${KGEN}-generic ]; then
+ KIMGNAME_STYLE="NEW"
+ else
+ KIMGNAME_STYLE="OLD"
+ fi
# Move the content of the /boot directory out of the minimal system,
# this will be joined again using overlay:
rm -rf ${LIVE_BOOT}/boot
@@ -1798,11 +1818,12 @@ umount -R ${LIVE_ROOTDIR} 2>${DBGOUT} || true
mount -t overlay -o lowerdir=${RODIRS},upperdir=${INSTDIR},workdir=${LIVE_OVLDIR} overlay ${LIVE_ROOTDIR}
# Determine the kernel version in the Live OS:
+KPKGDET=$(find_modulespackage $LIVE_ROOTDIR)
if [ "$SL_ARCH" = "x86_64" -o "$SMP32" = "NO" ]; then
- KGEN=$(ls --indicator-style=none ${LIVE_ROOTDIR}/var/log/packages/kernel*modules* |grep -v smp |head -1 |rev | cut -d- -f3 |tr _ - |rev)
+ KGEN=$(ls --indicator-style=none ${LIVE_ROOTDIR}/var/log/packages/kernel*${KPKGDET}* |grep -v smp |head -1 |rev | cut -d- -f3 |tr _ - |rev)
KVER=$(ls --indicator-style=none ${LIVE_ROOTDIR}/lib/modules/ |grep -v smp |head -1)
else
- KGEN=$(ls --indicator-style=none ${LIVE_ROOTDIR}/var/log/packages/kernel*modules* |grep smp |head -1 |rev | cut -d- -f3 |tr _ - |rev)
+ KGEN=$(ls --indicator-style=none ${LIVE_ROOTDIR}/var/log/packages/kernel*${KPKGDET}* |grep smp |head -1 |rev | cut -d- -f3 |tr _ - |rev)
KVER=$(ls --indicator-style=none ${LIVE_ROOTDIR}/lib/modules/ |grep smp |head -1)
fi
@@ -3410,11 +3431,12 @@ mount --bind /sys ${LIVE_ROOTDIR}/sys
mount --bind /dev ${LIVE_ROOTDIR}/dev
# Determine the installed kernel version:
+KPKGDET=$(find_modulespackage $LIVE_ROOTDIR)
if [ "$SL_ARCH" = "x86_64" -o "$SMP32" = "NO" ]; then
- KGEN=$(ls --indicator-style=none ${LIVE_ROOTDIR}/var/log/packages/kernel*modules* |grep -v smp |head -1 |rev | cut -d- -f3 |tr _ - |rev)
+ KGEN=$(ls --indicator-style=none ${LIVE_ROOTDIR}/var/log/packages/kernel*${KPKGDET}* |grep -v smp |head -1 |rev | cut -d- -f3 |tr _ - |rev)
KVER=$(ls --indicator-style=none ${LIVE_ROOTDIR}/lib/modules/ |grep -v smp |head -1)
else
- KGEN=$(ls --indicator-style=none ${LIVE_ROOTDIR}/var/log/packages/kernel*modules* |grep smp |head -1 |rev | cut -d- -f3 |tr _ - |rev)
+ KGEN=$(ls --indicator-style=none ${LIVE_ROOTDIR}/var/log/packages/kernel*${KPKGDET}* |grep smp |head -1 |rev | cut -d- -f3 |tr _ - |rev)
KVER=$(ls --indicator-style=none ${LIVE_ROOTDIR}/lib/modules/ |grep smp |head -1)
fi
@@ -3523,7 +3545,11 @@ umount -R ${LIVE_ROOTDIR} || true
# Note to self: syslinux does not 'see' files unless they are DOS 8.3 names?
rm -rf ${LIVE_STAGING}/boot
mkdir -p ${LIVE_STAGING}/boot
-cp -a ${LIVE_BOOT}/boot/vmlinuz-generic*-$KGEN ${LIVE_STAGING}/boot/generic
+if [ "${KIMGNAME_STYLE}" = "OLD" ]; then
+ cp -a ${LIVE_BOOT}/boot/vmlinuz-generic*-${KGEN} ${LIVE_STAGING}/boot/generic
+else
+ cp -a ${LIVE_BOOT}/boot/vmlinuz-${KGEN}-generic ${LIVE_STAGING}/boot/generic
+fi
mv ${LIVE_BOOT}/boot/initrd_${KVER}.img ${LIVE_STAGING}/boot/initrd.img
# Squash the boot directory into its own module: