Commit Graph
6 Commits
Author SHA1 Message Date
GuofangandClaude Sonnet 5.5 f5881cd5c8 Default the work directory to /var/tmp
/tmp is memory-backed on some systems, and the work directory holds about
10 GiB.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-19 13:38:47 +08:00
GuofangandClaude Sonnet 5.5 e1148cce7b Drop the redundant mkdir of the staged sources directory
rsync already creates sources/ because the ISO has one.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-19 13:28:44 +08:00
GuofangandClaude Sonnet 5.5 d9707fd57b Stage the Windows ISO files with rsync before copying them into the image
Copy the ISO without install.wim to a staging directory, split install.wim
into it, and fill the image with one recursive mcopy instead of a mmd and
mcopy per directory. rsync --chmod keeps the staged directories writable so
that cleanup can remove them.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-19 13:26:24 +08:00
GuofangandClaude Sonnet 5.5 dd29fd92a7 Drop .install from the Windows install disk image name
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-19 09:28:54 +08:00
GuofangandClaude Sonnet 5.5 5468fdc033 Log each command in build-windows-install-disk.sh; build the image in place
Print the command line before every external command (hdiutil, udisksctl,
wimlib-imagex, sgdisk, mkfs.fat, mmd, mcopy and so on) so the log shows
which command is running. Write the image straight to the output path
instead of moving it from the work directory, and remove a partial output
if the run fails or is cancelled.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-18 14:20:31 +08:00
guofangandClaude Sonnet 5.5 21604f511f Add a script that builds a fast Windows installation disk image
QEMU's emulated USB CD-ROM reads the Windows ISO at a few MB/s. The script
builds a bootable FAT32 GPT disk image from the ISO, splitting install.wim into
install*.swm parts for the 4 GB FAT32 file limit, so the image can be attached
as an NVMe disk and read about 15 times faster.

It runs on macOS and Debian. The ISO has to be read as UDF: hdiutil on macOS,
mount -t udf as root on Linux, otherwise udisksctl, otherwise 7z extracts it.
A desktop session automounts the loop device that udisksctl creates, so the
existing mount point is reused when there is one. The image itself is built
without root.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 17:28:18 +08:00