You are not logged in.
I've had this problem for several kernel upgrades. After the linux package is upgraded, I see the following errors in the post-transaction hooks log:
(10/25) Updating linux initcpios...
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
-> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
==> ERROR: specified kernel image does not exist: `/boot/vmlinuz-linux'
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'fallback'
-> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
==> ERROR: specified kernel image does not exist: `/boot/vmlinuz-linux'
error: command failed to execute correctly
Looking at my boot partition before the upgrade, vmlinuz-linux exists:
/boot
├── amd-ucode.img
├── df83adf638d645d9a17d4de5848b509b
├── EFI
│ ├── BOOT
│ │ └── BOOTX64.EFI
│ ├── Linux
│ └── systemd
│ └── systemd-bootx64.efi
├── initramfs-linux-fallback.img
├── initramfs-linux.img
├── intel-ucode.img
├── loader
│ ├── entries
│ │ └── arch-encrypted.conf
│ ├── loader.conf
│ └── random-seed
└── vmlinuz-linux7 directories, 10 files
but of course, after the upgrade, it (and the initramfs images) no longer exist:
/boot
├── amd-ucode.img
├── df83adf638d645d9a17d4de5848b509b
├── EFI
│ ├── BOOT
│ │ └── BOOTX64.EFI
│ ├── Linux
│ └── systemd
│ └── systemd-bootx64.efi
├── intel-ucode.img
└── loader
├── entries
│ └── arch-encrypted.conf
├── loader.conf
└── random-seed7 directories, 7 files
I don't know why the vmlinuz-linux file disappears during the upgrade, but re-installing the package doesn't fix the issue. The only thing that reliably works is booting into an Arch installation disk, mounting my root and boot partitions, and then using pacstrap to install the base, linux, and linux-firmware packages.
Last edited by jmacdonald (2020-07-27 03:26:46)
Offline
So you use your own pacman hook instead of the one provided by mkinitcpio or mkinitcpio is not up to date? The kernel package has changed and now delivers the kernel in /usr/lib/modules/$KERNEL/vmlinuz. Recent mkinitcpio packages have a pacman hook that copies the kernel to /boot as well.
If you have ignored updates to mkinitcpio then this applies
You should also check NoExtract rules in your pacman.conf.
Last edited by progandy (2020-07-21 13:28:26)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
I haven't (knowingly) configured a pacman hook, so if you're seeing something unusual, that's not intentional. I'm on the latest version of mkinitcpio (28 as reported via mkinitcpio -V), and the NoExtract line is commented out in my pacman configuration (it also doesn't contain any entries).
Offline
Sorry, I wanted to write "Do you", not "So you", I haven seen anything unusual except that vmlinuz is missing.
Welcome to the Arch Linux Forums, by the way.
Last edited by progandy (2020-07-21 13:43:38)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
What's the output of
$ pacman -Qkk linux
$ ls -l /etc/mkinitcpio.d/
?
Inofficial first vice president of the Rust Evangelism Strike Force
Offline
~> pacman -Qkk linux
warning: linux: /usr/lib/modules/5.7.9-arch1-1/modules.alias (Modification time mismatch)
warning: linux: /usr/lib/modules/5.7.9-arch1-1/modules.alias (Size mismatch)
warning: linux: /usr/lib/modules/5.7.9-arch1-1/modules.alias.bin (Modification time mismatch)
warning: linux: /usr/lib/modules/5.7.9-arch1-1/modules.alias.bin (Size mismatch)
warning: linux: /usr/lib/modules/5.7.9-arch1-1/modules.builtin.alias.bin (Modification time mismatch)
warning: linux: /usr/lib/modules/5.7.9-arch1-1/modules.builtin.bin (Modification time mismatch)
warning: linux: /usr/lib/modules/5.7.9-arch1-1/modules.dep (Modification time mismatch)
warning: linux: /usr/lib/modules/5.7.9-arch1-1/modules.dep.bin (Modification time mismatch)
warning: linux: /usr/lib/modules/5.7.9-arch1-1/modules.devname (Modification time mismatch)
warning: linux: /usr/lib/modules/5.7.9-arch1-1/modules.softdep (Modification time mismatch)
warning: linux: /usr/lib/modules/5.7.9-arch1-1/modules.symbols (Modification time mismatch)
warning: linux: /usr/lib/modules/5.7.9-arch1-1/modules.symbols.bin (Modification time mismatch)
linux: 6917 total files, 10 altered files~> ls -l /etc/mkinitcpio.d
total 4
-rw-r--r-- 1 jmacdonald jmacdonald 226 Apr 30 17:24 linux.preset
I'm going to assume you're curious about what's in that linux.preset, so here it is:
~> cat /etc/mkinitcpio.d/linux.preset
ALL_config="/etc/mkinitcpio.conf"
ALL_kver="/boot/vmlinuz-linux"PRESETS=('default' 'fallback')
default_image="/boot/initramfs-linux.img"
fallback_image="/boot/initramfs-linux-fallback.img"
fallback_options="-S autodetect"
Offline
Paste the entire pacman log from reinstalling the kernel package.
Online
It may not be useful as I've already run pacstrap and fixed the install process for the current kernel version, but here's the output regardless, in case it helps:
~> sudo pacman -Sv 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
warning: linux-5.7.9.arch1-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...
Packages (1) linux-5.7.9.arch1-1
Total Installed Size: 75.81 MiB
Net Upgrade Size: 0.00 MiB
:: Proceed with installation? [Y/n] y
(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%
(1/1) checking available disk space [############################################################] 100%
:: Processing package changes...
(1/1) reinstalling linux [############################################################] 100%
:: Running post-transaction hooks...
(1/3) Arming ConditionNeedsUpdate...
(2/3) Updating module dependencies...
(3/3) Updating linux initcpios...
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
-> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
==> Starting build: 5.7.9-arch1-1
-> Running build hook: [base]
-> Running build hook: [udev]
-> Running build hook: [autodetect]
-> Running build hook: [modconf]
-> Running build hook: [block]
-> Running build hook: [filesystems]
-> Running build hook: [keyboard]
-> Running build hook: [fsck]
-> Running build hook: [encrypt]
-> Running build hook: [btrfs]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-linux.img
==> Image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'fallback'
-> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
==> Starting build: 5.7.9-arch1-1
-> Running build hook: [base]
-> Running build hook: [udev]
-> Running build hook: [modconf]
-> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: aic94xx
==> WARNING: Possibly missing firmware for module: wd719x
-> Running build hook: [filesystems]
-> Running build hook: [keyboard]
-> Running build hook: [fsck]
-> Running build hook: [encrypt]
-> Running build hook: [btrfs]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-linux-fallback.img
==> Image generation successful
Offline
All that shows is that everything is fine.
Online
Worst case scenario, I'll re-post the output when there's a kernel bump! Hadn't thought about using the verbose flag when retrying the failed installation.
Offline
~> ls -l /etc/mkinitcpio.d
total 4
-rw-r--r-- 1 jmacdonald jmacdonald 226 Apr 30 17:24 linux.preset
Just wondering why the owner/group here is "jmacdonald" instead of "root" for both owner/group - have you been changing permissions of things under /etc?
Offline
Good question. I thought I'd changed that at one point to support booting to a btrfs subvolume on an encrypted disk, but those seem to be unrelated (you just need to tweak mkinitcpio.conf, not its presets). I think mkinitcpio at one point was complaining about a missing preset and I copied this particular configuration file over from another Arch install.
Offline
Okay, the linux package was bumped and I ran the upgrade, which failed; here's the output:
$ sudo pacman -Syuv
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 : None
:: Synchronizing package databases...
core 132.9 KiB 2.45 MiB/s 00:00 [############################################################] 100%
extra 1664.9 KiB 21.4 MiB/s 00:00 [############################################################] 100%
community 5.1 MiB 1695 KiB/s 00:03 [############################################################] 100%
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...
Packages (16) harfbuzz-2.6.8-3 harfbuzz-icu-2.6.8-3 iana-etc-20200720-1 jasper-2.0.17-1 linux-5.7.10.arch1-1 linux-firmware-20200619.e96c121-1 logrotate-3.17.0-1
ndctl-69-1 nodejs-14.6.0-1 npm-6.14.7-1 python-lazy-object-proxy-1.5.1-1 python-pygments-2.6.1-3 python-urllib3-1.25.10-1 python-yaml-5.3.1-2
scrot-1.4-1 sudo-1.9.2-1
Total Download Size: 204.86 MiB
Total Installed Size: 706.35 MiB
Net Upgrade Size: 16.15 MiB
:: Proceed with installation? [Y/n] y
:: Retrieving packages...
iana-etc-20200720-1-any 390.3 KiB 1832 KiB/s 00:00 [############################################################] 100%
linux-5.7.10.arch1-1-x86_64 70.8 MiB 5.05 MiB/s 00:14 [############################################################] 100%
linux-firmware-20200619.e96c121-1-any 118.2 MiB 10.1 MiB/s 00:12 [############################################################] 100%
logrotate-3.17.0-1-x86_64 47.2 KiB 15.4 MiB/s 00:00 [############################################################] 100%
sudo-1.9.2-1-x86_64 1082.3 KiB 14.5 MiB/s 00:00 [############################################################] 100%
harfbuzz-2.6.8-3-x86_64 801.0 KiB 14.8 MiB/s 00:00 [############################################################] 100%
harfbuzz-icu-2.6.8-3-x86_64 7.5 KiB 0.00 B/s 00:00 [############################################################] 100%
jasper-2.0.17-1-x86_64 267.8 KiB 16.3 MiB/s 00:00 [############################################################] 100%
ndctl-69-1-x86_64 236.2 KiB 11.5 MiB/s 00:00 [############################################################] 100%
python-lazy-object-proxy-1.5.1-1-x86_64 25.0 KiB 0.00 B/s 00:00 [############################################################] 100%
python-urllib3-1.25.10-1-any 170.0 KiB 0.00 B/s 00:00 [############################################################] 100%
nodejs-14.6.0-1-x86_64 7.6 MiB 12.2 MiB/s 00:01 [############################################################] 100%
npm-6.14.7-1-any 3.3 MiB 13.0 MiB/s 00:00 [############################################################] 100%
python-pygments-2.6.1-3-any 1816.0 KiB 14.1 MiB/s 00:00 [############################################################] 100%
python-yaml-5.3.1-2-x86_64 167.9 KiB 41.0 MiB/s 00:00 [############################################################] 100%
scrot-1.4-1-x86_64 24.7 KiB 0.00 B/s 00:00 [############################################################] 100%
(16/16) checking keys in keyring [############################################################] 100%
(16/16) checking package integrity [############################################################] 100%
(16/16) loading package files [############################################################] 100%
(16/16) checking for file conflicts [############################################################] 100%
(16/16) checking available disk space [############################################################] 100%
:: Running pre-transaction hooks...
(1/1) Removing linux initcpios...
:: Processing package changes...
( 1/16) upgrading iana-etc [############################################################] 100%
( 2/16) upgrading harfbuzz [############################################################] 100%
( 3/16) upgrading harfbuzz-icu [############################################################] 100%
( 4/16) upgrading jasper [############################################################] 100%
( 5/16) upgrading linux [############################################################] 100%
( 6/16) upgrading linux-firmware [############################################################] 100%
( 7/16) upgrading logrotate [############################################################] 100%
( 8/16) upgrading ndctl [############################################################] 100%
( 9/16) upgrading nodejs [############################################################] 100%
(10/16) upgrading npm [############################################################] 100%
(11/16) upgrading python-lazy-object-proxy [############################################################] 100%
(12/16) upgrading python-pygments [############################################################] 100%
(13/16) upgrading python-urllib3 [############################################################] 100%
(14/16) upgrading python-yaml [############################################################] 100%
(15/16) upgrading scrot [############################################################] 100%
(16/16) upgrading sudo [############################################################] 100%
warning: /etc/sudoers installed as /etc/sudoers.pacnew
:: Running post-transaction hooks...
(1/5) Reloading system manager configuration...
(2/5) Creating temporary files...
(3/5) Arming ConditionNeedsUpdate...
(4/5) Updating module dependencies...
(5/5) Updating linux initcpios...
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
-> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
==> ERROR: specified kernel image does not exist: `/boot/vmlinuz-linux'
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'fallback'
-> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
==> ERROR: specified kernel image does not exist: `/boot/vmlinuz-linux'
error: command failed to execute correctly
I'll leave my machine in this state so I can run additional commands to inspect the failure. Please let me know if you've got any ideas where this is going wrong. One thing that stands out is this, which wasn't present when I successfully re-installed the linux package a few posts above:
:: Running pre-transaction hooks...
(1/1) Removing linux initcpios...
Offline
Removing the initcpio before the upgrade is normal.
Some things you can check, though:
cat /usr/lib/modules/5.7.10-arch1-1/pkgbase
# should be "linux"
stat /usr/lib/modules/5.7.10-arch1-1/vmlinuz
# should exist
pacman -Qkk mkinitcpio
# only backup files should show
ls -l /etc/pacman.d/hooks/
# no 90-mkinitcpio-install.hook should exist here
cat /usr/share/libalpm/hooks/90-mkinitcpio-install.hook
# should exec /usr/share/libalpm/scripts/mkinitcpio-install
cat /usr/share/libalpm/scripts/mkinitcpio-install
# should have: install -Dm644 "${line}" "/boot/vmlinuz-${pkgbase}"
install -Dm644 "/usr/lib/modules/5.7.10-arch1-1/vmlinuz" "/boot/vmlinuz-linux"
# try the installation manually (as root/sudo)
mkinitcpio -p linux
# rerun initcpio creation.
Last edited by progandy (2020-07-24 12:50:31)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
Everything in your list passed as expected, except for the install step; that command does nothing.
Running the following instead does the trick:
# cp /usr/lib/modules/5.7.10-arch1-1/vmlinuz /boot/vmlinuz-linux
# chmod 644 /boot/vmlinuz-linux
And at that point, I realized that I've got an "install" shell script in my path that is taking precedence over /usr/bin/install.
I've removed that script and everything is working as normal. Thank you for writing out those steps... I would have never thought to look there, and pointing me to that line in mkinitcpio-install was incredibly helpful!
Offline