13 Commits
Author SHA1 Message Date
nmemmertandClaude Sonnet 4.6 4cda708cc2 Fix ARM64 initramfs: write complete archiso mkinitcpio hooks inline
The archiso git repo doesn't ship the hooks as standalone files, and
ALARM has no archiso package. Write the hooks directly in the entrypoint
with the correct three-phase structure:

- run_earlyhook: modprobe squashfs/overlay/iso9660/loop/vfat before udev
- run_hook: parse archisolabel/archisobasedir from /proc/cmdline, set
  mount_handler="archiso_mount_handler"
- archiso_mount_handler: find ISO by label (fallback to TYPE=iso9660),
  mount it, mount squashfs at arch/$(uname -m)/airootfs.sfs, set up
  tmpfs cowspace, mount overlay to /new_root

install hook: add all required modules (squashfs, overlay, iso9660,
loop, vfat, nls_*) and binaries (blkid, losetup, sleep, uname).
Each mount step prints its progress and bails with a clear error message
on failure so boot panics are diagnosable.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-27 08:40:18 -04:00
nmemmertandClaude Sonnet 4.6 629f16537e Fix archiso hook path: search rather than assume repo layout
The hooks are NOT at initcpio/hooks/archiso in the archiso git repo root
(that path doesn't exist). Remove the broken install lines from Dockerfile
and instead add a find diagnostic during build to reveal the actual paths.

entrypoint: use find to locate the hooks dynamically under /usr/share/archiso
(the releng airootfs copy) instead of hardcoding a path — bail with a clear
error listing if nothing is found.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-27 08:36:15 -04:00
nmemmertandClaude Sonnet 4.6 00c4914b7b Fix ARM64 boot: install official archiso mkinitcpio hooks into airootfs
The archiso mkinitcpio hooks live in initcpio/ at the repo root, not in
configs/releng/airootfs/ — so they were never in the ISO airootfs chroot.
ALARM has no archiso package either, so the chroot's mkinitcpio found no
archiso hook, built an initramfs without mount_handler logic, and the
default handler fired at boot with empty root= → "Failed to mount ''".

Dockerfile.arm64: preserve the official hooks from initcpio/ into
/usr/share/archiso/initcpio/ instead of deleting them with the repo.

entrypoint-arm64.sh: explicitly install the official hooks into the
airootfs overlay so the chroot mkinitcpio finds them when building the
initramfs. The official hooks use uname -m for arch detection and include
all required modules/binaries for squashfs live boot.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-27 08:34:02 -04:00
nmemmertandClaude Sonnet 4.6 22b311790e Fix ARM64 boot: use official archiso mkinitcpio hooks from releng profile
The custom simplified hooks we were writing to the airootfs overlay
overwrote the official hooks shipped in the releng profile. The official
hooks handle uname -m for the aarch64 squashfs path, include all required
modules (squashfs, overlay, iso9660, loop, dm-snapshot, nls_*) and
binaries (blkid, findfs, losetup, switch_root), and wire up mount_handler
correctly. Our stripped-down hooks caused the overlay to mount empty,
producing the "Root device mounted successfully, but /sbin/init does not
exist" panic at boot.

Fix: stop overwriting the official hooks; keep only the mkinitcpio.conf
(which lists the hook names, not their implementation). Also remove
plymouth from initramfs HOOKS to reduce boot complexity.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-27 08:23:23 -04:00
nmemmertandClaude Sonnet 4.6 e56412ecdd Fix ARM64 ISO: mkfs.fat PATH wrapper to guarantee EFI FAT headroom
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>
2026-07-27 08:12:12 -04:00
nmemmertandClaude Sonnet 4.6 bdfc6008fc Fix ARM64 ISO: patch mkarchiso EFI FAT size for large ARM64 kernel
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>
2026-07-27 08:00:17 -04:00
nmemmertandClaude Sonnet 4.6 5160a30d72 Fix ARM64 ISO: local kernel repo + Image symlink fallback
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>
2026-07-24 12:05:15 -04:00
nmemmertandClaude Sonnet 4.6 4a4f3ddba5 ARM64: add boot diagnostics + pre-cache linux-aarch64 in Docker image
- 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>
2026-07-24 11:57:33 -04:00
nmemmertandClaude Sonnet 4.6 62c484e0ce Fix ARM64 preset conflict: write linux-aarch64.preset in customize_airootfs
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>
2026-07-24 11:50:51 -04:00
nmemmertandClaude Sonnet 4.6 fffc7508f7 Fix ARM64 pacman.conf: SigLevel = Never for mirror reliability
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>
2026-07-24 11:46:42 -04:00
nmemmertandClaude Sonnet 4.6 56031c8c6f Fix ARM64 ISO build: pacman.conf repos, kernel preset, mkinitcpio
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>
2026-07-24 11:45:31 -04:00
nmemmertandClaude Sonnet 4.6 58446c1f32 Remove archiso from ARM64 live package list
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>
2026-07-24 11:35:04 -04:00
nmemmertandClaude Sonnet 4.6 b9d7123d60 Add ARM64 ISO build for Apple Silicon / UTM
- iso/docker/Dockerfile.arm64: Arch Linux ARM base (menci/archlinuxarm:aarch64)
- iso/docker/entrypoint-arm64.sh: ARM64 archiso profile — linux-aarch64
  kernel, EFI-only boot (no syslinux), aarch64 squashfs path, spice-vdagent
  for UTM clipboard, VirtIO GPU modesetting config
- build-iso-arm64.sh: docker buildx --platform linux/arm64 wrapper;
  runs natively on Apple Silicon, no QEMU emulation needed

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-24 10:43:33 -04:00