Fix ARM64 preset conflict: write linux-aarch64.preset in customize_airootfs

Writing the preset to the airootfs overlay caused a file conflict when
pacstrap installed linux-aarch64 (which ships its own copy of the file).
Move the preset override into customize_airootfs.sh which runs after
pacstrap, so the package installs cleanly then we replace the preset.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
nmemmertandClaude Sonnet 4.6 committed 2026-07-24 11:50:51 -04:00
1 parent fffc7508f7
commit 62c484e0ce
1 file changed
+13 -16
+13 -16
View File
@@ -215,20 +215,6 @@ FILES=()
HOOKS=(base udev plymouth archiso block filesystems keyboard)
MKCONF
# mkinitcpio preset for the aarch64 live boot image.
# mkarchiso looks for a preset named 'archiso' to build the live initramfs.
# The linux-aarch64 package only ships 'default'/'fallback' presets, so we
# provide our own with the archiso hooks and the correct kernel path.
mkdir -p "$AIROOTFS/etc/mkinitcpio.d"
cat > "$AIROOTFS/etc/mkinitcpio.d/linux-aarch64.preset" <<'PRESET'
ALL_config="/etc/mkinitcpio.conf.d/archiso.conf"
ALL_kver="/boot/vmlinuz-linux-aarch64"
PRESETS=('archiso')
archiso_image="/boot/initramfs-linux-aarch64.img"
PRESET
cat > "$AIROOTFS/etc/hostname" <<'EOF'
orionos
EOF
@@ -672,8 +658,19 @@ update-desktop-database 2>/dev/null || true
fc-cache -f 2>/dev/null || true
plymouth-set-default-theme orionos 2>/dev/null || true
# Run only the aarch64 preset — mkinitcpio -P would also try linux.preset
# (which references the x86_64 vmlinuz-linux) and fail.
# Override linux-aarch64.preset with an 'archiso' entry for the live initramfs.
# Done here (post-pacstrap) to avoid conflicting with the package's own preset
# file during installation. mkarchiso looks for a preset named 'archiso'.
cat > /etc/mkinitcpio.d/linux-aarch64.preset <<'PRESET'
ALL_config="/etc/mkinitcpio.conf.d/archiso.conf"
ALL_kver="/boot/vmlinuz-linux-aarch64"
PRESETS=('archiso')
archiso_image="/boot/initramfs-linux-aarch64.img"
PRESET
mkinitcpio -p linux-aarch64 2>&1 | tail -10 || true
mkdir -p /etc/skel