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>
This commit is contained in:
1 parent
4a4f3ddba5
commit
5160a30d72
2 files changed
+30
-4
No files matched your search
@@ -65,9 +65,13 @@ RUN git clone --depth=1 https://gitlab.archlinux.org/archlinux/archiso.git /tmp/
|
||||
cp -a /tmp/archiso/configs /usr/share/archiso/ && \
|
||||
rm -rf /tmp/archiso
|
||||
|
||||
# Pre-download linux-aarch64 so mkarchiso can install it from local cache
|
||||
# even if the [alarm] mirror is unreliable at ISO-build time.
|
||||
RUN pacman -Sw --noconfirm linux-aarch64
|
||||
# Pre-download linux-aarch64 and create a local pacman repo so mkarchiso
|
||||
# can install the kernel without depending on the [alarm] mirror at build time.
|
||||
RUN pacman -Sw --noconfirm linux-aarch64 && \
|
||||
mkdir -p /alarm-local-repo && \
|
||||
find /var/cache/pacman/pkg -name "linux-aarch64-*.pkg.tar.*" ! -name "*.sig" \
|
||||
-exec cp {} /alarm-local-repo/ \; && \
|
||||
repo-add /alarm-local-repo/alarm-local.db.tar.gz /alarm-local-repo/linux-aarch64-*.pkg.tar.*
|
||||
|
||||
WORKDIR /orionos
|
||||
COPY . .
|
||||
|
||||
@@ -23,9 +23,15 @@ cat > "$PROFILE/pacman.conf" <<'PACMANCONF'
|
||||
[options]
|
||||
HoldPkg = pacman glibc
|
||||
Architecture = aarch64
|
||||
# Mirrors occasionally lack .db.sig files — disable sig checks for reliability
|
||||
SigLevel = Never
|
||||
|
||||
# alarm-local is a file:// repo baked into the Docker image containing the
|
||||
# pre-downloaded linux-aarch64 package. It comes first so pacstrap can always
|
||||
# find the kernel even when the upstream [alarm] mirror is unreliable.
|
||||
[alarm-local]
|
||||
SigLevel = Never
|
||||
Server = file:///alarm-local-repo
|
||||
|
||||
[core]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
@@ -651,6 +657,22 @@ echo "=== /usr/lib/modules/ ==="
|
||||
ls /usr/lib/modules/ 2>&1 || echo "(empty)"
|
||||
echo "=== end diagnostics ==="
|
||||
|
||||
# ALARM aarch64 sometimes installs the kernel as /boot/Image (uncompressed EFI
|
||||
# stub) rather than /boot/vmlinuz-linux-aarch64. Archiso's vmlinuz glob and
|
||||
# systemd-boot both expect the vmlinuz-* naming — create a symlink when needed.
|
||||
if [[ ! -f /boot/vmlinuz-linux-aarch64 ]]; then
|
||||
if [[ -f /boot/Image ]]; then
|
||||
ln -sf Image /boot/vmlinuz-linux-aarch64
|
||||
echo ">>> Symlinked /boot/Image -> vmlinuz-linux-aarch64"
|
||||
elif [[ -f /boot/Image.gz ]]; then
|
||||
ln -sf Image.gz /boot/vmlinuz-linux-aarch64
|
||||
echo ">>> Symlinked /boot/Image.gz -> vmlinuz-linux-aarch64"
|
||||
else
|
||||
echo "WARNING: no kernel image found in /boot/ — build will likely fail"
|
||||
ls /boot/ 2>&1 || true
|
||||
fi
|
||||
fi
|
||||
|
||||
useradd -m -G wheel,audio,video,storage,input -s /bin/bash orion 2>/dev/null || true
|
||||
echo "orion:orionos" | chpasswd
|
||||
|
||||
|
||||
Reference in new issue
Block a user