summaryrefslogtreecommitdiffstats
path: root/source/installer/sources/initrd/usr
diff options
context:
space:
mode:
Diffstat (limited to 'source/installer/sources/initrd/usr')
-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
8 files changed, 286 insertions, 191 deletions
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 \