OPINIONATED OMARCHY
TROUBLESHOOTING CORPUS
790
RECORDS
790
AUDITED
0
UNCHECKED
2388
SOURCES
LIVE
pacman-aur critical common DISPUTE

"error: command failed to execute correctly" from a pacman hook after the transaction already committed

archomarchyendeavouroscachyosmanjarodesktoplaptop
CORRECTED An auditor found the fix wrong or incomplete and rewrote it.
AUDIT NOTE

Checked on this Omarchy 4 workstation (omarchy 4.0.2-1, limine-mkinitcpio-hook 1.37.1-1, mkinitcpio 41.1-1, dkms 3.4.3-2, pacman 7.1.0) by listing every hook in /usr/share/libalpm/hooks and /etc/pacman.d/hooks with its owner and reading the Omarchy ones: 00-omarchy-update-guard (PreTransaction, AbortOnFail, /usr/bin/omarchy-update-pacman-guard), the 10/90 omarchy-hyprland-reload pause/resume pair (every failure path in /usr/bin/omarchy-hyprland-reload-guard is swallowed), 10-limine-snapper-lock, kernel-modules-hook's 10-linux-modules-pre/post, limine-mkinitcpio-hook's 60/80/90 hooks plus its /etc/pacman.d/hooks/90-mkinitcpio-install.hook override, the unowned /etc/pacman.d/hooks/99-omarchy-limine.hook, and the dkms trio. alpm-hooks(5) (local man page, pacman 7.1.0) confirms AbortOnFail is PreTransaction only and that a same-named file in a higher-priority hook directory overrides. libalpm sources confirm the strings: util.c prints command failed to execute correctly on any non-zero hook exit, trans.c returns ALPM_ERR_TRANS_HOOK_FAILED when a PreTransaction AbortOnFail hook fails, and src/pacman/sync.c at v7.1.0 prints failed to commit transaction (%s) and Errors occurred, no packages were upgraded. What was wrong: the record does not know that on Omarchy the commonest source of this exact error is the update guard, which fires BEFORE the transaction and installs nothing, so its title and cause (after the transaction already committed, nothing is rolled back) are the opposite of the usual Omarchy case. Its claim that every kernel, DKMS and bootloader hook is PostTransaction is false (60-mkinitcpio-remove, 70-dkms-upgrade, 60-limine-mkinitcpio-remove-pre and 10-linux-modules-pre are PreTransaction), though the conclusion survives because none sets AbortOnFail. Its sample output cannot occur on Omarchy 4: /etc/mkinitcpio.d/ is empty here (no preset line), and /usr/share/libalpm/scripts/limine-mkinitcpio-install swallows mkinitcpio failures (process_kernel ... || true, process_uki_kernel || return 0) and exits non-zero only when check_boot_partition in /usr/lib/limine/limine-common-functions fails or a /etc/boot/hooks hook exits 100 or above, so on Omarchy the error at Updating linux initcpios... means an ESP problem, not a bad build. The DKMS hook script ends in return 0 after printing its ERROR lines, so DKMS failures never produce this pacman error on either distribution, which the record's table implied. Fix corrections: ls /boot/EFI/Linux/ needs sudo (dmask=0077, confirmed by a permission error as the user and a sudo listing showing a 144 MB omarchy_linux.efi dated 2026-09-06), sudo limine-mkinitcpio followed by sudo limine-update runs limine-mkinitcpio twice because limine-update already calls it (read /usr/bin/limine-update), sudo mkinitcpio -P on Omarchy 4 dies on No presets found (/usr/bin/mkinitcpio line 986) before the /usr/local/bin wrapper offers limine-mkinitcpio, the cosmetic list named 30-systemd-update.hook where systemd 261.2-1 ships 35-systemd-update.hook, and pacman -S linux when a newer kernel is available is a lone kernel upgrade that strands linux-headers (installed from omarchy-other.packages) and nvidia-open-dkms. The if it fires anyway bypass was dropped because the guard script cannot fire on -S linux. Danger corrected for Omarchy: the UKI is built in /tmp and installed by limine-entry-tool afterwards, no fallback UKI exists (MKINITCPIO_FALLBACK unset in /etc/limine-entry-tool.conf, /etc/limine-entry-tool.d/*.conf and /etc/default/limine, and /boot/EFI/Linux holds only omarchy_linux.efi), and /boot/limine.conf carries a Snapshots submenu with per-snapshot UKI copies under limine_history. Sources: bbs 291242 supports only that the error follows a non-zero mkinitcpio hook on plain Arch. GitHub discussion 3700 (now under omacom/omarchy) rendered only its title through curl, so its body was not checked. Not exercised: no hook was made to fail, no transaction was run, and the guard output shape was assembled from the hook script's banner and the pacman source strings rather than observed.

The cause above was rewritten on 2026-09-07 to match this note; the fix was corrected by the audit itself.
RISK

On plain Arch a failed mkinitcpio hook can leave a zero-length or truncated initramfs while the package database happily reports the new kernel as installed. Rebooting then drops you at ERROR: device 'UUID=...' not found. Skipping fs check and an initramfs emergency shell, and recovery requires a live USB. On Omarchy 4 a failed UKI build leaves the previous /boot/EFI/Linux/omarchy_linux.efi in place and kernel-modules-hook restores the running kernel's modules after the transaction, so the previous kernel still boots, but there is no fallback UKI (MKINITCPIO_FALLBACK is unset) and the previous kernel's modules are gone once the new one has booted. The Limine boot menu's Snapshots submenu boots the last five omarchy update snapshots with the kernel each one had, which is the recovery path if the new UKI turns out bad. Never reboot on an unresolved mkinitcpio, limine or DKMS failure. Have an Arch ISO on a USB stick before you start poking at this.

Symptom

A pacman transaction prints a red error: command failed to execute correctly right after a hook's (n/m) <Description> line. What it means depends on which hook, and Omarchy 4 has two shapes plain Arch never shows.

Omarchy 4, before anything is installed, after a direct sudo pacman -Syu:


:: Running pre-transaction hooks...
(1/2) Checking Omarchy update entrypoint...

Woah partner...

This looks like a direct pacman system upgrade. Omarchy updates should normally
run through:

  omarchy update
error: command failed to execute correctly
error: failed to commit transaction (failed to run transaction hooks)
Errors occurred, no packages were upgraded.

Omarchy 4, after the packages are on disk, when /boot is not mounted:


(7/9) Updating linux initcpios...
ERROR: Boot path '/boot' is not a mounted FAT32 boot partition.
error: command failed to execute correctly
(8/9) Arming ConditionNeedsUpdate...

Plain Arch, after the packages are on disk, when mkinitcpio itself fails:


(7/9) Updating linux initcpios...
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
==> ERROR: '/usr/lib/modules/7.2.3-arch1-3' is not a valid kernel module directory
error: command failed to execute correctly
(8/9) Arming ConditionNeedsUpdate...

Users ask: "pacman said the packages installed but printed error: command failed to execute correctly. Did the update work? Is it safe to reboot?"

Cause

error: command failed to execute correctly is libalpm's message for any hook Exec that exited non-zero (lib/libalpm/util.c). What it means depends on when the hook ran. Per alpm-hooks(5), AbortOnFail applies only to PreTransaction hooks, and on an Omarchy 4 install exactly one hook sets it: Omarchy's own 00-omarchy-update-guard.hook. So there are two cases.

**1. The Omarchy update guard.** /usr/share/libalpm/hooks/00-omarchy-update-guard.hook runs /usr/bin/omarchy-update-pacman-guard before every transaction that upgrades a package, with AbortOnFail. The script exits 1 when the pacman command line carries both -S and -u (-Syu, -Su, --sync --sysupgrade) and neither OMARCHY_UPDATE_PACMAN=1 nor OMARCHY_ALLOW_DIRECT_PACMAN=1 is set. pacman then prints error: failed to commit transaction (failed to run transaction hooks) and Errors occurred, no packages were upgraded. Nothing was installed. This is the most common way to see the message on Omarchy and it is harmless: the Woah partner... banner above it is the tell.

**2. Every other hook.** None of the kernel, initramfs, DKMS or bootloader hooks sets AbortOnFail. The ones that build things are PostTransaction (90-mkinitcpio-install, 70-dkms-install, 80-limine-efi-deploy, 99-omarchy-limine), and the PreTransaction ones (60-mkinitcpio-remove, 70-dkms-upgrade, 60-limine-mkinitcpio-remove-pre, 10-linux-modules-pre) cannot abort either. So when one of these fails the packages are already unpacked and the database already says the new kernel is installed, and nothing is rolled back.

Which hook produced the error matters more than the error itself:

  • On plain Arch, mkinitcpio's 90-mkinitcpio-install.hook passes mkinitcpio's exit status through, so a broken initramfs build is the classic source and /boot can hold a stale or truncated image.
  • On Omarchy 4 that hook is overridden by limine-mkinitcpio-hook's /etc/pacman.d/hooks/90-mkinitcpio-install.hook (same file name in a higher-priority hook directory, which alpm-hooks(5) defines as an override). It runs /usr/share/libalpm/scripts/limine-mkinitcpio-install, which exits non-zero only when its ESP check fails (/boot missing, not a mountpoint, or not vfat) or a /etc/boot/hooks/*.d hook exits 100 or above. A failed mkinitcpio build inside it prints ERROR: mkinitcpio failed for kernel <ver>, skipping. and exits 0, so pacman prints no error for it at all. The UKI is built in /tmp and installed afterwards, so a failed build leaves the previous /boot/EFI/Linux/omarchy_linux.efi in place rather than a truncated one.
  • The DKMS hook script /usr/share/libalpm/scripts/dkms prints ==> ERROR: Missing <ver> kernel headers for module ... when a module cannot be built and still returns 0, so a missing NVIDIA module never produces this pacman error either.
  • Cosmetic hooks (font, icon, MIME and desktop caches, man-db, dbus, systemd catalog) fail the same way and mean nothing for boot.

Fix

**1. Identify which hook failed.** The (n/m) <Description> line immediately above the error names it. Find the file by its description and read its Exec = line:


sudo tail -n 200 /var/log/pacman.log
grep -l 'Description = Updating linux initcpios' /usr/share/libalpm/hooks/*.hook /etc/pacman.d/hooks/*.hook
pacman -Qo /etc/pacman.d/hooks/90-mkinitcpio-install.hook     # which package owns it
cat /etc/pacman.d/hooks/90-mkinitcpio-install.hook             # the Exec line is what to rerun

A file in /etc/pacman.d/hooks/ overrides a file of the same name in /usr/share/libalpm/hooks/. On Omarchy 4 both 90-mkinitcpio-install.hook files exist and the /etc one (from limine-mkinitcpio-hook) is the one that ran.

**2. Classify it.**

Omarchy update guard, nothing installed, reboot is irrelevant: the output carries Woah partner... and Errors occurred, no packages were upgraded. Run the supported path instead:


omarchy update
sudo env OMARCHY_ALLOW_DIRECT_PACMAN=1 pacman -Syu     # one transaction, if you really mean to bypass it

Cosmetic, reboot is safe, fix at leisure: fontconfig.hook, gtk-update-icon-cache.hook, update-desktop-database.hook, texinfo-install.hook, man-db-remove-cache.hook, dbus-reload.hook, glib-compile-schemas.hook, 35-systemd-update.hook.

Boot-critical, do not reboot until it succeeds:

| Description | Hook file | Package | Runs | |---|---|---|---| | Updating linux initcpios... | 90-mkinitcpio-install.hook in /usr/share/libalpm/hooks/ | mkinitcpio | mkinitcpio -P (plain Arch) | | Updating linux initcpios... | 90-mkinitcpio-install.hook in /etc/pacman.d/hooks/ | limine-mkinitcpio-hook | limine-mkinitcpio-install (Omarchy 4, builds the UKI and the Limine entry) | | Deploying Limine after upgrade... | 80-limine-efi-deploy.hook | limine-mkinitcpio-hook | limine-install | | Deploying Omarchy Limine after upgrade... | 99-omarchy-limine.hook in /etc/pacman.d/hooks/ | none (written at install time) | cp /usr/share/limine/BOOTX64.EFI /boot/EFI/limine/limine_x64.efi | | Install DKMS modules | 70-dkms-install.hook | dkms | dkms install per module and kernel, always exits 0 |

**3. Re-run the critical hook by hand, so the real error is on your screen.**

Omarchy 4. Every limine-* failure above starts with the ESP check, so mount /boot first if it was not mounted, then rebuild everything with one command. limine-update runs limine-install --no-efi-register and then limine-mkinitcpio, so there is no need to run both:


findmnt /boot || sudo mount /boot
sudo limine-update

Do not reach for sudo mkinitcpio -P on Omarchy 4: /etc/mkinitcpio.d/ is empty, so /usr/bin/mkinitcpio -P dies with No presets found in /etc/mkinitcpio.d, and the /usr/local/bin/mkinitcpio wrapper only offers to run limine-mkinitcpio afterwards.

Plain Arch, EndeavourOS, CachyOS, Manjaro:


sudo mkinitcpio -P

DKMS, any distribution. nvidia-open-dkms needs linux-headers at the same version as linux:


dkms status
pacman -Q linux linux-headers
sudo dkms autoinstall

**4. Prove the files were really written.** /boot is mounted dmask=0077 on Omarchy 4, so listing it needs root:


sudo ls -l --time-style=full-iso /boot/EFI/Linux/                   # Omarchy 4: omarchy_linux.efi, over 100 MB, dated now
ls -l --time-style=full-iso /boot/vmlinuz-* /boot/initramfs-*.img    # plain Arch
pacman -Q linux; uname -r

**5. Sledgehammer that re-fires every kernel hook.** Reinstalling the kernel package re-triggers the whole chain (10-linux-modules-*, 70-dkms-install, 90-mkinitcpio-install). The Omarchy update guard passes -S linux, because it only aborts on -S together with -u. Only do this when pacman says it is a reinstall:


sudo pacman -S linux          # or linux-lts / linux-zen

warning: linux-7.1.9.arch1-2 is up to date -- reinstalling

If it offers a newer version instead, stop and run omarchy update. A lone kernel upgrade leaves linux-headers behind, nvidia-open-dkms then reports Missing ... kernel headers and builds nothing, and the hook's exit code does not tell you.

Verify

sudo limine-update on Omarchy 4 (or sudo mkinitcpio -P on plain Arch) exits 0 with no ERROR lines. sudo ls -l /boot/EFI/Linux/omarchy_linux.efi (or ls -l /boot/initramfs-linux.img) shows a file over 100 MB (or several MB) with a timestamp from the last minute. pacman -Q linux and uname -r agree after the reboot. A second sudo pacman -S linux runs clean end to end.

Sources

hook-failed-command-failed-to-execute-correctly