OPINIONATED OMARCHY
TROUBLESHOOTING CORPUS
790
RECORDS
790
AUDITED
0
UNCHECKED
2388
SOURCES
LIVE
boot-kernel critical very-common DISPUTE

Never run `pacman -Sy <pkg>`: partial upgrades break the kernel/module pairing

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

The central lesson is correct and important: pacman -Sy pkg is the canonical partial-upgrade footgun, pacman -Syu is the only supported update, and the WRONG-marked example is exactly the right way to teach it. omarchy-update is a real command (verified in basecamp/omarchy bin/). The dkms line is the weak point: dkms autoinstall -k $(pacman -Q linux | awk '{print $2}' | sed 's/\.arch/-arch/') only produces a valid module directory name for the mainline linux package's arch1 versioning. For linux-lts (6.18.47-1 -> 6.18.47-1-lts), linux-zen or a -rc kernel it emits a directory that does not exist and dkms fails. It also silently targets the wrong kernel if more than one is installed.

The cause above was not rewritten and may still contain the error described. The fix below is the corrected version.
RISK

PARTIAL UPGRADE. Completing a partial upgrade from a chroot pulls in a large transaction. Make sure /boot has free space first, and never interrupt it. Do not use pacman -Rdd or --overwrite to force past conflicts unless an official Arch news item tells you to.

Symptom

After installing one package with pacman -Sy something (or after an interrupted/aborted -Syu), the next boot fails: kernel panic, emergency shell, missing modules such as:


module not found: 'crc32c_intel'
ERROR: Failed to mount 'UUID=...' on real root

or everything works until reboot, then does not.

Cause

pacman -Sy pkg refreshes the package database and installs pkg against the *new* repo state while leaving everything else at the old version. Arch is not designed for this. Concretely, if linux is upgraded but linux-firmware/DKMS modules are not (or vice versa), /usr/lib/modules/<newver> and the installed out-of-tree modules disagree, and the initramfs generated at that moment can be missing what it needs.

Fix

There is only one supported update command:


sudo pacman -Syu

To install a package, never add -y to -S:


sudo pacman -Syu package-name       # correct: full upgrade + install
sudo pacman -S package-name         # correct if you are already up to date
# sudo pacman -Sy package-name      # WRONG -- partial upgrade

If you are already in the broken state, boot a live USB, chroot in, and complete the upgrade:


sudo arch-chroot /mnt
pacman -Syu
mkinitcpio -P
grub-mkconfig -o /boot/grub/grub.cfg   # or limine-mkinitcpio
exit

If DKMS modules (nvidia, virtualbox, zfs) are involved, rebuild against every installed kernel, and let dkms discover them rather than reconstructing version strings by hand:


ls /usr/lib/modules            # the real module directories
sudo dkms autoinstall          # builds for all installed kernels
sudo dkms status               # every entry must say 'installed'

To target one kernel, copy the directory name straight from ls /usr/lib/modules:


sudo dkms autoinstall -k 6.18.4-arch1-1

On Omarchy always update through the distro wrapper so its migrations run too:


omarchy-update

Verify

pacman -Qu prints nothing (system fully up to date), sudo mkinitcpio -P completes without errors, and the machine reboots into the new kernel.

Sources

partial-upgrade-pacman-sy-breaks-boot