getarg's trailing-= convention varies by mkinitcpio version and was
returning empty even when archisosearchuuid was present in cmdline.
Parse /proc/cmdline directly in ash — no external tools, no version
sensitivity.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Syslinux passes archisolabel= not archisosearchuuid= (UUID is only in
systemd-boot entries). Add blkid label lookup as fallback so both boot
paths work.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
run_latehook fires after mkinitcpio already attempts to mount root= (empty),
which fails. Switch to run_hook() setting mount_handler=archiso_mount_handler
so mkinitcpio calls our handler instead of the default block-device mount.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Current archiso package does not install initcpio hook files (confirmed:
find /usr -path */initcpio/hooks/archiso returns nothing). Write the hook
and its mkinitcpio install script directly into the profile airootfs so
COPY carries them into the image without any package dependency.
Hook finds ISO by archisosearchuuid= kernel param, waits up to 30s for
the device to appear via blkid, mounts iso9660→squashfs→overlay onto
/new_root. mkinitcpio detects /new_root is already mounted and succeeds.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>