Bundle archiso initcpio hook directly in repo

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>
This commit is contained in:
nmemmertandClaude Sonnet 4.6 committed 2026-08-31 11:34:08 -04:00
1 parent a3beffae15
commit ca0e9f7c72
3 files changed
+74 -12

No files matched your search

@@ -0,0 +1,19 @@
#!/bin/bash
# mkinitcpio install script for the archiso live-boot hook.
build() {
add_runscript
add_binary blkid
add_binary mount
add_binary sleep
add_module squashfs
add_module overlay
add_module isofs
}
help() {
cat <<HELPEOF
Locates the live ISO by UUID, mounts the squashfs airootfs, and sets up
a RAM-backed overlay as the writable root filesystem.
HELPEOF
}