Share folder for other sites: no WJ Blancco release or Wi-Fi password

stage-usb-share.sh --no-blancco-release leaves out boot-tools/blancco's
vendor release (config.img carries this site's licensing Wi-Fi password and
location) and the unused blancco-uki.efi. The KB's Part 4 now has the site
load its own Blancco 7.20 ISO on Updates > Blancco releases. The Wi-Fi
password is gone from SITE-CUSTOMIZATION.md.
This commit is contained in:
cproudlock
2026-10-17 11:51:46 -04:00
parent 120553c975
commit 5f7954ac88
3 changed files with 28 additions and 6 deletions

View File

@@ -4,7 +4,7 @@
# on a share, so a Windows PC can build the installer USB from it.
#
# Usage:
# scripts/stage-usb-share.sh [--iso FILE] [--payload-root DIR] [DEST]
# scripts/stage-usb-share.sh [--iso FILE] [--payload-root DIR] [--no-blancco-release] [DEST]
#
# DEST defaults to ~/pxe-images/pxe-usb (the [pxe-images] Samba share; on
# the work PC: \\<this PC>\pxe-images\pxe-usb, usually Z:\pxe-usb). It gets:
@@ -18,6 +18,12 @@
# Then on the work PC: copy the folder to a local disk (C:\pxe-usb) and
# double-click Build-PxeUsb.cmd (KB: docs/kb/How_To_Deploy_PXE_Server_New_Site.html).
#
# --no-blancco-release leaves out the Blancco release (the vendor files from
# boot-tools/blancco: kernel, initramfs, microcode, rootfs, and config.img
# with this site's preferences and licence files) and the unused
# blancco-uki.efi. Use it for a folder going to another site: that site
# uploads its own Blancco ISO on Updates > Blancco releases.
#
# The new copy is built beside the old one and swapped in when complete.
# Run capture-site-content.sh --apply first so site-content/ is current.
@@ -27,11 +33,13 @@ REPO_ROOT="$(cd "$(dirname "$0")"/.. && pwd)"
PAYLOAD_ROOT="$REPO_ROOT"
ISO=""
DEST=""
NO_BLANCCO_RELEASE=0
while [ $# -gt 0 ]; do
case "$1" in
--iso) ISO="${2:?}"; shift 2 ;;
--payload-root) PAYLOAD_ROOT="$(cd "${2:?}" && pwd)"; shift 2 ;;
--no-blancco-release) NO_BLANCCO_RELEASE=1; shift ;;
-h|--help) sed -n '2,/^$/p' "$0" | sed 's/^# \{0,1\}//'; exit 0 ;;
-*) echo "unknown option $1" >&2; exit 2 ;;
*) DEST="$1"; shift ;;
@@ -86,6 +94,13 @@ for d in offline-packages pip-wheels boot-files boot-tools enrollment bios-stagi
link_or_copy "$src" "$NEW/$d"
printf ' %-17s %s\n' "$d" "$(du -sh "$NEW/$d" | cut -f1)"
done
if [ "$NO_BLANCCO_RELEASE" = 1 ]; then
# Hard links: removing them here leaves the payload copies alone.
B="$NEW/boot-tools/blancco"
rm -rf -- "$B/arch" "$B/vmlinuz-bde-linux" "$B/initramfs-bde-linux.img" \
"$B/intel-ucode.img" "$B/amd-ucode.img" "$B/config.img" "$B/blancco-uki.efi"
echo " Blancco release left out (--no-blancco-release)"
fi
link_or_copy "$ISO" "$NEW/$(basename "$ISO")"
echo " ISO $(basename "$ISO")"
@@ -94,6 +109,7 @@ echo " ISO $(basename "$ISO")"
echo "Commit: $(git log -1 --format='%h %s')"
echo "ISO: $(basename "$ISO")"
echo "Payload root: $PAYLOAD_ROOT"
[ "$NO_BLANCCO_RELEASE" = 1 ] && echo "Blancco release: not included (upload one on Updates > Blancco releases)"
echo
echo "On the Windows PC:"
echo " 1. Copy this whole folder to a local disk, e.g. C:\\pxe-usb"