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>
This commit is contained in:
1 parent
22b311790e
commit
00c4914b7b
2 files changed
+15
-7
No files matched your search
@@ -56,13 +56,17 @@ RUN pacman -Syu --noconfirm && \
|
||||
&& pacman -Scc --noconfirm
|
||||
|
||||
# Install archiso from upstream source (not packaged for aarch64 in ALARM).
|
||||
# Manually copy the three things mkarchiso needs — skip 'make install' because
|
||||
# it tries to build man pages with rst2man which isn't available.
|
||||
# Manually copy what mkarchiso needs — skip 'make install' (requires rst2man).
|
||||
# Also preserve the mkinitcpio hooks from initcpio/ so the entrypoint can
|
||||
# install them into the ISO airootfs (the chroot has no archiso package, so
|
||||
# the hooks must come from the airootfs overlay for mkinitcpio to use them).
|
||||
RUN git clone --depth=1 https://gitlab.archlinux.org/archlinux/archiso.git /tmp/archiso && \
|
||||
install -Dm755 /tmp/archiso/archiso/mkarchiso /usr/bin/mkarchiso && \
|
||||
install -Dm755 /tmp/archiso/scripts/run_archiso.sh /usr/bin/run_archiso && \
|
||||
install -d /usr/share/archiso && \
|
||||
cp -a /tmp/archiso/configs /usr/share/archiso/ && \
|
||||
install -Dm644 /tmp/archiso/initcpio/hooks/archiso /usr/share/archiso/initcpio/hooks/archiso && \
|
||||
install -Dm644 /tmp/archiso/initcpio/install/archiso /usr/share/archiso/initcpio/install/archiso && \
|
||||
rm -rf /tmp/archiso
|
||||
|
||||
# Pre-download linux-aarch64 and create a local pacman repo so mkarchiso
|
||||
|
||||
@@ -146,11 +146,15 @@ rm -f "$PROFILE/packages.x86_64"
|
||||
# ── 3. airootfs overlay — files that land in the live system ─────────
|
||||
AIROOTFS="$PROFILE/airootfs"
|
||||
|
||||
# The releng profile already ships official archiso mkinitcpio hooks at
|
||||
# $PROFILE/airootfs/usr/lib/initcpio/{hooks,install}/archiso.
|
||||
# Do NOT overwrite them — the official hooks handle uname -m arch detection,
|
||||
# correct squashfs paths, all required modules/binaries, and mount_handler
|
||||
# wiring. Our simplified custom hooks were causing "sbin/init not found".
|
||||
# The archiso mkinitcpio hooks live in initcpio/ of the archiso git repo,
|
||||
# NOT in configs/releng/airootfs/ — so they aren't picked up by the releng
|
||||
# profile copy above. The ISO airootfs chroot has no archiso package either
|
||||
# (ALARM doesn't package it), so the hooks must be placed here explicitly.
|
||||
# The Dockerfile preserved the official hooks at /usr/share/archiso/initcpio/.
|
||||
mkdir -p "$AIROOTFS/usr/lib/initcpio/hooks" "$AIROOTFS/usr/lib/initcpio/install"
|
||||
install -m755 /usr/share/archiso/initcpio/hooks/archiso "$AIROOTFS/usr/lib/initcpio/hooks/archiso"
|
||||
install -m755 /usr/share/archiso/initcpio/install/archiso "$AIROOTFS/usr/lib/initcpio/install/archiso"
|
||||
echo ">>> Official archiso mkinitcpio hooks installed into airootfs"
|
||||
|
||||
mkdir -p "$AIROOTFS/etc/mkinitcpio.conf.d"
|
||||
cat > "$AIROOTFS/etc/mkinitcpio.conf.d/archiso.conf" <<'MKCONF'
|
||||
|
||||
Reference in new issue
Block a user