This commit is contained in:
Bart Sjerps
2026-07-10 10:18:21 +02:00
parent c5ea471a5a
commit 052a88cd3b
2 changed files with 6 additions and 9 deletions
+3 -5
View File
@@ -7,7 +7,9 @@
die() { echo "$(basename $0): [die] $@" >&2 ; exit 1 ; }
test $(id -u) == 0 || die "Run as root (sudo $(basename $0) <opts>"
test $(id -u) == 0 || die "Run as root (sudo $(basename $0) <opts>"
rpm -q --quiet lorax || die "lorax not installed"
rpm -q --quiet genisoimage || die "genisoimage not installed"
# Setup temp working directory - clean it up when program ends
readonly WORKDIR=$(/bin/mktemp --tmpdir -d)
@@ -17,8 +19,6 @@ trap "cleanup" INT TERM HUP EXIT
topdir=$(git rev-parse --show-toplevel)
echo $topdir
# requires lorax, genisoimage: dnf install lorax genisoimage
isopath=/nfs/sw/os/rocky/Rocky-9.7-x86_64-minimal.iso
target=/nfs/pve/template/iso/custom.iso
@@ -28,8 +28,6 @@ custom=$topdir/custom
cp -r $custom $WORKDIR
cp $ks $WORKDIR
rpm -q --quiet lorax || die "lorax not installed"
rpm -q --quiet genisoimage || die "genisoimage not installed"
test -f $target && sudo rm -f $target
+3 -4
View File
@@ -32,8 +32,6 @@ source /mnt/install/repo/custom/settings
touch /tmp/rpms /tmp/settings
# Settings from config file
# rootpw='$6$1mQhye0V5LujdR4F$87zIHy3bMZgjt02xY/F59eWk58VXh5CDSL0t9AInj6QOjLmYF0TDVeGLJH/bIKaGqXrbVJAgDHYZ9uT1uTMRX.'
echo "repo --name=\"AppStream\" --baseurl=${REPO:-NO_REPO}" >> /tmp/settings
echo "rootpw --iscrypted ${ROOTPW:-NO_ROOTPW}" >> /tmp/settings
echo "timezone ${TZ:-Europe/Amsterdam}" >> /tmp/settings
@@ -41,9 +39,10 @@ echo "timezone ${TZ:-Europe/Amsterdam}" >> /tmp/settings
set -- `cat /proc/cmdline`
for I in $*; do case "$I" in *=*) eval ${I//inst\./} ;; esac; done
grep -qws "debug" /proc/cmdline && bash
# boot disk detection
lsblk -bSo name,type,ro,hotplug,size,vendor,model,serial
bd=$(lsblk -nbSo name,type,ro,hotplug,size | awk 'NR==1 && $2=="disk" && $3==0 && $4==0 && $5>500 {print $1}')
printf "%-10s%10s%10s%10s\n" dev size removable inuse
for dev in $(find /sys/block/ -name "sd?" -o -name "xvd?" -o -name "vd?"|sort); do
devname=${dev##*/}