From 6239e887f0afc65c66f04005f43fc2e3ab76de3c Mon Sep 17 00:00:00 2001 From: Sean Date: Mon, 24 Aug 2026 20:04:35 +0800 Subject: [PATCH 1/2] Guard three x86-only assumptions so Omarchy can install on aarch64 Each of these is an unconditional assumption that only holds on x86_64. None is x86-specific in spirit, and each one blocks or breaks an ARM64 install. 1. etc/mkinitcpio.conf.d/thunderbolt_module.conf MODULES+=(thunderbolt) is unconditional, but Thunderbolt is x86-oriented hardware and the module is not built for every architecture -- Arch Linux ARM's aarch64 kernel has no `thunderbolt`. mkinitcpio treats an unresolvable MODULES entry as a hard error, so *every* initramfs build fails: ==> ERROR: module not found: `thunderbolt' That means no UKI, no boot entry, and an install that completes and then cannot boot. 2. install/post-install/pacman.sh This overwrites /etc/pacman.conf unconditionally. That config points [core]/[extra]/[multilib] at Omarchy's mirror of Arch, which is x86_64-only, and [omarchy] at pkgs.omarchy.org/stable/$arch, which 404s for aarch64. ([multilib] is 32-bit x86 libraries and exists on no ARM mirror at all.) Applying it on ARM leaves the installed system unable to update anything. 3. install/user/mise-work.sh Node publishes its builds as linux-x64 / linux-arm64, which does not match uname -m. The bundled-tarball lookup hardcodes linux-x64, so on ARM it finds nothing and the install aborts with "no bundled Node tarball". The sed that parses the version back out of the filename needs the same treatment. All three were found by installing Omarchy on aarch64 (Arch Linux ARM) and are fixed here the same way: derive from uname -m rather than assuming. --- etc/mkinitcpio.conf.d/thunderbolt_module.conf | 8 +++++++- install/post-install/pacman.sh | 10 ++++++++-- install/user/mise-work.sh | 9 +++++++-- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/etc/mkinitcpio.conf.d/thunderbolt_module.conf b/etc/mkinitcpio.conf.d/thunderbolt_module.conf index 9518f8b1201c..2f145bb5534d 100644 --- a/etc/mkinitcpio.conf.d/thunderbolt_module.conf +++ b/etc/mkinitcpio.conf.d/thunderbolt_module.conf @@ -1 +1,7 @@ -MODULES+=(thunderbolt) +# Thunderbolt is x86-oriented hardware and the module is not built for every +# architecture -- ALARM's aarch64 kernel has no `thunderbolt`. mkinitcpio treats +# an unresolvable MODULES entry as an error, which fails every initramfs build +# on such a system, so gate it rather than forcing it unconditionally. +if [[ $(uname -m) == x86_64 ]]; then + MODULES+=(thunderbolt) +fi diff --git a/install/post-install/pacman.sh b/install/post-install/pacman.sh index 23580b3c527a..ebfed2b609c6 100644 --- a/install/post-install/pacman.sh +++ b/install/post-install/pacman.sh @@ -1,7 +1,13 @@ # Configure pacman after package installation completes. Offline target package # installs use the live ISO's offline pacman.conf until this final restore. -cp -f "$OMARCHY_PATH/default/pacman/pacman-${OMARCHY_MIRROR:-stable}.conf" /etc/pacman.conf -cp -f "$OMARCHY_PATH/default/pacman/mirrorlist-${OMARCHY_MIRROR:-stable}" /etc/pacman.d/mirrorlist +# Omarchy's pacman.conf points [core]/[extra]/[multilib] at Omarchy's mirror of +# Arch (x86_64 only) and [omarchy] at pkgs.omarchy.org/$arch, which 404s for +# aarch64. Applying it on ARM leaves the installed system unable to update at +# all, so keep the working configuration there. +if [[ $(uname -m) == x86_64 ]]; then + cp -f "$OMARCHY_PATH/default/pacman/pacman-${OMARCHY_MIRROR:-stable}.conf" /etc/pacman.conf + cp -f "$OMARCHY_PATH/default/pacman/mirrorlist-${OMARCHY_MIRROR:-stable}" /etc/pacman.d/mirrorlist +fi # omarchy-settings skips this override until cups-browsed is actually present # to avoid pacman creating cups-browsed.conf.pacnew during ISO package install. diff --git a/install/user/mise-work.sh b/install/user/mise-work.sh index f77d5561e0e6..17ea1e25df9d 100644 --- a/install/user/mise-work.sh +++ b/install/user/mise-work.sh @@ -19,7 +19,12 @@ case ${OMARCHY_SETUP_CONTEXT:-runtime} in esac if [[ -n $NODE_PACKAGE_DIR ]]; then - NODE_TARBALL=$(find "$NODE_PACKAGE_DIR" -name "node-v*-linux-x64.tar.gz" -type f 2>/dev/null | head -n1) + # Node names its builds x64/arm64, not by uname + case "$(uname -m)" in + aarch64) _NODE_ARCH=arm64 ;; + *) _NODE_ARCH=x64 ;; + esac + NODE_TARBALL=$(find "$NODE_PACKAGE_DIR" -name "node-v*-linux-${_NODE_ARCH}.tar.gz" -type f 2>/dev/null | head -n1) if [[ -z $NODE_TARBALL ]]; then if [[ ${OMARCHY_SETUP_CONTEXT:-} == "provision-owner" ]]; then # A factory snapshot predating the bundled tarball may not have it staged. @@ -31,7 +36,7 @@ if [[ -n $NODE_PACKAGE_DIR ]]; then exit 1 fi else - NODE_VERSION=$(basename "$NODE_TARBALL" | sed 's/node-v\(.*\)-linux-x64.tar.gz/\1/') + NODE_VERSION=$(basename "$NODE_TARBALL" | sed "s/node-v\\(.*\\)-linux-${_NODE_ARCH}.tar.gz/\\1/") NODE_INSTALL_DIR="$HOME/.local/share/mise/installs/node/$NODE_VERSION" mkdir -p "$NODE_INSTALL_DIR" From 57b3b91a628719a257cfb51882c1a65adfd2089c Mon Sep 17 00:00:00 2001 From: Sean Date: Wed, 26 Aug 2026 16:25:42 +0800 Subject: [PATCH 2/2] Derive an aarch64 pacman.conf instead of skipping the restore The previous guard skipped the pacman.conf restore on aarch64 on the grounds that Omarchy's config points at x86-only repositories. But at that point the target still carries the live ISO's pacman.conf, which knows only the offline mirror, and that directory does not exist on the installed system. Skipping therefore left every aarch64 install unable to run pacman at all, which is the outcome the guard claimed to prevent. Derive the config from Omarchy's template instead: drop [multilib], keep [omarchy] (its $arch placeholder resolves correctly), add Arch Linux ARM's [alarm] and [aur] repositories, and leave the mirrorlist the distribution installed rather than replacing it with Omarchy's x86_64 mirror of Arch. The x86_64 path is unchanged. --- install/post-install/pacman.sh | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/install/post-install/pacman.sh b/install/post-install/pacman.sh index ebfed2b609c6..dcf39563ce67 100644 --- a/install/post-install/pacman.sh +++ b/install/post-install/pacman.sh @@ -1,13 +1,31 @@ # Configure pacman after package installation completes. Offline target package # installs use the live ISO's offline pacman.conf until this final restore. -# Omarchy's pacman.conf points [core]/[extra]/[multilib] at Omarchy's mirror of -# Arch (x86_64 only) and [omarchy] at pkgs.omarchy.org/$arch, which 404s for -# aarch64. Applying it on ARM leaves the installed system unable to update at -# all, so keep the working configuration there. -if [[ $(uname -m) == x86_64 ]]; then - cp -f "$OMARCHY_PATH/default/pacman/pacman-${OMARCHY_MIRROR:-stable}.conf" /etc/pacman.conf - cp -f "$OMARCHY_PATH/default/pacman/mirrorlist-${OMARCHY_MIRROR:-stable}" /etc/pacman.d/mirrorlist -fi +case "$(uname -m)" in + aarch64) + # Omarchy's pacman.conf and mirrorlist describe an x86_64 Arch system: + # [multilib] is 32-bit x86 libraries and no ARM mirror carries it, and the + # mirrorlist points at Omarchy's mirror of Arch, which is x86_64 only. + # Arch Linux ARM also lays its tree out as $arch/$repo rather than Arch's + # $repo/os/$arch, so the mirrorlist cannot be reused with a different host. + # + # Derive the config from Omarchy's instead: drop [multilib], keep [omarchy] + # (its $arch placeholder resolves correctly), add Arch Linux ARM's own + # [alarm] and [aur] repositories, and leave the mirrorlist the distribution + # installed. Skipping this step is not an option: the live ISO's pacman.conf + # only knows the offline mirror, which does not exist on the installed system. + awk ' + /^\[multilib\]$/ { skip = 1; next } + /^\[/ { skip = 0 } + skip { next } + { print } + ' "$OMARCHY_PATH/default/pacman/pacman-${OMARCHY_MIRROR:-stable}.conf" >/etc/pacman.conf + printf '\n[alarm]\nInclude = /etc/pacman.d/mirrorlist\n\n[aur]\nInclude = /etc/pacman.d/mirrorlist\n' >>/etc/pacman.conf + ;; + *) + cp -f "$OMARCHY_PATH/default/pacman/pacman-${OMARCHY_MIRROR:-stable}.conf" /etc/pacman.conf + cp -f "$OMARCHY_PATH/default/pacman/mirrorlist-${OMARCHY_MIRROR:-stable}" /etc/pacman.d/mirrorlist + ;; +esac # omarchy-settings skips this override until cups-browsed is actually present # to avoid pacman creating cups-browsed.conf.pacnew during ISO package install.