summaryrefslogtreecommitdiffstats
path: root/source/installer
diff options
context:
space:
mode:
Diffstat (limited to 'source/installer')
-rw-r--r--source/installer/ChangeLog.txt210
-rwxr-xr-xsource/installer/build_installer.sh182
-rwxr-xr-xsource/installer/installer.SlackBuild8
-rwxr-xr-xsource/installer/repack_installer.SlackBuild8
-rwxr-xr-xsource/installer/sources/bricktick/fetch-bricktick.sh52
-rw-r--r--source/installer/sources/dnsmasq/dnsmasq-2.80-SIOCGSTAMP.patch60
-rw-r--r--source/installer/sources/dnsmasq/dnsmasq.leasedir.diff24
-rw-r--r--source/installer/sources/dnsmasq/dnsmasq.libidn2.diff13
-rw-r--r--source/installer/sources/initrd/etc/keymaps.tarbin573440 -> 0 bytes
l---------source/installer/sources/initrd/etc/mtab (renamed from source/installer/sources/initrd/etc/mounts)0
-rwxr-xr-xsource/installer/sources/initrd/etc/rc.d/rc.S51
-rwxr-xr-xsource/installer/sources/initrd/etc/rc.d/rc.pcmcia2
-rwxr-xr-xsource/installer/sources/initrd/sbin/mkbindmounts10
-rwxr-xr-xsource/installer/sources/initrd/sbin/probe73
-rwxr-xr-xsource/installer/sources/initrd/usr/lib/setup/INS-all-in-one199
-rwxr-xr-xsource/installer/sources/initrd/usr/lib/setup/SeTEFI17
-rwxr-xr-xsource/installer/sources/initrd/usr/lib/setup/SeTconfig4
-rwxr-xr-xsource/installer/sources/initrd/usr/lib/setup/SeTkeymap183
-rwxr-xr-xsource/installer/sources/initrd/usr/lib/setup/SeTmedia12
-rwxr-xr-xsource/installer/sources/initrd/usr/lib/setup/SeTpasswd2
-rwxr-xr-xsource/installer/sources/initrd/usr/lib/setup/pxesetup4
-rwxr-xr-xsource/installer/sources/initrd/usr/lib/setup/setup56
22 files changed, 911 insertions, 259 deletions
diff --git a/source/installer/ChangeLog.txt b/source/installer/ChangeLog.txt
index cc5c2610b..6b40c72d4 100644
--- a/source/installer/ChangeLog.txt
+++ b/source/installer/ChangeLog.txt
@@ -1,3 +1,213 @@
+Mon Mar 18 08:08:08 UTC 2024
+ Added console font 'ter-v18n' to accommodate the Raspberry Pi 400's screen.
+ Thanks to BrianL.
++--------------------------+
+Sun Mar 10 17:49:27 UTC 2024
+ mkbindmounts: also bind mount /sys/firmware/efi/efivars if it exists.
+ SeTconfig: also bind mount /sys/firmware/efi/efivars if it exists.
++--------------------------+
+Thu Feb 1 19:36:54 UTC 2024
+ Don't add elilo boot support to the 32-bit installer image. This had been
+ done previously, but began being siliently dropped when the 32-bit kernel
+ changed from i586 to i686. But it's just as well since UEFI cannot directly
+ boot a 32-bit kernel anyway. Legacy BIOS is the only option.
++--------------------------+
+Wed Jan 31 20:35:22 UTC 2024
+ Added libnvme.
++--------------------------+
+Tue Jan 2 09:03:56 UTC 2024
+ build_installer.sh: Switch /sbin/modinfo from BusyBox's implementation to
+ kmod's, as the busybox implementation doesn't work.
+ Switch /bin/grep to the GNU implementation for a richer feature set.
+ Use the /bin/{e,f}grep shell wrappers, aligned with the OS.
+ /etc/rc.d/rc.S: Call /bin/grep rather than /bin/grep.bin
++--------------------------+
+Mon Dec 11 20:24:00 UTC 2023
+ build_installer.sh: On x86, don't try to use a kernel with an -smp
+ LOCALVERSION as it's no longer built. The regularly-named kernels are now
+ the SMP/i686 versions.
+ repack_installer.SlackBuild: Change x86 $ARCH to i686 and drop -smp
+ LOCALVERSION.
++--------------------------+
+Fri Dec 1 09:49:03 GMT 2023
+ Busybox's version of 'xzcat' creates distinct output compared to the actual
+ 'xz' when combined with 'dd' through piping. This issue is fixed by creating
+ a symbolic link from /bin/xzcat to /bin/xz (the 'real' xz).
+ Thanks to Stuart Winter.
++--------------------------+
+Sat Nov 25 17:21:48 UTC 2023
+ Added /usr/libexec/nfsrahead from nfs-utils package to fix error:
+ udevd[452]: failed to execute '/usr/libexec/nfsrahead'
+ '/usr/libexec/nfsrahead 254:0': No such file or directory
+ Thanks to Brent Earl.
++--------------------------+
+Wed Nov 8 21:01:19 UTC 2023
+ Include the original keymaps from the kbd package, as well as the official
+ loadkeys binary and supporting libraries. Some keymaps seem to get broken
+ or mangled from being converted to a binary keymap and loaded with the
+ busybox loadkmap tool.
+ If a keymap is specified on the kernel command line, like: kbd=azerty
+ then after loading it, save the name to /tmp/Pkeymap so that setup knows
+ about it.
+ Construct the list of keymaps on the fly from the /usr/share/kbd/keymaps/i386
+ directory.
++--------------------------+
+Wed Sep 20 08:08:08 UTC 2023
+ Changes for AArch64 architecture:
+ /sbin/probe: Updated reserved file system labels for Hardware Models with
+ UEFI firmware.
+ In 'list_mmc' MMC discovery function, prevent duplication of multi-path
+ devices.
+ /usr/lib/setup/SeTEFI: The Slackware Installer image has its own EFI boot
+ partition named 'SLKins_efi' to support Hardware Models using UEFI firmware.
+ This partition must be filtered out here to avoid it being incorrectly
+ selected as the OS's EFI partition.
+ Thanks to Stuart Winter.
++--------------------------+
+Tue Aug 15 19:15:38 UTC 2023
+ Don't run rc.font unless a kernel command-line flag RCFONT is provided.
+ Legacy BIOS tends to get a correct sized font without it, as does recent
+ UEFI. Running it by default with a HiDPI screen can result in an
+ unreadably small font.
++--------------------------+
+Tue Aug 1 09:09:59 UTC 2023
+ Added /usr/lib(64)/libatomic.so for 'lsusb'
+ Thanks to William PC for the report.
++--------------------------+
+Sun Jul 9 18:25:37 UTC 2023
+ setup: mount /dev, /proc, and /sys with -rbind, and unmount them with -R.
+ mkbindmounts: usr -rbind instead of -bind.
+ reboot: use -R when unmounting /dev, /proc, and /sys.
+ These changes should fix "EFI variables are not supported on this system"
+ when chrooting into /mnt to do additional tasks such as setting up grub.
+ Thanks to downhomechunk.
++--------------------------+
+Sat Jul 1 03:15:09 UTC 2023
+ AArch64:
+ /sbin/probe: Added reserved file system labels for Hardware Models
+ with UEFI firmware:
+ SLKefi = FAT32 file system, /boot/efi mountpoint within the OS.
+ SLKefi_fw = ext4 file system within the Installer image containing UEFI
+ firmware. The firmware can be offered up for flashing to SPI from
+ within the post installation scripts.
+ Thanks to Stuart Winter.
++--------------------------+
+Fri Jun 30 19:34:16 UTC 2023
+ Make /etc/mtab a symlink to /proc/mounts. (I thought we did this before?)
+ Remove /etc/mounts symlink.
+ In rc.S, don't try to initialize /etc/mtab or fake mount /.
++--------------------------+
+Tue Jun 13 20:02:38 UTC 2023
+ Added liburcu and liburcu-common libraries for xfsprogs.
++--------------------------+
+Thu May 25 00:15:21 UTC 2023
+ Mount efivarfs.
++--------------------------+
+Wed Apr 5 19:09:55 UTC 2023
+ build_installer.sh: Switch /sbin/depmod from BusyBox's implementation to
+ kmod's, as the busybox implementation doesn't work.
+ Get rid of broken /sbin/lspci symlink.
++--------------------------+
+Tue Mar 21 21:05:06 UTC 2023
+ setup: if UEFI is detected, mount efivarfs.
++--------------------------+
+Mon Mar 20 22:18:55 UTC 2023
+ Keep efivarfs kernel module. Thanks to AlleyTrotter.
++--------------------------+
+Wed Mar 1 21:15:12 UTC 2023
+ Add libreiserfscore.so.0.0.0.
++--------------------------+
+Tue Jan 24 20:26:12 UTC 2023
+ build_installer.sh: when compressing the completed installer with xz, use
+ option -vv instead of -v, since the change of default verbosity level seems
+ to have caused just a single -v to be ignored.
++--------------------------+
+Thu Jan 19 20:44:24 UTC 2023
+ build_installer.sh: Switch /bin/dd from BusyBox's implementation to
+ Coreutils', which offers a richer feature set. For example, the command line
+ parameter 'status=progress' provides realtime visibility of critical metrics
+ (transfer speed, ETA, % complete). This helps when working with the storage,
+ where the installer is used as an preparation and test environment.
+ Thanks to Stuart Winter.
+ Added "bricktick", an ncurses based game (why not, it's only 31K)
++--------------------------+
+Wed Jan 18 20:30:13 UTC 2023
+ /usr/lib/setup/INS-all-in-one: Added.
+ This detects the AiO (All in One Offline) partition labeled 'SLKins_aio-pkgs'
+ that houses the Slackware source media (installable packages), and configures
+ the Installer to use it as the media source.
+ /usr/lib/setup/SeTmedia: Call INS-all-in-one first to discover the A-i-O media
+ partition. If unavailable, fails sanity check or the user opted not to use
+ the included media, the regular set of source media selection options are
+ presented.
+ /usr/lib/setup/setup: Post install: If the A-i-O partition is mounted, umount
+ and suggest to physically unplug the Slackware Installer USB stick.
+ This is skipped on ARM since the A-i-O partition resides on the same storage
+ as the OS' /boot partition, so cannot/should not be removed.
+ Fixed white space in license header.
+ /usr/lib/setup/SeTpasswd: Clear screen before setting 'root' user password to
+ fix a text overlap from the 'dialog' box when installing over SSH.
+ Thanks to Stuart Winter.
++--------------------------+
+Tue Jan 17 20:55:17 UTC 2023
+ pxesetup: after sorting the partition list, run it through 'uniq' to ensure
+ no duplicates are listed. Thanks to 'opty' in Libera.Chat ##slackware.
++--------------------------+
+Mon Jan 9 09:37:40 UTC 2023
+ /sbin/probe: Removed old mmc discovery code.
+ Filter devices that contain reserved file system labels for Slackware
+ ARM/AArch64 and the A-i-O (All in One Offline) Installer.
+ This prevents the installation media and Slackware ARM system partitions from
+ appearing as candidates for formatting/mounting during setup.
+ Reserved labels:
+ SLKins = Media (usually a USB stick) containing the Slackware install media.
+ SLKboot = Slackware OS /boot partition; only reserved only on ARM/AArch64.
+ SLKhwm_bw = Hardware Model Bootware - native Bootware firmware/assets.
+ SLKins_aio-pkgs = A-i-O Installer's partition containing Slackware packages.
+ Thanks to Stuart Winter.
++--------------------------+
+Thu Oct 13 12:29:18 UTC 2022
+ Moved libpcre2 from /usr/lib(64) to /lib(64). Thanks to Stuart Winter.
++--------------------------+
+Mon Sep 26 14:43:44 UTC 2022
+ /sbin/probe: Fix duplicated enumeration of mmc storage devices (e.g. SD cards).
+ Thanks to gsl on LQ for the report.
++--------------------------+
+Mon Sep 12 18:09:41 UTC 2022
+ Removed pcre, added pcre2. Needed for GNU grep.
+ Thanks to EdGr.
++--------------------------+
+Tue Sep 6 18:34:42 UTC 2022
+ rc.pcmcia: change fgrep to grep -F.
+ /sbin/probe: change egrep to grep -E.
++--------------------------+
+Fri Aug 19 08:08:08 UTC 2022
+ /etc/rc.d/rc.S: Added support for setting the Installer's root password
+ from a Kernel cmdline key value pair, instrootpw=yourpassword
+ This is intended for network installations where otherwise the root password
+ would be unset.
+ Note: this does not configure the OS root password.
+ Passwords should be set as follows within the Kernel cmdline:
+ instrootpw=yourpassword
+ MoZes.
++--------------------------+
+Wed Jun 29 19:13:25 UTC 2022
+ Added smartctl, smartctl.8, and dmidecode.8.
++--------------------------+
+Tue Jun 14 08:08:08 UTC 2022
+ Added liblz4 for fsck.f2fs. Thanks to Brent Earl.
++--------------------------+
+Mon Feb 7 19:03:07 UTC 2022
+ Add a /usr/bin/dbclient symlink. Thanks to alienBOB.
++--------------------------+
+Sat Feb 5 23:02:19 UTC 2022
+ Build a simplified version of dnsmasq that doesn't require libraries not
+ found on the installer. Unfortunately this bug broke PXE installation.
+ If you require PXE support for your installs, use this installer instead.
+ It will work on Slackware 15.0 as well.
+ Not entirely sure if this merits respinning the ISOs for 15.0... feel free
+ to make a thread on LQ and weigh in with any comments.
++--------------------------+
Sat Jan 22 21:34:07 UTC 2022
Reverted to an older simpler version of rescan-scsi-bus that does what we
need it to on the installer. Apparently the one we upgraded to requires the
diff --git a/source/installer/build_installer.sh b/source/installer/build_installer.sh
index 42bb23539..6cf9cf664 100755
--- a/source/installer/build_installer.sh
+++ b/source/installer/build_installer.sh
@@ -1,9 +1,7 @@
#!/bin/bash
set +o posix
-# $Id: build_installer.sh,v 1.129 2011/04/13 23:03:07 eha Exp eha $
-#
-# Copyright 2005-2021 Stuart Winter, Surrey, England, UK
+# Copyright 2005-2024 Stuart Winter, Earth, Milky Way, ""
# Copyright 2008, 2009, 2010, 2011, 2017 Eric Hameleers, Eindhoven, Netherlands
# Copyright 2011-2020 Patrick Volkerding, Sebeka, MN, USA
# All rights reserved.
@@ -54,7 +52,7 @@ shopt -s extglob
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i586 ;;
+ i?86) export ARCH=i686 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
@@ -108,6 +106,7 @@ case $ARCH in
# The firmware we include by default is only for x86, but
ADD_NETFIRMWARE=1 # we'll probably want to include some at some stage. For now supply -nf to this script.
ADD_NANO=1
+ ADD_BRICKTICK=1
;;
x86_64)
ADD_NETMODS=1
@@ -124,8 +123,9 @@ case $ARCH in
VERBOSE=1
ADD_NETFIRMWARE=1 # Include the network card firmware
ADD_NANO=1
+ ADD_BRICKTICK=1
;;
- i586)
+ i686)
ADD_NETMODS=1
ADD_PCMCIAMODS=1
ADD_MANPAGES=1
@@ -136,10 +136,11 @@ case $ARCH in
RECOMPILE=1
SPLIT_INITRD=0
USBBOOT=1
- EFIBOOT=1
+ EFIBOOT=0
VERBOSE=1
ADD_NETFIRMWARE=1 # Include the network card firmware
ADD_NANO=1
+ ADD_BRICKTICK=1
;;
*)
ADD_NETMODS=1 # add network modules
@@ -155,6 +156,7 @@ case $ARCH in
VERBOSE=1 # show a lot of additional output
ADD_NETFIRMWARE=1 # Include the network card firmware
ADD_NANO=1
+ ADD_BRICKTICK=1
;;
esac
@@ -164,7 +166,7 @@ case $ARCH in
ARCHQUADLET="-gnueabihf" ;;
aarch64) SLKCFLAGS="-O2"
ARCHQUADLET="" ;;
- i?86) SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ i?86) SLKCFLAGS="-O2 -march=i686 -mtune=i686"
ARCHQUADLET="" ;;
s390*) SLKCFLAGS="-O2"
ARCHQUADLET="" ;;
@@ -194,10 +196,8 @@ case $ARCH in
i?86)
# What kernel directories are in this installer?
KERNELS[0]=huge.s
- KERNELS[1]=hugesmp.s
# The -extraversion (appended to the $KVER) for the KERNELS[*]:
KEXTRAV[0]=""
- KEXTRAV[1]="-smp"
;;
x86_64)
# What kernel directories are in this installer?
@@ -235,6 +235,10 @@ while [ ! -z "$1" ]; do
ADD_NETMODS=1
shift
;;
+ -nb|--no-bricktick)
+ ADD_BRICKTICK=0
+ shift
+ ;;
-nc|--no-compressmods)
COMPRESS_MODS=0
shift
@@ -543,7 +547,7 @@ rm -rf $TMP/extract-packages
mkdir -p -m755 $TMP/extract-packages
cd $TMP/extract-packages
-# Unpack the real i586/current Slackware initrd.img (or a custom one specified
+# Unpack the real i686/current Slackware initrd.img (or a custom one specified
# with the '-I' parameter):
xzcat -f${VERBOSE1} $INITRDIMG | cpio -di${VERBOSE1}
@@ -581,9 +585,6 @@ rm -rf $TMP/extract-packages
# Re-create essential symlinks
ln -sf sbin/init init
-( cd bin; ln -sf grep.bin grep )
-( cd bin; ln -sf grep.bin egrep )
-( cd bin; ln -sf grep.bin fgrep )
( cd bin; ln -sf gzip zcat )
( cd bin; ln -sf /usr/bin/compress compress )
( cd usr/bin; ln -sf ../../bin/gzip zcat )
@@ -670,9 +671,9 @@ make $SILENTMAKE $NUMJOBS CFLAGS="$SLKCFLAGS" || exit 1
make $SILENTMAKE $NUMJOBS install || exit 1
cd _install
-# Since Slackware 's installer uses the 'date' from coreutils, and 'zcat'
-# script from gzip, we delete the busybox symlinks:
-rm -f${VERBOSE1} bin/date bin/zcat
+# Since Slackware's installer uses the 'date' and 'dd' from coreutils,
+# and the 'zcat' script from gzip, we delete the busybox symlinks:
+rm -f${VERBOSE1} bin/{date,dd,zcat}
# Likewise, we will remove the 'fdisk' applet which overwrites our shell script:
rm -f${VERBOSE1} sbin/fdisk
@@ -759,6 +760,9 @@ make $SILENTMAKE DESTDIR=$PKG/$ARCH-installer-filesystem/ MULTI="1" install || e
done
)
+# Evidently dropbearmulti wants dbclient in /usr/bin:
+( cd $PKG/$ARCH-installer-filesystem/usr/bin ; ln -sf ../../bin/dbclient . )
+
}
############### Build nano #####################################################
@@ -825,6 +829,84 @@ fi
}
+
+############### Build bricktick ################################################
+
+build_bricktick()
+{
+echo "--- Building bricktick ncurses game ---"
+# Extract source:
+cd $TMP
+if [ -d $CWD/sources/bricktick ]; then
+ echo "--- Using _your_ bricktick sources (not those in the Slacktree) ---"
+ BRICKTICKPATH=$CWD/sources/bricktick
+elif [ -d $SRCDIR/sources/bricktick ]; then
+ echo "--- Using _your_ bricktick sources (not those in the Slacktree) ---"
+ BRICKTICKPATH=$SRCDIR/sources/bricktick
+else
+ # Use the bricktick sources from the Slackware tree.
+ BRICKTICKPATH=$SLACKROOT/source/installer/bricktick
+fi
+[ ! -d $BRICKTICKPATH ] && ( echo "No directory '$BRICKTICKPATH'" ; exit 1 )
+BRICKTICKPKG=$(ls -1 $BRICKTICKPATH/bricktick-*.tar.?z | head -1)
+BRICKTICKVER=$(echo $BRICKTICKPKG | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
+tar x${VERBOSE2}f $BRICKTICKPKG
+
+echo "--- Compiling BRICKTICK version '$BRICKTICKVER' ---"
+cd bricktick* || exit 1
+chown -R root:root .
+chmod -R u+w,go+r-w,a-s .
+
+# Build:
+make $NUMJOBS || make || exit 1
+
+# Install into installer's filesystem:
+mkdir -p $PKG/$ARCH-installer-filesystem/usr/bin
+cp -a bricktick $PKG/$ARCH-installer-filesystem/usr/bin/bricktick
+strip --strip-unneeded $PKG/$ARCH-installer-filesystem/usr/bin/bricktick
+
+}
+
+############### Build dnsmasq ##################################################
+
+build_dnsmasq()
+{
+echo "--- Building dnsmasq ---"
+# Extract source:
+cd $TMP
+if [ -d $CWD/sources/dnsmasq ]; then
+ DNSMASQPATH=$CWD/sources/dnsmasq
+elif [ -d $SRCDIR/sources/dnsmasq ]; then
+ DNSMASQPATH=$SRCDIR/sources/dnsmasq
+fi
+[ ! -d $DNSMASQPATH ] && ( echo "No directory '$DNSMASQPATH'" ; exit 1 )
+DNSMASQPKG=$(ls -1 $DNSMASQPATH/dnsmasq-*.tar.?z | head -1)
+DNSMASQVER=$(echo $DNSMASQPKG | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
+tar x${VERBOSE2}f $DNSMASQPKG
+
+echo "--- Compiling DNSMASQ version '$DNSMASQVER' ---"
+cd dnsmasq* || exit 1
+
+zcat $DNSMASQPATH/dnsmasq.leasedir.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
+zcat $DNSMASQPATH/dnsmasq.libidn2.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
+zcat $DNSMASQPATH/dnsmasq-2.80-SIOCGSTAMP.patch.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
+
+chown -R root:root .
+chmod -R u+w,go+r-w,a-s .
+
+make $NUMJOBS all-i18n PREFIX=/usr MANDIR=/usr/man COPTS=" " || exit 1
+
+# Install into installer's filesystem:
+mkdir -p $PKG/$ARCH-installer-filesystem/usr/sbin
+cp -a src/dnsmasq $PKG/$ARCH-installer-filesystem/usr/sbin/dnsmasq
+strip --strip-unneeded $PKG/$ARCH-installer-filesystem/usr/sbin/dnsmasq
+chown root:root $PKG/$ARCH-installer-filesystem/usr/sbin/dnsmasq
+chmod 755 $PKG/$ARCH-installer-filesystem/usr/sbin/dnsmasq
+mkdir -p $PKG/$ARCH-installer-filesystem/usr/man/man8
+cat man/dnsmasq.8 | gzip -9c > $PKG/$ARCH-installer-filesystem/usr/man/man8/dnsmasq.8.gz
+
+}
+
############## Install binaries into installer filesystem ######################
# You can generate file-> package list in slackware-current
@@ -881,6 +963,7 @@ a/hdparm \
a/hwdata \
a/inih \
a/jfsutils \
+a/kbd \
a/kmod \
a/lvm2 \
a/lzip \
@@ -897,6 +980,7 @@ a/procps-ng \
a/reiserfsprogs \
a/sed \
a/shadow \
+a/smartmontools \
a/sysfsutils \
a/syslinux \
a/tar \
@@ -908,6 +992,7 @@ a/util-linux \
a/xfsprogs \
a/xz \
a/zerofree \
+a/userspace-rcu \
ap/ddrescue \
ap/dmidecode \
ap/lsscsi \
@@ -924,17 +1009,18 @@ l/libaio \
l/libcap \
l/libidn2 \
l/libnsl \
+l/libnvme \
l/libunistring \
l/libusb \
+l/lz4 \
l/lzo \
l/parted \
-l/pcre \
+l/pcre2 \
l/popt \
l/readline \
l/zlib \
l/zstd \
n/dhcpcd \
-n/dnsmasq \
n/iproute2 \
n/krb5 \
n/libgcrypt \
@@ -970,10 +1056,12 @@ cp --remove-destination -fa${VERBOSE1} ${EXTRA_PKGS_BIN} \
cp \
cut \
date \
+ dd \
dialog \
dircolors \
findmnt \
gzip \
+ grep egrep fgrep pgrep \
ipmask \
ls \
lsblk \
@@ -995,12 +1083,12 @@ cp --remove-destination -fa${VERBOSE1} ${EXTRA_PKGS_BIN} \
$(readlink -s setterm 1>/dev/null) || \
cp --remove-destination -fa${VERBOSE1} setterm \
$PKG/$ARCH-installer-filesystem/bin/
-cp --remove-destination -fa${VERBOSE1} grep $PKG/$ARCH-installer-filesystem/bin/grep.bin
cd $TMP/extract-packages/usr/bin
cp --remove-destination -fa${VERBOSE1} ${EXTRA_PKGS_USRBIN} \
bash \
ddrescue \
ldd \
+ loadkeys \
lzip \
neofetch \
plzip \
@@ -1038,6 +1126,7 @@ cp --remove-destination -fa${VERBOSE1} ${EXTRA_PKGS_SBIN} \
cgdisk \
cryptsetup \
debugfs \
+ depmod \
dmsetup \
dosfsck \
dumpe2fs \
@@ -1061,7 +1150,6 @@ cp --remove-destination -fa${VERBOSE1} ${EXTRA_PKGS_SBIN} \
logsave \
ldconfig \
lsmod \
- lspci \
lvm \
lvmdump \
mount.nfs \
@@ -1071,6 +1159,7 @@ cp --remove-destination -fa${VERBOSE1} ${EXTRA_PKGS_SBIN} \
mkfs.* \
mklost+found \
mkswap \
+ modinfo \
modprobe \
mount \
mdadm \
@@ -1109,9 +1198,9 @@ echo "Syncing filesystems."
sync
echo "Unmounting filesystems:"
# Try to unmount these bind mounts first to prevent them from blocking unmount of the target /:
-umount /mnt/dev 2> /dev/null
-umount /mnt/proc 2> /dev/null
-umount /mnt/sys 2> /dev/null
+umount -R /mnt/dev 2> /dev/null
+umount -R /mnt/proc 2> /dev/null
+umount -R /mnt/sys 2> /dev/null
/bin/umount -v -a -t no,proc,sysfs,devtmpfs,fuse.gvfsd-fuse,tmpfs
sync
echo "Rebooting."
@@ -1151,15 +1240,23 @@ cp -a pam.d $PKG/$ARCH-installer-filesystem/etc
cd $TMP/extract-packages/usr/share/kbd/consolefonts
mkdir -p $PKG/$ARCH-installer-filesystem/usr/share/kbd/consolefonts
cp --remove-destination -fa${VERBOSE1} \
+ ter-v18n.psf.gz \
ter-114v.psf.gz \
ter-732b.psf.gz \
$PKG/$ARCH-installer-filesystem/usr/share/kbd/consolefonts
+# Get the standard set of keymaps:
+cd $TMP/extract-packages/usr/share/kbd/keymaps
+mkdir -p $PKG/$ARCH-installer-filesystem/usr/share/kbd/keymaps
+cp --remove-destination -fa${VERBOSE1} \
+ i386 \
+ include \
+ $PKG/$ARCH-installer-filesystem/usr/share/kbd/keymaps
+
# Copy binaries from /usr/sbin into the installer's /usr/sbin/
cd $TMP/extract-packages/usr/sbin
cp --remove-destination -fa${VERBOSE1} ${EXTRA_PKGS_USRSBIN} \
chpasswd \
- dnsmasq \
ntpdate \
nvme \
parted \
@@ -1168,6 +1265,7 @@ cp --remove-destination -fa${VERBOSE1} ${EXTRA_PKGS_USRSBIN} \
dmidecode \
mount.cifs \
sm-notify \
+ smartctl \
sparsify \
umount.cifs \
zerofree \
@@ -1251,8 +1349,11 @@ cp -fa${VERBOSE1} \
libmount.so* \
libnsl.so* \
libpam*.so* \
- libpcre.so* \
+ libpcre2-8.so* \
libpopt*.so* \
+ liburcu-common.so.* \
+ liburcu.so.* \
+ libreiserfscore.so* \
libsmartcols.so* \
libssl*so* \
libtirpc*so* \
@@ -1266,6 +1367,7 @@ cp -fa${VERBOSE1} \
cd $TMP/extract-packages/usr/lib${LIBDIRSUFFIX}
cp -fa${VERBOSE1} \
libargon2.so* \
+ libatomic.so* \
libcryptsetup*.so* \
libefiboot.so* \
libefivar.so* \
@@ -1273,8 +1375,12 @@ cp -fa${VERBOSE1} \
libhistory*.so* \
libidn2*.so* \
libjson-c.so* \
+ libkbdfile.so* \
+ libkeymap.so* \
liblz.so* \
+ liblz4.so* \
liblzo*.so* \
+ libnvme*.so* \
libparted*so* \
libreadline*.so* \
libstdc++*.so* \
@@ -1332,11 +1438,15 @@ cp -fa${VERBOSE1} \
chmod 755 $PKG/$ARCH-installer-filesystem/etc/rc.d/rc.rpc
mkdir -p $PKG/$ARCH-installer-filesystem/var/state/rpcbind
-# Copy /etc/default/{nfs,rpc}:
+# NFS & RPC components:
cd $TMP/extract-packages/etc/default
cp -fa${VERBOSE1} \
nfs rpc \
$PKG/$ARCH-installer-filesystem/etc/default
+cd $TMP/extract-packages/usr/libexec
+cp -fa${VERBOSE1} \
+ nfsrahead \
+ $PKG/$ARCH-installer-filesystem/usr/libexec
# Remove busybox symlinks for things that we have a real version of:
for prunedir in $PKG/$ARCH-installer-filesystem/usr/bin $PKG/$ARCH-installer-filesystem/usr/sbin ; do
@@ -1346,9 +1456,13 @@ for prunedir in $PKG/$ARCH-installer-filesystem/usr/bin $PKG/$ARCH-installer-fil
rm -f $PKG/$ARCH-installer-filesystem/sbin/$(basename $removefile)
done
done
-if [ -r rm -f $PKG/$ARCH-installer-filesystem/sbin/lspci -a ! -L $PKG/$ARCH-installer-filesystem/sbin/lspci -a -L $PKG/$ARCH-installer-filesystem/bin/lspci ]; then
+if [ -r $PKG/$ARCH-installer-filesystem/sbin/lspci -a ! -L $PKG/$ARCH-installer-filesystem/sbin/lspci -a -L $PKG/$ARCH-installer-filesystem/bin/lspci ]; then
rm -f $PKG/$ARCH-installer-filesystem/bin/lspci
fi
+# busybox's implementation of 'xzcat' provides different output when piped into 'dd'.
+# Symlink 'xzcat' to the real 'xz' as we do within the OS:
+cd $PKG/$ARCH-installer-filesystem/bin
+ln -fs xz xzcat
# Update to latest versions of files within /etc/
# /etc/ file Package Reason
@@ -1533,7 +1647,7 @@ for ind in $(seq 0 $((${#KERNELS[*]} -1)) ); do
cp -a fs.orig/{udf*,isofs*,cifs*,ext*,fat*,fscache,jfs*,lockd,nfs,nfs_common,jbd*,nls,reiserfs,xfs,binfmt*,mbcache*,exportfs*} fs/
;;
*86*)
- cp -a fs.orig/{cifs*,exfat,fscache,lockd,nfs,nfs_common,ntfs3} fs/
+ cp -a fs.orig/{cifs*,efivarfs,exfat,fscache,lockd,nfs,nfs_common,ntfs3} fs/
;;
*)
cp -a fs.orig/cifs* fs/
@@ -1983,7 +2097,7 @@ fi
if [ $SPLIT_INITRD -eq 0 ]; then
# Determine the size of the installer:
echo " Installer size (uncompressed): $( du -sh . )"
- find . | cpio -o -H newc | xz -9fv -C crc32 > $CWD/initrd.img
+ find . | cpio -o -H newc | xz -9fvv -C crc32 > $CWD/initrd.img
echo " New installer image is ${CWD}/initrd.img"
cp -a $SLACKROOT/isolinux/isolinux.cfg $CWD/
fi
@@ -2261,6 +2375,8 @@ if [ -d usr/man ]; then
man1/plzip.1.bz2 \
man1/neofetch.1.bz2 \
man1/nvme.1.bz2 \
+ man8/dmidecode.8.bz2 \
+ man8/smartctl.8.bz2 \
; do
mkdir -p man/$(dirname $manpage)
cp -a man.full/$manpage man/$manpage
@@ -2324,11 +2440,19 @@ else
unpack_oldinitrd
fi
+ # Build a simplified version of dnsmasq for PXE installs:
+ build_dnsmasq
+
# Are we adding the nano editor?
if [ $ADD_NANO -eq 1 ]; then
build_nano
fi
+ # Are we adding the bricktick game?
+ if [ $ADD_BRICKTICK -eq 1 ]; then
+ build_bricktick
+ fi
+
# Are we adding network modules?
if [ $ADD_NETMODS -eq 1 ]; then
add_netmods
diff --git a/source/installer/installer.SlackBuild b/source/installer/installer.SlackBuild
index 955dcdb02..64f0fb2ce 100755
--- a/source/installer/installer.SlackBuild
+++ b/source/installer/installer.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2018, 2022 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,13 +22,13 @@
cd $(dirname $0) ; CWD=$(pwd)
-INSTALLERVERSION=${INSTALLERVERSION:-"15.0"}
+INSTALLERVERSION=${INSTALLERVERSION:-"15.1"}
TMP=${TMP:-/tmp}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
- i?86) ARCH=i586
+ i?86) ARCH=i686
SLACKROOT=${SLACKROOT:-/root/slackware-current}
OUTPUT=${OUTPUT:-$TMP/output-ia32-$(basename $(uname -r) -smp)}
;;
@@ -36,7 +36,7 @@ if [ -z "$ARCH" ]; then
SLACKROOT=${SLACKROOT:-/root/slackware64-current}
OUTPUT=${OUTPUT:-$TMP/output-x86_64-$(uname -r)}
;;
- arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl
+ arm*) readelf /usr/bin/file -A | grep -E -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl
SLACKROOT=${SLACKROOT:-/root/slackware-current}
OUTPUT=${OUTPUT:-$TMP/output-arm-$(uname -r)}
;;
diff --git a/source/installer/repack_installer.SlackBuild b/source/installer/repack_installer.SlackBuild
index b8b2af91f..e14b2993f 100755
--- a/source/installer/repack_installer.SlackBuild
+++ b/source/installer/repack_installer.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2019 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2019, 2023 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -33,15 +33,15 @@ TMP=${TMP:-/tmp}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
- i?86) ARCH=i586
+ i?86) ARCH=i686
SLACKROOT=${SLACKROOT:-/root/slackware-current}
- OUTPUT=${OUTPUT:-$TMP/output-ia32-$(basename $(uname -r) -smp)}
+ OUTPUT=${OUTPUT:-$TMP/output-ia32-$(basename $(uname -r))}
;;
x86_64) ARCH=x86_64
SLACKROOT=${SLACKROOT:-/root/slackware64-current}
OUTPUT=${OUTPUT:-$TMP/output-x86_64-$(uname -r)}
;;
- arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl
+ arm*) readelf /usr/bin/file -A | grep -E -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl
SLACKROOT=${SLACKROOT:-/root/slackware-current}
OUTPUT=${OUTPUT:-$TMP/output-arm-$(uname -r)}
;;
diff --git a/source/installer/sources/bricktick/fetch-bricktick.sh b/source/installer/sources/bricktick/fetch-bricktick.sh
new file mode 100755
index 000000000..15a8e2b14
--- /dev/null
+++ b/source/installer/sources/bricktick/fetch-bricktick.sh
@@ -0,0 +1,52 @@
+#!/bin/sh
+
+# Copyright 2019, 2020 Patrick J. 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.
+
+
+PKGNAM=bricktick
+
+# Pull a stable branch + patches
+BRANCH=${1:-master}
+
+# Clear download area:
+rm -rf ${PKGNAM}
+
+# Clone repository:
+git clone https://github.com/Subsentient/${PKGNAM}
+
+# checkout $BRANCH:
+( cd ${PKGNAM}
+ git checkout $BRANCH || exit 1
+)
+
+HEADISAT="$( cd ${PKGNAM} && git log -1 --format=%h )"
+DATE="$( cd ${PKGNAM} && git log -1 --format=%cd --date=format:%Y%m%d )"
+LONGDATE="$( cd ${PKGNAM} && git log -1 --format=%cd --date=format:%c )"
+# Cleanup. We're not packing up the whole git repo.
+( cd ${PKGNAM} && find . -type d -name ".git*" -exec rm -rf {} \; 2> /dev/null )
+mv ${PKGNAM} ${PKGNAM}-${DATE}_${HEADISAT}
+tar cf ${PKGNAM}-${DATE}_${HEADISAT}.tar ${PKGNAM}-${DATE}_${HEADISAT}
+plzip -9 -f ${PKGNAM}-${DATE}_${HEADISAT}.tar
+rm -rf ${PKGNAM}-${DATE}_${HEADISAT}
+touch -d "$LONGDATE" ${PKGNAM}-${DATE}_${HEADISAT}.tar.lz
+echo
+echo "${PKGNAM} branch $BRANCH with HEAD at $HEADISAT packaged as ${PKGNAM}-${DATE}_${HEADISAT}.tar.lz"
+echo
diff --git a/source/installer/sources/dnsmasq/dnsmasq-2.80-SIOCGSTAMP.patch b/source/installer/sources/dnsmasq/dnsmasq-2.80-SIOCGSTAMP.patch
new file mode 100644
index 000000000..3a32bb82e
--- /dev/null
+++ b/source/installer/sources/dnsmasq/dnsmasq-2.80-SIOCGSTAMP.patch
@@ -0,0 +1,60 @@
+From 31e14f6e52677c675ee4683f9daab5bf21c07dd6 Mon Sep 17 00:00:00 2001
+From: Petr Mensik <pemensik@redhat.com>
+Date: Wed, 31 Jul 2019 20:35:35 +0200
+Subject: [PATCH] Recent kernel no longer supports SIOCGSTAMP
+
+Build without it defined by kernel headers. Do not try SO_TIMESTAMP
+until fixed properly.
+---
+ src/dhcp.c | 32 ++++++++++++++++++--------------
+ 1 file changed, 18 insertions(+), 14 deletions(-)
+
+diff --git a/src/dhcp.c b/src/dhcp.c
+index f8d323b..9afdccf 100644
+--- a/src/dhcp.c
++++ b/src/dhcp.c
+@@ -178,23 +178,27 @@ void dhcp_packet(time_t now, int pxe_fd)
+ (sz < (ssize_t)(sizeof(*mess) - sizeof(mess->options))))
+ return;
+
+- #if defined (HAVE_LINUX_NETWORK)
+- if (ioctl(fd, SIOCGSTAMP, &tv) == 0)
++#if defined (HAVE_LINUX_NETWORK)
++#ifdef SIOCGSTAMP
++ if (tv.tv_sec == 0 && ioctl(fd, SIOCGSTAMP, &tv) == 0)
+ recvtime = tv.tv_sec;
++#endif
+
+ if (msg.msg_controllen >= sizeof(struct cmsghdr))
+- for (cmptr = CMSG_FIRSTHDR(&msg); cmptr; cmptr = CMSG_NXTHDR(&msg, cmptr))
+- if (cmptr->cmsg_level == IPPROTO_IP && cmptr->cmsg_type == IP_PKTINFO)
+- {
+- union {
+- unsigned char *c;
+- struct in_pktinfo *p;
+- } p;
+- p.c = CMSG_DATA(cmptr);
+- iface_index = p.p->ipi_ifindex;
+- if (p.p->ipi_addr.s_addr != INADDR_BROADCAST)
+- unicast_dest = 1;
+- }
++ {
++ for (cmptr = CMSG_FIRSTHDR(&msg); cmptr; cmptr = CMSG_NXTHDR(&msg, cmptr))
++ if (cmptr->cmsg_level == IPPROTO_IP && cmptr->cmsg_type == IP_PKTINFO)
++ {
++ union {
++ unsigned char *c;
++ struct in_pktinfo *p;
++ } p;
++ p.c = CMSG_DATA(cmptr);
++ iface_index = p.p->ipi_ifindex;
++ if (p.p->ipi_addr.s_addr != INADDR_BROADCAST)
++ unicast_dest = 1;
++ }
++ }
+
+ #elif defined(HAVE_BSD_NETWORK)
+ if (msg.msg_controllen >= sizeof(struct cmsghdr))
+--
+2.20.1
+
diff --git a/source/installer/sources/dnsmasq/dnsmasq.leasedir.diff b/source/installer/sources/dnsmasq/dnsmasq.leasedir.diff
new file mode 100644
index 000000000..9fec6b439
--- /dev/null
+++ b/source/installer/sources/dnsmasq/dnsmasq.leasedir.diff
@@ -0,0 +1,24 @@
+diff -Nur dnsmasq-2.52.orig/dnsmasq.conf.example dnsmasq-2.52/dnsmasq.conf.example
+--- dnsmasq-2.52.orig/dnsmasq.conf.example 2009-11-25 06:55:16.000000000 -0600
++++ dnsmasq-2.52/dnsmasq.conf.example 2010-01-22 15:32:41.137807274 -0600
+@@ -415,7 +415,7 @@
+ # The DHCP server needs somewhere on disk to keep its lease database.
+ # This defaults to a sane location, but if you want to change it, use
+ # the line below.
+-#dhcp-leasefile=/var/lib/misc/dnsmasq.leases
++#dhcp-leasefile=/var/state/dnsmasq/dnsmasq.leases
+
+ # Set the DHCP server to authoritative mode. In this mode it will barge in
+ # and take over the lease for any client which broadcasts on the network,
+diff -Nur dnsmasq-2.52.orig/src/config.h dnsmasq-2.52/src/config.h
+--- dnsmasq-2.52.orig/src/config.h 2010-01-21 08:22:06.000000000 -0600
++++ dnsmasq-2.52/src/config.h 2010-01-22 15:32:41.136833058 -0600
+@@ -47,7 +47,7 @@
+ # elif defined(__sun__) || defined (__sun)
+ # define LEASEFILE "/var/cache/dnsmasq.leases"
+ # else
+-# define LEASEFILE "/var/lib/misc/dnsmasq.leases"
++# define LEASEFILE "/var/state/dnsmasq/dnsmasq.leases"
+ # endif
+ #endif
+
diff --git a/source/installer/sources/dnsmasq/dnsmasq.libidn2.diff b/source/installer/sources/dnsmasq/dnsmasq.libidn2.diff
new file mode 100644
index 000000000..d99e556bc
--- /dev/null
+++ b/source/installer/sources/dnsmasq/dnsmasq.libidn2.diff
@@ -0,0 +1,13 @@
+--- ./Makefile.orig 2017-05-22 16:58:46.000000000 -0500
++++ ./Makefile 2017-07-07 13:28:14.124402827 -0500
+@@ -24,8 +24,8 @@
+ LOCALEDIR = $(PREFIX)/share/locale
+ BUILDDIR = $(SRC)
+ DESTDIR =
+-CFLAGS = -Wall -W -O2
+-LDFLAGS =
++CFLAGS = -Wall -W -O2 -DHAVE_LIBIDN2
++LDFLAGS = -lidn2
+ COPTS =
+ RPM_OPT_FLAGS =
+ LIBS =
diff --git a/source/installer/sources/initrd/etc/keymaps.tar b/source/installer/sources/initrd/etc/keymaps.tar
deleted file mode 100644
index 2ae6004b7..000000000
--- a/source/installer/sources/initrd/etc/keymaps.tar
+++ /dev/null
Binary files differ
diff --git a/source/installer/sources/initrd/etc/mounts b/source/installer/sources/initrd/etc/mtab
index 4c0a0948b..4c0a0948b 120000
--- a/source/installer/sources/initrd/etc/mounts
+++ b/source/installer/sources/initrd/etc/mtab
diff --git a/source/installer/sources/initrd/etc/rc.d/rc.S b/source/installer/sources/initrd/etc/rc.d/rc.S
index fcd5fea2c..0e69d7349 100755
--- a/source/installer/sources/initrd/etc/rc.d/rc.S
+++ b/source/installer/sources/initrd/etc/rc.d/rc.S
@@ -1,18 +1,29 @@
#!/bin/sh
# rc.S: Basic system initialization.
-# Any /etc/mtab that exists here is old, so we start with a new one:
-/bin/rm -f /etc/mtab{,~,.tmp} && /bin/touch /etc/mtab
-
-# Add (fake) entry for / to /etc/mtab:
-/sbin/mount -f -w /dev/initramfs / -t tmpfs 1> /dev/null
-
# Mount /proc:
/sbin/mount -v proc /proc -t proc 1> /dev/null
# Mount sysfs next:
/sbin/mount -v sysfs /sys -t sysfs 1> /dev/null
+# The efivarfs filesystem is used for reading and writing EFI variables, such
+# as the boot menu entries. By default efivarfs will be mounted read-write on
+# the /sys/firmware/efi/efivars directory.
+if [ -d /sys/firmware/efi/efivars ]; then
+ mount -o rw -t efivarfs none /sys/firmware/efi/efivars
+fi
+
+# Set a root password for the Slackware Installer if set as a Kernel cmdline:
+# This is intended for network installations where otherwise the root password
+# would be unset.
+# Note: this does not configure the OS root password.
+# Passwords should be set as follows within the Kernel cmdline:
+# instrootpw=yourpassword
+if grep -qoP 'instrootpw=\K\S+' /proc/cmdline ; then
+ /bin/echo "root:$( grep -oP 'instrootpw=\K\S+' /proc/cmdline )" | /bin/busybox chpasswd
+fi
+
# Activate swap:
/sbin/swapon -a 1> /dev/null
@@ -171,8 +182,14 @@ rm -f /tmp/foo
echo "Activating LVM volumes:"
vgchange -ay
-if [ -x /etc/rc.d/rc.font ]; then
- /bin/sh /etc/rc.d/rc.font
+# In testing here the results of running rc.font with HiDPI screens has been
+# rather unpredicable, sometimes resulting in an unreadably small font rather
+# than increasing the size. Let's skip it unless RCFONT is passed as a kernel
+# command-line flag:
+if cat /proc/cmdline | grep -wq RCFONT ; then
+ if [ -x /etc/rc.d/rc.font ]; then
+ /bin/sh /etc/rc.d/rc.font
+ fi
fi
# Don't automatically blank the screen, or it will go black during the install
@@ -233,11 +250,23 @@ if ! cat /proc/cmdline | grep -q 'kbd=' 2> /dev/null ; then
else
for ARG in `cat /proc/cmdline` ; do
if [ "`echo $ARG | cut -f1 -d=`" = "kbd" ]; then
- BMAP="`echo $ARG | cut -f2 -d=`.bmap"
+ # A keymap was specified on the kernel command line such as: kbd=azerty
+ MAPSELECT="$(echo $ARG | cut -f2 -d=)"
+ # If it ends in .gz, strip that off:
+ if [ "$(echo $MAPSELECT | rev | cut -f 1 -d . | rev)" = "gz" ]; then
+ MAPSELECT=$(basename $MAPSELECT .gz)
+ fi
+ # If it doesn't end in .map, add that:
+ if [ ! "$(echo $MAPSELECT | rev | cut -f 1 -d . | rev)" = "map" ]; then
+ MAPSELECT=${MAPSELECT}.map
+ fi
+ # Load the keymap:
+ loadkeys -q $MAPSELECT
+ # Let the setup script know about this:
+ echo $MAPSELECT > /tmp/Pkeymap
+ unset MAPSELECT
fi
done
- tar xzOf /etc/keymaps.tar.gz $BMAP | loadkmap
- unset BMAP
fi
clear
diff --git a/source/installer/sources/initrd/etc/rc.d/rc.pcmcia b/source/installer/sources/initrd/etc/rc.d/rc.pcmcia
index 1f21be84e..46621da97 100755
--- a/source/installer/sources/initrd/etc/rc.d/rc.pcmcia
+++ b/source/installer/sources/initrd/etc/rc.d/rc.pcmcia
@@ -14,7 +14,7 @@ DRIVER_OPTS=
case "$1" in
start)
echo "Starting PCMCIA services:"
- fgrep -q pcmcia /proc/devices
+ grep -F -q pcmcia /proc/devices
if [ $? -ne 0 ] ; then
if [ "$DRIVER" = "probe" ]; then
echo " <Probing for PCIC: edit /etc/rc.d/rc.pcmcia>"
diff --git a/source/installer/sources/initrd/sbin/mkbindmounts b/source/installer/sources/initrd/sbin/mkbindmounts
index 40a9d7313..897889847 100755
--- a/source/installer/sources/initrd/sbin/mkbindmounts
+++ b/source/installer/sources/initrd/sbin/mkbindmounts
@@ -5,6 +5,10 @@
# reinstall boot loaders).
mkdir -p /mnt/{dev,proc,sys}
-mount -o bind /dev /mnt/dev
-mount -o bind /proc /mnt/proc
-mount -o bind /sys /mnt/sys
+mount -o rbind /dev /mnt/dev
+mount -o rbind /proc /mnt/proc
+mount -o rbind /sys /mnt/sys
+# Needed for EFI boot menu operations:
+if [ -d /sys/firmware/efi/efivars ]; then
+ mount -o rbind /sys/firmware/efi/efivars /mnt/sys/firmware/efi/efivars
+fi
diff --git a/source/installer/sources/initrd/sbin/probe b/source/installer/sources/initrd/sbin/probe
index 3b481432f..a0c25ac10 100755
--- a/source/installer/sources/initrd/sbin/probe
+++ b/source/installer/sources/initrd/sbin/probe
@@ -140,24 +140,14 @@ list_amiraid() {
fi
}
-#list_mmc() {
-# # find drive
-# DRV=`expr $2 / 8`
-# NUM=`expr $2 % 8`
-# if [ "$NUM" = "0" ]; then
-# fdisk -l /dev/mmcblk$DRV >> $TMP/SeTfdisk
-# #output_gpt_partitions /dev/mmcblk$DRV >> $TMP/SeTfdisk
-# else
-# return
-# fi
-#}
list_mmc() {
local device
# Filter out any partitions on the block device, as we'll use
# fdisk to capture those:
- lsblk -o name,type -ripnd /dev/mmcblk* | egrep 'disk$' | awk '{print $1}' | while read device ; do
- fdisk -l $device >> $TMP/SeTfdisk
- done
+ grep -qE 'mmcblk[0-9]' /proc/partitions && {
+ lsblk -o name,type -Mripnd /dev/mmcblk* | grep -E 'disk$' | awk '{print $1}' | while read device ; do
+ fdisk -l $device >> $TMP/SeTfdisk
+ done ;}
}
list_nvme() {
@@ -324,6 +314,9 @@ list_lvm
# List CRYPT volumes:
list_crypt
+# List MMC (e.g. SD cards) partitions:
+list_mmc
+
## This is obsolete, since fdisk handles GPT now.
## List GPT partitions:
#cat /proc/partitions | while read line ; do
@@ -412,8 +405,6 @@ if cat /proc/partitions | grep -E '/|[0-9]' 1>/dev/null 2>/dev/null ; then # new
list_cciss $(( $MAJOR - 104 )) $MINOR
elif [ "$MAJOR" = "114" ]; then
list_ataraid $MAJOR $MINOR
- elif [ "$MAJOR" = "179" ]; then
- list_mmc $MAJOR $MINOR
elif [ "$MAJOR" = "259" ]; then
if echo $line | grep -q p; then
list_nvme $DEVNAME
@@ -443,4 +434,54 @@ sed -i -e "s/Linux filesystem/Linux/g" $TMP/SeTfdisk
sed -i -e "s/EFI System/EFI System Partition/g" $TMP/SeTfdisk
sed -i -e "s,EFI (FAT-12/16/32),EFI System Partition,g" $TMP/SeTfdisk
+# Filter out reserved file system labels for Slackware ARM/AArch64 and the
+# Slackware A-i-O (All in One Offline) Installer file systems.
+# This prevents them from being offered as candidates for formatting/mounting
+# during the installation.
+#
+# Labels:
+#
+# Used within the OS:
+# -------------------
+# SLKhwm_bw = Hardware Model Bootware - native Bootware for the RPi
+# SLKefi = FAT32 file system, /boot/efi mountpoint within the OS for Hardware Models
+# that use UEFI firmware.
+#
+# SLKins = Media (usually a USB stick) containing the Slackware install media
+# This FS label isn't required to locate the media, but it's helpful
+# as a way to exclude the media from the list of candidates.
+# This label is included within the Installation Guide for the USB
+# media installation option.
+#
+# Used only within the Slackware Installer environment
+# ----------------------------------------------------
+# SLKins_aio-pkgs =
+# The label of the partition on the All-In-One Installer that contains the
+# Slackware packages.
+# SLKins_efi = FAT32 file system for the Installer EFI partition, for Hardware Models
+# that use UEFI firmware.
+# The contents of this are deployed by 'grub-install', which is called from
+# the Hardware Model's 'sdcards.build' plugin.
+# This is not used within the installed OS.
+# SLKins_boot = ext4 file system containing the GRUB configuration to boot the
+# Slackware Installer, for Hardware Models using UEFI firmware.
+#
+# 'SLKroot' is used to identify the OS root file system on ARM, but we don't
+# filter it out because it's *supposed* to appear as a candidate within the
+# menu. Whilst we don't ship any images that contain a file system with this label,
+# the user might be reinstalling, thus would never be presented with the partition.
+#
+# SLKboot = Slackware OS /boot partition, but is only reserved only on ARM/AArch64:
+[[ "$( uname -m )" =~ a(rm*|arch64) ]] && aexc="boot|"
+
+awk '/^\/dev\// {print $1}' /var/log/setup/tmp/SeTfdisk | while read device; do
+ # The wrapping of e2label is because whilst it handles other file system types,
+ # it includes verbosity about the filesystem type; where as for ext filesystems
+ # it outputs only the label.
+ { ( e2label ${device} 2>/dev/null | tail -n1 | rev \
+ | awk '{print $1}' | rev | tr -d "'" | \
+ grep -Eq "^SLK(${aexc}ins|ins_aio-pkgs|ins_efi|ins_boot|efi|hwm_bw)$" ) && sed -i '\|^'"${device}\s"'|d' $TMP/SeTfdisk ;}
+done
+
+# Dump the discovered storage:
cat $TMP/SeTfdisk
diff --git a/source/installer/sources/initrd/usr/lib/setup/INS-all-in-one b/source/installer/sources/initrd/usr/lib/setup/INS-all-in-one
new file mode 100755
index 000000000..c6463626f
--- /dev/null
+++ b/source/installer/sources/initrd/usr/lib/setup/INS-all-in-one
@@ -0,0 +1,199 @@
+#!/bin/bash
+####################################################################################
+# File.......: /usr/lib/setup/INS-all-in-one
+# Called from: Forked from /usr/lib/setup/SeTmedia
+# Purpose....: Detect a partition labeled 'SLKins_aio-pkgs' and configure the
+# Installer to use it as the media source.
+# Version....: 1.00
+# Date.......: 22-Nov-2022
+# Author.....: Stuart Winter <mozes@slackware.com>
+###################################################################################
+# Change log
+# v1.00, 22-Nov-2022
+# * Initial version
+###################################################################################
+#
+# Copyright 2022 Stuart Winter, Earth, Milky Way, "".
+# 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.
+
+# Exit codes
+# 0 = Success (Install media dialog screen can exit cleanly)
+# 1 = General failure. (Install media dialog needs to present the list of options)
+# 2 = No media label found on any removable block device.
+# 3 = Sanity checks failed.
+# 4 = User chose not to use the bundled media, although the media passed sanity check.
+# 10 = User configured not to use All-In-One feature.
+
+# Check if the user has bypassed the all-in-one Installer functionality.
+# This may be if they have the all-in-one Installer on the USB stick but want
+# to install from another medium, and don't fancy re-deploying the standard USB
+# Installer image to the USB stick.
+[ -f /.no-allinone ] && exit 10
+
+# Settings:
+SLKINSMNT=/slack-all-in-one
+TMP=/var/log/setup/tmp
+[ ! -d $TMP ] && mkdir -pm755 $TMP
+
+###################################################################################
+################### Functions #####################################################
+###################################################################################
+
+# This code was copied in part from usr/lib/setup/INSUSB:
+# Detect a device with a partition label 'SLKins_aio-pkgs'
+# The MMC block devices aren't identified as 'removeable' so we don't filter on
+# that attribute since this is the standard storage subsystem we use on ARM.
+#lsblk -o name,label -ripn | grep -E 'SLKins_aio-pkgs$'
+function media_scan(){
+ local rdevice founddev
+ for rdevice in $( ls --indicator-style none /sys/block | grep -Ev "loop|ram|^dm-|^sr|^md" ); do
+ # Is it labeled 'SLKins_aio-pkgs'? If so we'll take the first one we find:
+ founddev="$( lsblk -o name,label -ripn /dev/${rdevice} 2>/dev/null | grep -E 'SLKins_aio-pkgs$' | awk '{print $1}' )"
+ [ ! -z "${founddev}" ] && break
+ done
+ # Report back if we found one:
+ [ ! -z "${founddev}" ] && { echo "${founddev}" ; return 0 ;} || return 1
+}
+
+# Mount the specified block device under the known mount point:
+function media_mount() {
+ mount -o noatime -m "$1" $SLKINSMNT 2>/dev/null
+ return $? ;}
+
+# umount the media:
+function media_umount() {
+ umount $SLKINSMNT 2>/dev/null
+ return $? ;}
+
+# Check if the Slackware media partition is already mounted:
+function media_ismounted() {
+ findmnt -DRM ${SLKINSMNT} > /dev/null 2>&1
+ return $?
+}
+
+# Sanity check the media:
+# The directory layout is: '/slackware/<slackware-tree-name>'
+# This is to enable users to add non-Slackware related assets to the partition upon installation
+# of the OS, if they wish.
+function media_sanity_check() {
+ local slacktree=$( media_report_slacktree )
+ [ -z "$slacktree" ] && return 1
+ # Is the tree available? We'll check the 'A' series directory is present:
+ [ ! -d $SLKINSMNT/slackware/$slacktree/a ] && return 1
+ # Enough sanity checking, it's probably good!
+ return 0
+}
+
+# Report the path to the configured Slackware media:
+# Output is relative - e.g. doesn's include the mount point and parent 'slackware' directory.
+function media_report_slacktree() {
+ # The Slackware tree we're using is configured in this file.
+ # This is placed by the script that creates the All-in-One Installer image.
+ [ ! -f $SLKINSMNT/slackware/.slktree ] && return 1
+ # Output content of the file which is a relative path: e.g. "slackwareaarch64-current/slackware"
+ grep -Ev '^$' $SLKINSMNT/slackware/.slktree
+}
+
+# Inform the user that the All-in-One Installer is ready to go.
+function offer_msg_ready() {
+ local blockdev="$1" mntpnt="$2"
+# --msgbox "\nThe Slackware package directory has been found on $blockdev and is mounted on $mntpnt ready for use.\n
+ dialog \
+ --backtitle "Slackware Installer" \
+ --title "INSTALLATION MEDIA SOURCE FOUND" --ok-button "OK" \
+ --msgbox "\nThis edition of the Slackware Installer has the installation media bundled, and is ready to use.\n
+ " 8 79
+ clear
+}
+
+# Inform the user that the All-in-One Installer was detected but failed sanity check.
+function offer_msg_failsanity() {
+ local blockdev="$1" mntpnt="$2"
+ dialog \
+ --backtitle "Slackware Installer" \
+ --title "INSTALLATION MEDIA SOURCE" --ok-button "OK" \
+ --msgbox "\nThis edition of the Slackware Installer contains the installation media.\n\n
+The media has been located on $blockdev but has failed the tests.\n\n
+You will now be presented with the option to choose a different installation media source.\n" 12 79
+ clear
+}
+
+# Offer the option to use the bundled media or pick the option manually:
+# Y=return 0, N=1
+function offer_chooseaio() {
+ dialog \
+ --backtitle "Slackware Installer" \
+ --title "INSTALLATION MEDIA SOURCE" --yesno \
+ "\nThis edition of the Slackware Installer contains the installation media.\n\n
+Would you like to use this as the media source?\n\n
+Answering 'No' provides a list of alternate installation media selection options.\n\n
+Recommendation: Yes" 15 77
+ return $?
+}
+
+# Configure the Slackware Installer to find the installation media on the All-in-One partition:
+function installer_configure() {
+ # An example of the entry in this file: /slack-all-in-one/slackware/slackwareaarch64-current/slackware
+ echo "$SLKINSMNT/slackware/$( media_report_slacktree )" > $TMP/SeTDS # is $SLKINSMNT/slackware/[contents of file '.slktree']
+ echo "-source_mounted" > $TMP/SeTmount
+ echo "/dev/null" > $TMP/SeTsource
+}
+
+###################################################################################
+
+# Try to locate the All-in-One Installer partition:
+mediablockdev=$( media_scan )
+
+# If we didn't find a block device with our label, bail out to enable the user to select
+# one from the list presented by /usr/lib/setup/SeTmedia:
+[ -z "${mediablockdev}" ] && exit 2
+
+# If the media is already mounted and the sanity check passes, inform the user.
+# This is to facilitate that the user may bounce through the main 'setup' menu and select
+# the installation media chooser (/usr/lib/setup/SeTmedia) more than once.
+# No, we're not going to offer them the option to pick a different installation source media:
+# it might break something. They can reboot.
+if media_ismounted && media_sanity_check; then
+ offer_msg_ready $mediablockdev $SLKINSMNT
+ exit 0
+fi
+
+# It's not mounted, but we found a label on a removable block device. Let's mount it,
+# configure the Installer to find the package source media, and inform the user that it's
+# ready to roll:
+if media_mount $mediablockdev && media_sanity_check; then
+ # Give the user the choice to use it. At this point we know it's validated so is a viable option.
+ # If the user chooses 'no', we umount the media and are returned to the '/usr/lib/setup/SeTmedia'
+ # process to pick an option.
+ offer_chooseaio || { media_umount ; clear ; exit 4 ;}
+ installer_configure
+ #offer_msg_ready $mediablockdev $SLKINSMNT
+ exit 0
+ else
+ # umount the media. If it fails, no problem - we can ignore it. The Installer won't be configured
+ # to use it unless the sanity check passed, so anything mounted isn't used nor is in the way.
+ media_umount
+ # Inform the user that they get to pick from the list of source media installation options:
+ offer_msg_failsanity $mediablockdev
+ exit 3
+fi
+
+clear
+exit 0
diff --git a/source/installer/sources/initrd/usr/lib/setup/SeTEFI b/source/installer/sources/initrd/usr/lib/setup/SeTEFI
index fdf545849..2e1f38eef 100755
--- a/source/installer/sources/initrd/usr/lib/setup/SeTEFI
+++ b/source/installer/sources/initrd/usr/lib/setup/SeTEFI
@@ -1,4 +1,8 @@
#!/bin/sh
+
+# Script: /usr/lib/setup/SeTEFI
+# Called from: /usr/lib/setup/setup
+
TMP=/var/log/setup/tmp
T_PX="`cat $TMP/SeTT_PX`"
if [ ! -d $TMP ]; then
@@ -16,14 +20,21 @@ rm -f $TMP/SeTefipartitions
touch $TMP/SeTefipartitions
# Scan for EFI partitions:
-# The UEFI specification states that an EFI System partition should have
+# The UEFI specification states that an EFI System partition should have
# a GUID of C12A7328-F81F-11D2-BA4B-00A0C93EC93B for a GPT disk layout.
# In case of a MBR disk layout instead, an ESP should have an OS type of
# 0xEF. lsblk writes these values in the same field: PARTTYPE.
+#
+# AArch64 note: Any file systems labeled 'SLKins_efi' are filtered out
+# because on the AArch64 platform, the Slackware Installer image has its
+# own EFI boot partition to support Hardware Models using UEFI firmware.
+# This partition must be filtered out here to avoid it being incorrectly
+# selected as the OS's EFI partition.
ESPGUID=C12A7328-F81F-11D2-BA4B-00A0C93EC93B
OSTYPE=0xEF
-lsblk -l -o parttype,name | \
-grep -i -F -e "$ESPGUID" -e "$OSTYPE" | \
+lsblk -Ml -o parttype,name,label | \
+grep -v 'SLKins_efi$' | \
+grep -iFe "$ESPGUID" -e "$OSTYPE" | \
sed "s,[^ ]*[ ]*,/dev/," > $TMP/SeTefipartitions
if [ ! -s $TMP/SeTefipartitions ]; then # No EFI partitions
diff --git a/source/installer/sources/initrd/usr/lib/setup/SeTconfig b/source/installer/sources/initrd/usr/lib/setup/SeTconfig
index 6731019bb..b51e991dc 100755
--- a/source/installer/sources/initrd/usr/lib/setup/SeTconfig
+++ b/source/installer/sources/initrd/usr/lib/setup/SeTconfig
@@ -43,6 +43,10 @@ if [ ! "$T_PX" = "/" ]; then
mount --bind /proc $T_PX/proc 1> /dev/null 2> /dev/null
mount --bind /sys $T_PX/sys 1> /dev/null 2> /dev/null
mount --bind /dev $T_PX/dev 1> /dev/null 2> /dev/null
+ # Needed for EFI boot menu operations:
+ if [ -d /sys/firmware/efi/efivars ]; then
+ mount --bind /sys/firmware/efi/efivars $T_PX/sys/firmware/efi/efivars 1> /dev/null 2> /dev/null
+ fi
fi
# These will be left connected rather than unmounting them to
# make it easier to set up LVM/LUKS.
diff --git a/source/installer/sources/initrd/usr/lib/setup/SeTkeymap b/source/installer/sources/initrd/usr/lib/setup/SeTkeymap
index e8ac96396..ce1e6d778 100755
--- a/source/installer/sources/initrd/usr/lib/setup/SeTkeymap
+++ b/source/installer/sources/initrd/usr/lib/setup/SeTkeymap
@@ -1,6 +1,6 @@
#!/bin/sh
# Copyright 1993, 1999, 2002 Patrick Volkerding, Moorhead, MN.
-# Copyright 2009 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2009, 2023 Patrick J. Volkerding, Sebeka, MN, USA
# Use and redistribution covered by the same terms as the "setup" script.
TMP=/var/log/setup/tmp
RDIR=/dev/tty4
@@ -8,183 +8,30 @@ if [ ! -d $TMP ]; then
mkdir -p $TMP
fi
while [ 0 ]; do
+
+# Construct the list of available keymaps:
+MAPLIST="$(cd /usr/share/kbd/keymaps/i386 ; find azerty bepo carpalx colemak dvorak fgGIod neo olpc qwerty qwertz | grep / | grep .map.gz$ | rev | cut -f 2- -d . | rev | less | sort | less | sed "s|^|\"|g" | sed "s|$|\" \"\" |g" | tr -d "\n")"
+
+cat << EOF > $TMP/select_keymap.sh
dialog --title "KEYBOARD MAP SELECTION" --menu "You may select one \
of the following keyboard maps. If you do not select a keyboard \
map, 'us.map' (the US keyboard map) is the default. Use the UP/DOWN \
arrow keys and PageUp/PageDown to scroll \
through the whole list of choices." \
22 55 11 \
-"qwerty/us.map" "" \
-"qwerty/uk.map" "" \
-"azerty/azerty.map" "" \
-"azerty/be-latin1.map" "" \
-"azerty/fr-latin0.map" "" \
-"azerty/fr-latin1.map" "" \
-"azerty/fr-latin9.map" "" \
-"azerty/fr-old.map" "" \
-"azerty/fr-pc.map" "" \
-"azerty/fr.map" "" \
-"azerty/wangbe.map" "" \
-"azerty/wangbe2.map" "" \
-"colemak/en-latin9.map" "" \
-"dvorak/ANSI-dvorak.map" "" \
-"dvorak/dvorak-fr.map" "" \
-"dvorak/dvorak-l.map" "" \
-"dvorak/dvorak-r.map" "" \
-"dvorak/dvorak.map" "" \
-"dvorak/no-dvorak.map" "" \
-"fgGIod/tr_f-latin5.map" "" \
-"fgGIod/trf-fgGIod.map" "" \
-"olpc/es-olpc.map" "" \
-"olpc/pt-olpc.map" "" \
-"qwerty/bashkir.map" "" \
-"qwerty/bg-cp1251.map" "" \
-"qwerty/bg-cp855.map" "" \
-"qwerty/bg_bds-cp1251.map" "" \
-"qwerty/bg_bds-utf8.map" "" \
-"qwerty/bg_pho-cp1251.map" "" \
-"qwerty/bg_pho-utf8.map" "" \
-"qwerty/br-abnt.map" "" \
-"qwerty/br-abnt2.map" "" \
-"qwerty/br-latin1-abnt2.map" "" \
-"qwerty/br-latin1-us.map" "" \
-"qwerty/by-cp1251.map" "" \
-"qwerty/by.map" "" \
-"qwerty/bywin-cp1251.map" "" \
-"qwerty/cf.map" "" \
-"qwerty/cz-cp1250.map" "" \
-"qwerty/cz-lat2-prog.map" "" \
-"qwerty/cz-lat2.map" "" \
-"qwerty/cz-qwerty.map" "" \
-"qwerty/defkeymap.map" "" \
-"qwerty/defkeymap_V1.0.map" "" \
-"qwerty/dk-latin1.map" "" \
-"qwerty/dk.map" "" \
-"qwerty/emacs.map" "" \
-"qwerty/emacs2.map" "" \
-"qwerty/es-cp850.map" "" \
-"qwerty/es.map" "" \
-"qwerty/et-nodeadkeys.map" "" \
-"qwerty/et.map" "" \
-"qwerty/fi-latin1.map" "" \
-"qwerty/fi-latin9.map" "" \
-"qwerty/fi-old.map" "" \
-"qwerty/fi.map" "" \
-"qwerty/gr-pc.map" "" \
-"qwerty/gr.map" "" \
-"qwerty/hu101.map" "" \
-"qwerty/il-heb.map" "" \
-"qwerty/il-phonetic.map" "" \
-"qwerty/il.map" "" \
-"qwerty/is-latin1-us.map" "" \
-"qwerty/is-latin1.map" "" \
-"qwerty/it-ibm.map" "" \
-"qwerty/it.map" "" \
-"qwerty/it2.map" "" \
-"qwerty/jp106.map" "" \
-"qwerty/kazakh.map" "" \
-"qwerty/ky_alt_sh-UTF-8.map" "" \
-"qwerty/kyrgyz.map" "" \
-"qwerty/la-latin1.map" "" \
-"qwerty/lt.baltic.map" "" \
-"qwerty/lt.l4.map" "" \
-"qwerty/lt.map" "" \
-"qwerty/mk-cp1251.map" "" \
-"qwerty/mk-utf.map" "" \
-"qwerty/mk.map" "" \
-"qwerty/mk0.map" "" \
-"qwerty/nl.map" "" \
-"qwerty/nl2.map" "" \
-"qwerty/no-latin1.map" "" \
-"qwerty/no.map" "" \
-"qwerty/pc110.map" "" \
-"qwerty/pl.map" "" \
-"qwerty/pl1.map" "" \
-"qwerty/pl2.map" "" \
-"qwerty/pl3.map" "" \
-"qwerty/pl4.map" "" \
-"qwerty/pt-latin1.map" "" \
-"qwerty/pt-latin9.map" "" \
-"qwerty/pt.map" "" \
-"qwerty/ro.map" "" \
-"qwerty/ro_std.map" "" \
-"qwerty/ru-cp1251.map" "" \
-"qwerty/ru-ms.map" "" \
-"qwerty/ru-yawerty.map" "" \
-"qwerty/ru.map" "" \
-"qwerty/ru1.map" "" \
-"qwerty/ru2.map" "" \
-"qwerty/ru3.map" "" \
-"qwerty/ru4.map" "" \
-"qwerty/ru_win.map" "" \
-"qwerty/ruwin_alt-CP1251.map" "" \
-"qwerty/ruwin_alt-KOI8-R.map" "" \
-"qwerty/ruwin_alt-UTF-8.map" "" \
-"qwerty/ruwin_cplk-CP1251.map" "" \
-"qwerty/ruwin_cplk-KOI8-R.map" "" \
-"qwerty/ruwin_cplk-UTF-8.map" "" \
-"qwerty/ruwin_ct_sh-CP1251.map" "" \
-"qwerty/ruwin_ct_sh-KOI8-R.map" "" \
-"qwerty/ruwin_ct_sh-UTF-8.map" "" \
-"qwerty/ruwin_ctrl-CP1251.map" "" \
-"qwerty/ruwin_ctrl-KOI8-R.map" "" \
-"qwerty/ruwin_ctrl-UTF-8.map" "" \
-"qwerty/se-fi-ir209.map" "" \
-"qwerty/se-fi-lat6.map" "" \
-"qwerty/se-ir209.map" "" \
-"qwerty/se-lat6.map" "" \
-"qwerty/se-latin1.map" "" \
-"qwerty/sk-prog-qwerty.map" "" \
-"qwerty/sk-qwerty.map" "" \
-"qwerty/speakup-jfw.map" "" \
-"qwerty/speakupmap.map" "" \
-"qwerty/sr-cy.map" "" \
-"qwerty/sv-latin1.map" "" \
-"qwerty/tj_alt-UTF8.map" "" \
-"qwerty/tr_q-latin5.map" "" \
-"qwerty/tralt.map" "" \
-"qwerty/trf.map" "" \
-"qwerty/trq.map" "" \
-"qwerty/ttwin_alt-UTF-8.map" "" \
-"qwerty/ttwin_cplk-UTF-8.map" "" \
-"qwerty/ttwin_ct_sh-UTF-8.map" "" \
-"qwerty/ttwin_ctrl-UTF-8.map" "" \
-"qwerty/ua-cp1251.map" "" \
-"qwerty/ua-utf-ws.map" "" \
-"qwerty/ua-utf.map" "" \
-"qwerty/ua-ws.map" "" \
-"qwerty/ua.map" "" \
-"qwerty/uk.map" "" \
-"qwerty/us-acentos.map" "" \
-"qwerty/us.map" "" \
-"qwertz/croat.map" "" \
-"qwertz/cz-us-qwertz.map" "" \
-"qwertz/cz.map" "" \
-"qwertz/de-latin1-nodeadkeys.map" "" \
-"qwertz/de-latin1.map" "" \
-"qwertz/de-mobii.map" "" \
-"qwertz/de.map" "" \
-"qwertz/de_CH-latin1.map" "" \
-"qwertz/de_alt_UTF-8.map" "" \
-"qwertz/fr_CH-latin1.map" "" \
-"qwertz/fr_CH.map" "" \
-"qwertz/hu.map" "" \
-"qwertz/sg-latin1-lk450.map" "" \
-"qwertz/sg-latin1.map" "" \
-"qwertz/sg.map" "" \
-"qwertz/sk-prog-qwertz.map" "" \
-"qwertz/sk-qwertz.map" "" \
-"qwertz/slovene.map" "" \
+"qwerty/us.map" "" "qwerty/uk.map" "" $MAPLIST \
2> $TMP/SeTkeymap
+EOF
+ sh $TMP/select_keymap.sh
if [ ! $? = 0 ]; then
- rm -f $TMP/SeTkeymap
+ rm -f $TMP/SeTkeymap $TMP/select_keymap.sh
exit
fi
- MAPNAME="`cat $TMP/SeTkeymap`"
- MAPNAME="`basename $MAPNAME`"
+ rm -f $TMP/select_keymap.sh
+ MAPNAME="$(cat $TMP/SeTkeymap)"
+ MAPNAME="$(basename $MAPNAME)"
echo $MAPNAME > $TMP/SeTkeymap
- BMAP="`basename $MAPNAME .map`.bmap"
- tar xzOf /etc/keymaps.tar.gz $BMAP > /dev/null && tar xzOf /etc/keymaps.tar.gz $BMAP | loadkmap
+ loadkeys -q $MAPNAME
while [ 0 ]; do
# Match the dialog colors a little while doing the keyboard test:
@@ -214,7 +61,7 @@ EOF
rm -f $TMP/$MAPNAME
rm -f $TMP/SeTkeymap $TMP/Pkeymap
# Clear bad selection:
- tar xzOf /etc/keymaps.tar.gz us.bmap > /dev/null && tar xzOf /etc/keymaps.tar.gz us.bmap | loadkmap
+ loadkeys -q us.map
continue;
fi
done
diff --git a/source/installer/sources/initrd/usr/lib/setup/SeTmedia b/source/installer/sources/initrd/usr/lib/setup/SeTmedia
index 65e05f4db..d42658c99 100755
--- a/source/installer/sources/initrd/usr/lib/setup/SeTmedia
+++ b/source/installer/sources/initrd/usr/lib/setup/SeTmedia
@@ -1,9 +1,19 @@
-#!/bin/sh
+#!/bin/bash
TMP=/var/log/setup/tmp
if [ ! -d $TMP ]; then
mkdir -p $TMP
fi
+# Call the A-i-O (All-in-One Offline Installer) media handler.
+# This is for Slackware Installer images that contain a partition
+# labeled 'SLKins_aio' which holds the Slackware packages.
+# If a partition exists, passes the sanity checks and the user
+# wants to use the bundled media, we exit.
+# Otherwise, if the user creates a file named '/.no-allinone', the
+# the sanity checks fail or the user doesn't want to use the
+# media, we offer the set of options to select the source media.
+INS-all-in-one && exit 0
+
dialog --backtitle "Select Slackware installation source." \
--title "SOURCE MEDIA SELECTION" --menu \
"Please select the media from which to install Slackware Linux:" \
diff --git a/source/installer/sources/initrd/usr/lib/setup/SeTpasswd b/source/installer/sources/initrd/usr/lib/setup/SeTpasswd
index 967ffd2ed..16133c423 100755
--- a/source/installer/sources/initrd/usr/lib/setup/SeTpasswd
+++ b/source/installer/sources/initrd/usr/lib/setup/SeTpasswd
@@ -13,9 +13,11 @@ time the machine is rebooted. This is especially important if you're \
using a network enabled kernel and the machine is on an Internet \
connected LAN. Would you like to set a root password?" 10 68
if [ $? = 0 ] ; then
+ clear
echo
echo
echo
+ echo "Setting password for 'root' user"
chroot $T_PX /usr/bin/passwd root
echo
echo -n "Press [enter] to continue:"
diff --git a/source/installer/sources/initrd/usr/lib/setup/pxesetup b/source/installer/sources/initrd/usr/lib/setup/pxesetup
index fb7831a39..7241b5c8c 100755
--- a/source/installer/sources/initrd/usr/lib/setup/pxesetup
+++ b/source/installer/sources/initrd/usr/lib/setup/pxesetup
@@ -40,12 +40,12 @@ export COLOR=on
# before the boot - perhaps the Slackware tree is on a local partition:
vgchange -ay 1> /dev/null 2> /dev/null
if probe -l 2> /dev/null | grep -E 'Linux$' 1> /dev/null 2> /dev/null ; then
- probe -l 2> /dev/null | grep -E 'Linux$' | sort 1> $TMP/SeTplist 2> /dev/null
+ probe -l 2> /dev/null | grep -E 'Linux$' | sort | uniq 1> $TMP/SeTplist 2> /dev/null
fi
while [ 0 ]; do
- dialog --title "Slackware PXE Setup (version 13.37)" \
+ dialog --title "Slackware PXE Setup (version 15.1)" \
--menu \
"Welcome to Slackware PXE Setup.\n\
Select an option below using the UP/DOWN keys and SPACE or ENTER.\n\
diff --git a/source/installer/sources/initrd/usr/lib/setup/setup b/source/installer/sources/initrd/usr/lib/setup/setup
index 5fc8a0e4b..6eb96dc3a 100755
--- a/source/installer/sources/initrd/usr/lib/setup/setup
+++ b/source/installer/sources/initrd/usr/lib/setup/setup
@@ -1,25 +1,25 @@
-#!/bin/sh
+#!/bin/bash
#
# Copyright 1993, 1994, 1999 Patrick Volkerding, Moorhead, Minnesota USA
# Copyright 2001, 2003, 2004 Slackware Linux, Inc., Concord, CA
-# Copyright 2006, 2007, 2018, 2021, 2022 Patrick Volkerding, Sebeka, Minnesota USA
+# Copyright 2006, 2007, 2018, 2021, 2022, 2023 Patrick Volkerding, Sebeka, Minnesota USA
# All rights reserved.
#
-# Redistribution and use of this script, with or without modification, is
+# 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
+# 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,
+# 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
+# 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.
#
# As always, bug reports, suggestions, etc: volkerdi@slackware.com
@@ -61,6 +61,10 @@ To do this, you'll need to leave 'setup', and make the partitions using \
information, read the 'setup' help file from the next menu." 10 64
fi
if [ -d /sys/firmware/efi ]; then
+ # First, let's make sure that efivarfs is active:
+ if [ "$(/bin/ls /sys/firmware/efi/efivars 2> /dev/null | wc -l)" = "0" ]; then
+ mount -t efivarfs none /sys/firmware/efi/efivars
+ fi
if ! probe -l 2> /dev/null | grep "EFI System Partition" 1> /dev/null 2> /dev/null ; then
dialog --title "NO EFI SYSTEM PARTITION DETECTED" \
--msgbox "This machine appears to be using EFI/UEFI, but no EFI System \
@@ -76,11 +80,11 @@ ROOT_DEVICE="`mount | grep "on / " | cut -f 1 -d ' '`"
echo "$ROOT_DEVICE" > $TMP/SeTrootdev
if mount | grep /var/log/mount 1> /dev/null 2> /dev/null ; then # clear source location:
# In case of bind mounts, try to unmount them first:
- umount /var/log/mount/dev 2> /dev/null
- umount /var/log/mount/proc 2> /dev/null
- umount /var/log/mount/sys 2> /dev/null
+ umount -R /var/log/mount/dev 2> /dev/null
+ umount -R /var/log/mount/proc 2> /dev/null
+ umount -R /var/log/mount/sys 2> /dev/null
# Unmount target partition:
- umount /var/log/mount
+ umount -R /var/log/mount
fi
# Anything mounted on /var/log/mount now is a fatal error:
if mount | grep /var/log/mount 1> /dev/null 2> /dev/null ; then
@@ -100,7 +104,7 @@ mkdir /var/log/mount 2> /dev/null
while [ 0 ]; do
- dialog --title "Slackware Linux Setup (version 15.0)" \
+ dialog --title "Slackware Linux Setup (version 15.1)" \
--menu \
"Welcome to Slackware Linux Setup.\n\
Select an option below using the UP/DOWN keys and SPACE or ENTER.\n\
@@ -336,9 +340,9 @@ to choose packages individually." 4 60
if [ "$MAINSELECT" = "CONFIGURE" ]; then
# Make bind mounts for /dev, /proc, and /sys:
- mount -o bind /dev $T_PX/dev 2> /dev/null
- mount -o bind /proc $T_PX/proc 2> /dev/null
- mount -o bind /sys $T_PX/sys 2> /dev/null
+ mount -o rbind /dev $T_PX/dev 2> /dev/null
+ mount -o rbind /proc $T_PX/proc 2> /dev/null
+ mount -o rbind /sys $T_PX/sys 2> /dev/null
SeTconfig
REPLACE_FSTAB=Y
if [ -r $TMP/SeTnative ]; then
@@ -388,7 +392,7 @@ if mount | grep /var/log/mntiso 1> /dev/null 2> /dev/null ; then
umount -f /var/log/mntiso
fi
if mount | grep /var/log/mount 1> /dev/null 2> /dev/null ; then
- umount /var/log/mount
+ umount -R /var/log/mount
fi
# Anything mounted on /var/log/mount now is a fatal error:
if mount | grep /var/log/mount 1> /dev/null 2> /dev/null ; then
@@ -436,6 +440,24 @@ if [ -f ${T_PX}/etc/fstab ]; then
"\nYou may now physically unplug the Slackware Installation Media USB stick from the USB port.\n" 8 60
}
+ # Prompt the user to unplug the bootable USB stick containing
+ # A-i-O (All in One Offline) partition.
+ mountpoint -q /slack-all-in-one && {
+ # Try to umount the A-i-O partition, but ignore any errors (errors would typically be
+ # occur if the user has a shell open within the USB stick's mount point), since
+ # we'll be shutting down soon anyway.
+ sync
+ umount /slack-all-in-one > /dev/null 2>&1
+ # Don't suggest disconnection if it's on ARM, because the A-i-O partition
+ # is on the same SD card that is converted from being the Installer to the
+ # OS's /boot partition.
+ [[ ! "$( uname -m )" =~ a(rm*|arch64) ]] && {
+ dialog \
+ --title "Unplug Slackware Installation USB Stick" \
+ --msgbox \
+ "\nYou may now physically unplug the Slackware Installation USB stick from the USB port.\n" 8 60 ;}
+ }
+
# Offer to reboot or drop to shell or power off.
exec 3>&1
installerexittype=$( dialog \