Replace the fragile Python regex patch (which failed to match the actual
awk variable name in mkarchiso) with a mkfs.fat wrapper script placed
earlier in PATH. The wrapper intercepts every -C (create) invocation and
adds +128 MiB (131072 KiB) to the size argument, ensuring the ~50 MB
ARM64 kernel Image + FAT filesystem overhead fits regardless of which
exact size formula the installed mkarchiso version uses.
Also adds a grep of mkarchiso's size lines to stdout so the formula is
visible in build logs for future debugging.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The ARM64 kernel Image is ~50 MB. mkarchiso calculates the EFI FAT
image size as int(total_bytes/MiB)+2, which leaves no room for FAT
filesystem overhead → "Disk full" when copying the kernel in.
Patch mkarchiso at container startup (before mkarchiso runs) to use
+128 MiB buffer instead, giving plenty of headroom.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Dockerfile.arm64: after pre-downloading linux-aarch64, build a local
pacman repo from the cached package using repo-add so mkarchiso can
install the kernel from file:// without touching the [alarm] mirror.
entrypoint-arm64.sh: put [alarm-local] first in the profile pacman.conf
so pacstrap always resolves linux-aarch64 from the baked-in repo.
Also add a symlink fallback in customize_airootfs.sh: ALARM aarch64
may install the kernel as /boot/Image instead of /boot/vmlinuz-linux-aarch64;
the symlink ensures archiso's vmlinuz-* glob and systemd-boot both find it.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add ls/pacman -Q diagnostics in customize_airootfs.sh so we can see
exactly what is (or isn't) in /boot after pacstrap
- Pre-download linux-aarch64 in Dockerfile with pacman -Sw so mkarchiso
can install it from the local pacman cache even if the [alarm] mirror
is unreachable at ISO-build time
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Writing the preset to the airootfs overlay caused a file conflict when
pacstrap installed linux-aarch64 (which ships its own copy of the file).
Move the preset override into customize_airootfs.sh which runs after
pacstrap, so the package installs cleanly then we replace the preset.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ALARM mirrors inconsistently serve .db.sig files — some mirrors return
404 for core.db.sig which aborts the pacstrap. SigLevel = Never is
standard practice for Docker-based archiso builds.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Three fixes for the 'vmlinuz-* not found' failure:
1. Override releng profile's pacman.conf to add [alarm] and [aur] repos.
linux-aarch64 lives in [alarm] — without this the kernel package was
silently missing from the airootfs and /boot was empty.
2. Remove linux.preset from releng airootfs (references vmlinuz-linux,
the x86_64 kernel name that doesn't exist on ALARM).
3. Add linux-aarch64.preset to the airootfs with an 'archiso' preset entry
(ALL_kver=/boot/vmlinuz-linux-aarch64, archiso_image=initramfs-linux-aarch64.img).
mkarchiso looks for this 'archiso' preset to build the live initramfs.
4. Switch customize_airootfs.sh from mkinitcpio -P to mkinitcpio -p linux-aarch64
so only the aarch64 preset runs (not the stale x86_64 linux preset).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
archiso is not in ALARM repos for aarch64 — pacstrap fails trying to
install it into the live ISO root. The Docker build environment already
has mkarchiso installed from source; the live ISO doesn't need it.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>