When I update linux or linux-lts (and headers) with pacman -Syu, the initramfs.img is deleted, and it’s not generated automatically, making the system unable to boot, unless I manually run mkinitcpio -p linux / linux-lts to solve this problem.
The linux.preset / linux-lts.preset files exists and are correct.
/boot is mounted during update.
pacman -Syuv linux
Root : /
Conf File : /etc/pacman.conf
DB Path : /var/lib/pacman/
Cache Dirs: /var/cache/pacman/pkg/
Hook Dirs : /usr/share/libalpm/hooks/ /etc/pacman.d/hooks/
Lock File : /var/lib/pacman/db.lck
Log File : /var/log/pacman.log
GPG Dir : /etc/pacman.d/gnupg/
Targets : linux
resolving dependencies...
looking for conflicting packages...
Package (1) Old Version New Version Net Change Download Size
core/linux 5.14.14.arch1-1 5.14.15.arch1-1 -0,01 MiB 110,33 MiB
Total Download Size: 110,33 MiB
Total Installed Size: 131,25 MiB
Net Upgrade Size: -0,01 MiB
: Proceed with installation? [Y/n] y
:: Retrieving packages...
linux-5.14.15.ar... 110,3 MiB 176 KiB/s 10:42 [----------------------] 100%
(1/1) checking keys in keyring [----------------------] 100%
(1/1) checking package integrity [----------------------] 100%
(1/1) loading package files [----------------------] 100%
(1/1) checking for file conflicts [----------------------] 100%
:: Running pre-transaction hooks...
(1/2) Removing linux initcpios...
(2/2) Remove DKMS modules
==> depmod 5.14.14-arch1-1
:: Processing package changes...
(1/1) upgrading linux [----------------------] 100%
:: Running post-transaction hooks...
(1/6) Arming ConditionNeedsUpdate...
(2/6) Updating module dependencies...
(3/6) Install DKMS modules
(4/6) Updating linux initcpios...
(5/6) Check if user should be informed about rebooting after certain system package upgrades.
(6/6) Checking which packages need to be rebuilt
pacman -Qikk mkinitcpio ✔
Name : mkinitcpio
Version : 30-2
Description : Modular initramfs image creation utility
Architecture : any
URL : https://github.com/archlinux/mkinitcpio
Licenses : GPL
Groups : None
Provides : initramfs
Depends On : awk mkinitcpio-busybox>=1.19.4-2 kmod util-linux>=2.23
libarchive coreutils bash diffutils findutils grep
filesystem>=2011.10-1 zstd systemd
Optional Deps : gzip: Use gzip compression for the initramfs image [installed]
xz: Use lzma or xz compression for the initramfs image
[installed]
bzip2: Use bzip2 compression for the initramfs image
[installed]
lzop: Use lzo compression for the initramfs image [installed]
lz4: Use lz4 compression for the initramfs image [installed]
mkinitcpio-nfs-utils: Support for root filesystem on NFS
[installed]
Required By : linux linux-lts mkinitcpio-archiso mkinitcpio-openswap
Optional For : None
Conflicts With : None
Replaces : None
Installed Size : 102,77 KiB
Packager : Christian Hesse <arch@eworm.de>
Build Date : mié 14 jul 2021 09:28:46
Install Date : sáb 23 oct 2021 11:10:48
Install Reason : Explicitly installed
Install Script : Yes
Validated By : Signature
backup file: mkinitcpio: /etc/mkinitcpio.conf (Modification time mismatch)
backup file: mkinitcpio: /etc/mkinitcpio.conf (Size mismatch)
backup file: mkinitcpio: /etc/mkinitcpio.conf (MD5 checksum mismatch)
backup file: mkinitcpio: /etc/mkinitcpio.conf (SHA256 checksum mismatch)
mkinitcpio: 81 total files, 0 altered files
grep -ri initcpio /{etc/pacman.d/hooks,/usr/share/libalpm}/ ✔
/etc/pacman.d/hooks/90-mkinitcpio-install.hook:Target = usr/lib/initcpio/*
/etc/pacman.d/hooks/90-mkinitcpio-install.hook:Description = Updating linux initcpios...
/etc/pacman.d/hooks/90-mkinitcpio-install.hook:Exec = /usr/share/libalpm/scripts/mkinitcpio-install-calamares
//usr/share/libalpm/hooks/60-mkinitcpio-remove.hook:Target = mkinitcpio
//usr/share/libalpm/hooks/60-mkinitcpio-remove.hook:Target = mkinitcpio-git
//usr/share/libalpm/hooks/60-mkinitcpio-remove.hook:Description = Removing linux initcpios...
//usr/share/libalpm/hooks/60-mkinitcpio-remove.hook:Exec = /usr/share/libalpm/scripts/mkinitcpio-remove
//usr/share/libalpm/hooks/90-mkinitcpio-install.hook:Target = usr/lib/initcpio/*
//usr/share/libalpm/hooks/90-mkinitcpio-install.hook:Description = Updating linux initcpios...
//usr/share/libalpm/hooks/90-mkinitcpio-install.hook:Exec = /usr/share/libalpm/scripts/mkinitcpio-install
//usr/share/libalpm/scripts/mkinitcpio-install-calamares: # triggers when it's a change to usr/lib/initcpio/*
//usr/share/libalpm/scripts/mkinitcpio-install-calamares: preset="/etc/mkinitcpio.d/${pkgbase}.preset"
//usr/share/libalpm/scripts/mkinitcpio-install-calamares: sed "s|%PKGBASE%|${pkgbase}|g" /usr/share/mkinitcpio/hook.preset \
//usr/share/libalpm/scripts/mkinitcpio-install-calamares:if (( all )) && compgen -G /etc/mkinitcpio.d/"*.preset" > /dev/null; then
//usr/share/libalpm/scripts/mkinitcpio-remove: if ! cmp $preset > /dev/null 2>&1 <(sed "s|%PKGBASE%|${pkgbase}|g" /usr/share/mkinitcpio/hook.preset); then
//usr/share/libalpm/scripts/mkinitcpio-remove: # triggers when it's a change to usr/lib/initcpio/*
//usr/share/libalpm/scripts/mkinitcpio-remove: preset="/etc/mkinitcpio.d/${pkgbase}.preset"
//usr/share/libalpm/scripts/mkinitcpio-remove:if (( package )) && compgen -G /etc/mkinitcpio.d/"*.preset" > /dev/null; then
//usr/share/libalpm/scripts/mkinitcpio-remove: for preset in /etc/mkinitcpio.d/*.preset; do
//usr/share/libalpm/scripts/mkinitcpio-install: # triggers when it's a change to usr/lib/initcpio/*
//usr/share/libalpm/scripts/mkinitcpio-install: preset="/etc/mkinitcpio.d/${pkgbase}.preset"
//usr/share/libalpm/scripts/mkinitcpio-install: sed "s|%PKGBASE%|${pkgbase}|g" /usr/share/mkinitcpio/hook.preset \
//usr/share/libalpm/scripts/mkinitcpio-install:if (( all )) && compgen -G /etc/mkinitcpio.d/"*.preset" > /dev/null; then
//usr/share/libalpm/scripts/mkinitcpio-install: mkinitcpio "${args[@]}"