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:
1 parent
a3beffae15
commit
ca0e9f7c72
3 files changed
+74
-12
No files matched your search
@@ -38,18 +38,6 @@ COPY . /build/orionos
|
||||
# Bootstrap boot loader configs from the installed archiso releng profile.
|
||||
# Copy only the .c32 binary modules — our repo provides syslinux.cfg.
|
||||
# efiboot/ is needed for systemd-boot UEFI; fall back to a minimal loader.conf.
|
||||
# Copy archiso initcpio hook files directly into airootfs so mkinitcpio
|
||||
# finds them even if the package-based install path differs at build time.
|
||||
# Use find to locate the files regardless of exact path in current archiso version.
|
||||
RUN mkdir -p /build/orionos/iso/profile/airootfs/usr/lib/initcpio/hooks \
|
||||
/build/orionos/iso/profile/airootfs/usr/lib/initcpio/install && \
|
||||
HOOK="$(find /usr -path "*/initcpio/hooks/archiso" 2>/dev/null | head -1)" && \
|
||||
INST="$(find /usr -path "*/initcpio/install/archiso" 2>/dev/null | head -1)" && \
|
||||
echo "Hook: ${HOOK:-NOT FOUND}" && echo "Install: ${INST:-NOT FOUND}" && \
|
||||
[ -n "$HOOK" ] && cp "$HOOK" /build/orionos/iso/profile/airootfs/usr/lib/initcpio/hooks/archiso || \
|
||||
(echo "ERROR: archiso initcpio hook not found in any path" && exit 1) && \
|
||||
[ -n "$INST" ] && cp "$INST" /build/orionos/iso/profile/airootfs/usr/lib/initcpio/install/archiso || \
|
||||
(echo "ERROR: archiso initcpio install not found in any path" && exit 1)
|
||||
|
||||
RUN mkdir -p /build/orionos/iso/profile/syslinux && \
|
||||
cp /usr/share/archiso/configs/releng/syslinux/*.c32 \
|
||||
|
||||
Reference in new issue
Block a user