Skip to content

pacman-init.service takes too long to finish

In the live environment, if you try to run pacstrap or pacman before pacman-init.service has finished, pacman-init.service will fail with some gpg errors. See https://bbs.archlinux.org/viewtopic.php?pid=2050556#p2050556.

The result is that the pacman keyring is not fully initialized and package signature verification will fail. I.e. you cannot use pacstrap or pacman to install any signed packages.

The issue was caused by archlinux-keyring 20220727-1. Comparing the "CPU" in the output of systemctl status -l pacman-init.service on a few ISOs:

archlinux-2022.08.05-x86_64.iso	archlinux-keyring 20220727-1	1 min 27.085s
archlinux-2022.07.01-x86_64.iso	archlinux-keyring 20220424-1	42.540s
archlinux-2022.06.01-x86_64.iso	archlinux-keyring 20220424-1	41.926s

Manually upgrading only archlinux-keyring in an old ISO:

archlinux-2022.07.01-x86_64.iso	archlinux-keyring 20220727-1	1min 27.438s

It's clear that with archlinux-keyring 20220727-1, pacman-init.service takes longer to finish. Most of the time is spent in disabling revoked keys. It takes 1–2 seconds for each "Disabling key" and there's 51 keys to disable.

It's not clear if it's a pacman-key (or gpg) issue of being slow or an archlinux-keyring issue of being too bloated.

Edited by nl6720
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information