aboutsummaryrefslogtreecommitdiffstats
path: root/upslak.sh
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2021-01-12 17:28:17 +0100
committer Eric Hameleers <alien@slackware.com>2021-01-12 17:28:17 +0100
commita28f988a5d95a3c29cdf615af6d5d5ec8b4fd92a (patch)
tree6fa3fc726aadd7d805f57d144115fb4175407601 /upslak.sh
parentca9704c956144f191de680a269df847721dc7a91 (diff)
downloadliveslak-a28f988a5d95a3c29cdf615af6d5d5ec8b4fd92a.tar.gz
liveslak-a28f988a5d95a3c29cdf615af6d5d5ec8b4fd92a.tar.xz
Implement a small Console OS - a rescue environment in RAM1.3.9
This uses two squashfs modules that are currently only found in the LEAN and XFCE images: 'min' and 'noxbase'. These two provide a functional console-only Slackware with a lot of useful programs. It will connect to a DHCP server automatically and it also contains the 'setup2hd' script to be able to install Slackware from a network mirror. And since the Console OS gets loaded into RAM, you can remove your USB stick after booting and use that stick for other purposes. Use-case: - You have one computer with a network connection and one USB stick, and want to create a persistent Slackware Live on USB. - Download an ISO supporting 'Console OS' to the computer's hard drive, and transfer the ISO to the USB stick using the computer's ISO imaging tools, making the stick bootable but not persistent. - Boot from the USB stick, select the "Console OS in RAM" option. - After you logged into the Console Slackware, mount the computer's hard drive. - Use the 'iso2usb.sh' script that comes with liveslak to extract the ISO content to the USB stick, making it persistent. See the README.txt for instructions. ----------------------------------------------------------------------------- Implemented as an extension of the liveslak 'toram' boot parameter. Adding 'toram=core' to the boot commandline will load circa 500 MB of squashfs modules into RAM and boot into a sparse but functional console environment. For supported Live variants (currently LEAN and XFCE) the script 'make_slackware_live.sh' will automatically add a menu item "Console OS in RAM" to the Syslinux and Grub bootloaders, using this 'toram=core' parameter. TODO: add this as an option to all liveslak variants. Not so trivial to do.
Diffstat (limited to 'upslak.sh')
-rw-r--r--upslak.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/upslak.sh b/upslak.sh
index 4af5ae5..cd095d7 100644
--- a/upslak.sh
+++ b/upslak.sh
@@ -81,6 +81,7 @@ LIVEUID=""
MARKER=""
MEDIALABEL=""
PERSISTENCE=""
+CORE2RAMMODS=""
SQ_EXT_AVAIL=""
VERSION=""
@@ -359,7 +360,7 @@ collect_kmods() {
else
chroot ${IMGDIR} depmod $KVER 2>/dev/null
fi
-}
+} # End of collect_kmods ()
# Read configuration data from old initrd:
read_initrd() {
@@ -371,7 +372,7 @@ read_initrd() {
OLDWAIT=$(cat ./wait-for-root)
# Read the values of liveslak template variables in the init script:
- for TEMPLATEVAR in DEF_KBD DEF_LOCALE DEF_TZ DISTRO LIVE_HOSTNAME LIVEMAIN LIVEUID MARKER MEDIALABEL PERSISTENCE SQ_EXT_AVAIL VERSION ; do
+ for TEMPLATEVAR in DEF_KBD DEF_LOCALE DEF_TZ DISTRO LIVE_HOSTNAME LIVEMAIN LIVEUID MARKER MEDIALABEL PERSISTENCE CORE2RAMMODS SQ_EXT_AVAIL VERSION ; do
eval $(grep "^ *${TEMPLATEVAR}=" ./init |head -1)
done
@@ -544,10 +545,13 @@ parse_template() {
-e "s/@PERSISTENCE@/${PERSISTENCE:-persistence}/g" \
-e "s/@DARKSTAR@/${LIVE_HOSTNAME:-darkstar}/g" \
-e "s/@LIVEUID@/${LIVEUID:-live}/g" \
+ -e "s/@LIVEUIDNR@/${LIVEUIDNR:-1000}/g" \
-e "s/@DISTRO@/$DISTRO/g" \
-e "s/@CDISTRO@/${DISTRO^}/g" \
-e "s/@UDISTRO@/${DISTRO^^}/g" \
+ -e "s/@CORE2RAMMODS@/${CORE2RAMMODS:-"min noxbase"}/g" \
-e "s/@VERSION@/${VERSION}/g" \
+ -e "s/@KVER@/$KVER/g" \
-e "s/@SQ_EXT_AVAIL@/${SQ_EXT_AVAIL}/g" \
-e "s,@DEF_KBD@,${DEF_KBD},g" \
-e "s,@DEF_LOCALE@,${DEF_LOCALE},g" \