USB-Ausfall beim Schreiben klar erkennen
Some checks failed
Tests / test (push) Has been cancelled

This commit is contained in:
2026-10-15 09:52:14 +02:00
parent 8c74a52f01
commit c0498b6935

View File

@@ -60,7 +60,15 @@ trap cleanup EXIT
mkdir -p "$TMP/boot" "$TMP/data"
mount "$p2" "$TMP/boot"; mount "$p3" "$TMP/data"
mkdir -p "$TMP/boot/boot/grub" "$TMP/data/reports" "$TMP/data/database" "$TMP/data/checklists" "$TMP/data/reference"
cp "$ISO" "$TMP/boot/pc-intake.iso"
if ! cp "$ISO" "$TMP/boot/pc-intake.iso" || ! sync -f "$TMP/boot"; then
current_size=$(blockdev --getsize64 "$DEVICE" 2>/dev/null || echo 0)
if ((current_size == 0)); then
echo 'USB medium disappeared while writing. Replace the stick or use another USB port.' >&2
else
echo 'USB write failed. Check the stick and the kernel log before retrying.' >&2
fi
exit 1
fi
# Copy video reference files separately under INTAKE_DATA/reference (optional).
cat > "$TMP/boot/boot/grub/grub.cfg" <<'GRUBCFG'
set timeout=5