Clonezilla for XP-era PCs: 32-bit build picked by CPU

Current Clonezilla is amd64-only. The menu now checks the CPU with iPXE's
cpuid --ext 29 (long mode): 64-bit CPUs get the current release (through
Debian's shim under Secure Boot), 32-bit-only CPUs (Pentium 4 without
EM64T, Pentium M, early Atom) get Clonezilla 3.2.0-5 i686, the last
32-bit release, from clonezilla-i686/. Without a cpuid command the 32-bit
build is used, which also runs on 64-bit CPUs; UEFI always gets the
64-bit build. A 'Clonezilla Live 32-bit' item forces it.
prepare-boot-tools.sh downloads it, the playbook deploys it.
This commit is contained in:
cproudlock
2026-10-15 14:50:40 -04:00
parent 54015566a7
commit dde1aacccb
5 changed files with 57 additions and 6 deletions

View File

@@ -25,7 +25,7 @@ if [ -z "$BLANCCO_ISO" ]; then
BLANCCO_ISO=$(find "$REPO_ROOT" -maxdepth 1 -name '*DriveEraser*.iso' -o -name '*blancco*.iso' 2>/dev/null | head -1)
fi
mkdir -p "$OUT_DIR"/{clonezilla,blancco}
mkdir -p "$OUT_DIR"/{clonezilla,clonezilla-i686,blancco}
echo "============================================"
echo "PXE Boot Tools Preparation"
@@ -84,6 +84,32 @@ if command -v sbverify >/dev/null && [ -s "$OUT_DIR/clonezilla/shimx64.efi" ]; t
fi
fi
# --- Clonezilla Live 32-bit (XP-era PCs) ---
# Clonezilla 3.2.0-5 is the last release with a 32-bit (i686) build; the
# menu picks it for CPUs without 64-bit support (cpuid --ext 29). Legacy
# BIOS only, so no shim. Plain i686 (not -pae) for the oldest CPUs.
echo ""
echo "[1b/2] Clonezilla Live 32-bit"
CZ32_VERSION="3.2.0-5"
CZ32_FILE="clonezilla-live-${CZ32_VERSION}-i686.zip"
if [ -f "$OUT_DIR/clonezilla-i686/vmlinuz" ] && [ -f "$OUT_DIR/clonezilla-i686/filesystem.squashfs" ]; then
echo " Already prepared, skipping. Delete boot-tools/clonezilla-i686/ to re-download."
else
TMPDIR=$(mktemp -d)
if wget -q --show-progress -O "$TMPDIR/$CZ32_FILE" \
"https://sourceforge.net/projects/clonezilla/files/clonezilla_live_stable/${CZ32_VERSION}/${CZ32_FILE}/download" \
|| wget -q --show-progress -O "$TMPDIR/$CZ32_FILE" \
"https://free.nchc.org.tw/clonezilla-live/oldstable/${CZ32_FILE}"; then
unzip -o -j "$TMPDIR/$CZ32_FILE" "live/vmlinuz" "live/initrd.img" "live/filesystem.squashfs" \
-d "$OUT_DIR/clonezilla-i686/"
echo " Done."
else
echo " ERROR: could not download $CZ32_FILE; 32-bit PCs cannot run Clonezilla until it is staged."
fi
rm -rf "$TMPDIR"
fi
ls -lh "$OUT_DIR/clonezilla-i686/" 2>/dev/null | grep -E 'vmlinuz|initrd|squashfs' | sed 's/^/ /'
# --- Blancco Drive Eraser ---
echo ""
echo "[2/2] Blancco Drive Eraser"
@@ -290,7 +316,7 @@ echo "Boot tools prepared in: $OUT_DIR/"
echo "============================================"
echo ""
for tool in clonezilla blancco; do
for tool in clonezilla clonezilla-i686 blancco; do
COUNT=$(find "$OUT_DIR/$tool" -type f 2>/dev/null | wc -l)
SIZE=$(du -sh "$OUT_DIR/$tool" 2>/dev/null | cut -f1)
printf " %-15s %s (%d files)\n" "$tool" "$SIZE" "$COUNT"
@@ -299,6 +325,7 @@ done
echo ""
echo "These files need to be copied to the PXE server's web root:"
echo " /var/www/html/clonezilla/"
echo " /var/www/html/clonezilla-i686/"
echo " /var/www/html/blancco/"
echo ""
echo "The build-usb.sh script will include them automatically,"