You are not logged in.
The only kernel I have installed is linux-lts, but every so often I upgrade mkinitcpio or a pacman hook triggers mkinitcpio and it tries to use linux.preset and fails because that kernel is not installed.
(5/6) Updating linux initcpios...
==> Building image from preset: /etc/mkinitcpio.d/linux-lts.preset: 'default'
==> Using default configuration file: '/etc/mkinitcpio.conf'
-> -k /boot/vmlinuz-linux-lts -g /boot/initramfs-linux-lts.img
==> Starting build: '6.12.63-1-lts'
-> Running build hook: [base]
-> Running build hook: [udev]
-> Running build hook: [autodetect]
-> Running build hook: [microcode]
-> Running build hook: [modconf]
-> Running build hook: [kms]
-> Running build hook: [keyboard]
-> Running build hook: [keymap]
-> Running build hook: [consolefont]
==> WARNING: consolefont: no font found in configuration
-> Running build hook: [block]
-> Running build hook: [encrypt]
-> Running build hook: [zfs]
-> Running build hook: [filesystems]
-> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: '/boot/initramfs-linux-lts.img'
-> Early uncompressed CPIO image generation successful
==> Initcpio image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux-lts.preset: 'fallback'
==> Using default configuration file: '/etc/mkinitcpio.conf'
-> -k /boot/vmlinuz-linux-lts -g /boot/initramfs-linux-lts-fallback.img -S autodetect
==> Starting build: '6.12.63-1-lts'
-> Running build hook: [base]
-> Running build hook: [udev]
-> Running build hook: [microcode]
-> Running build hook: [modconf]
-> Running build hook: [kms]
==> WARNING: Possibly missing firmware for module: 'ast'
-> Running build hook: [keyboard]
==> WARNING: Possibly missing firmware for module: 'xhci_pci_renesas'
-> Running build hook: [keymap]
-> Running build hook: [consolefont]
==> WARNING: consolefont: no font found in configuration
-> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: 'bfa'
==> WARNING: Possibly missing firmware for module: 'qed'
==> WARNING: Possibly missing firmware for module: 'aic94xx'
==> WARNING: Possibly missing firmware for module: 'qla2xxx'
==> WARNING: Possibly missing firmware for module: 'qla1280'
==> WARNING: Possibly missing firmware for module: 'wd719x'
-> Running build hook: [encrypt]
-> Running build hook: [zfs]
-> Running build hook: [filesystems]
-> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: '/boot/initramfs-linux-lts-fallback.img'
-> Early uncompressed CPIO image generation successful
==> Initcpio image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
==> Using default configuration file: '/etc/mkinitcpio.conf'
-> -k /boot/vmlinuz-linux -g /boot/initramfs-linux.img
==> ERROR: Invalid option -k -- '/boot/vmlinuz-linux' must be readable
error: command failed to execute correctlyI have removed the linux.preset several times (it doesn't look like it's owned by any package), and it keeps being regenerated. Where is that coming from and how can I fix this?
Thanks in advance!
Offline
But did you previously have the linux package, or have you always used linux-lts? In my case, the linux.preset is still there, but in .pacsave format, and I no longer use the linux package:
$ ls /etc/mkinitcpio.d
linux-hardened.preset linux.preset.pacsave linux-zen.presetAnd everything is generated correctly:
==> Building image from preset: /etc/mkinitcpio.d/linux-hardened.preset: 'default'
==> Using default configuration file: '/etc/mkinitcpio.conf'
-> -k /boot/vmlinuz-linux-hardened -g /boot/initramfs-linux-hardened.img
==> Starting build: '6.17.11-hardened1-1-hardened'
-> Running build hook: [base]
-> Running build hook: [systemd]
-> Running build hook: [autodetect]
-> Running build hook: [microcode]
-> Running build hook: [modconf]
-> Running build hook: [kms]
-> Running build hook: [keyboard]
-> Running build hook: [keymap]
-> Running build hook: [sd-vconsole]
-> Running build hook: [block]
-> Running build hook: [filesystems]
-> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: '/boot/initramfs-linux-hardened.img'
-> Early uncompressed CPIO image generation successful
==> Initcpio image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux-zen.preset: 'default'
==> Using default configuration file: '/etc/mkinitcpio.conf'
-> -k /boot/vmlinuz-linux-zen -g /boot/initramfs-linux-zen.img
==> Starting build: '6.18.2-zen2-1-zen'
-> Running build hook: [base]
-> Running build hook: [systemd]
-> Running build hook: [autodetect]
-> Running build hook: [microcode]
-> Running build hook: [modconf]
-> Running build hook: [kms]
-> Running build hook: [keyboard]
-> Running build hook: [keymap]
-> Running build hook: [sd-vconsole]
-> Running build hook: [block]
-> Running build hook: [filesystems]
-> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: '/boot/initramfs-linux-zen.img'
-> Early uncompressed CPIO image generation successful
==> Initcpio image generation successfulOffline
What all was installed/upgraded on that transaction where linux.preset appeared?
Offline
You may try to comment out all lines in file /etc/mkinitcpio.d/linux.preset by adding # in the beginning of every line (if hash is not already there).
Offline
I may have at one point had `linux` installed, but it has been a while. Now there is nothing but `linux-lts.preset` (after I have deleted `linux.preset` when it appears). I don't know if I ever had a pacsave
$ ll /etc/mkinitcpio.d
total 1.0K
-rw-r--r-- 1 root root 551 Nov 3 07:51 linux-lts.presetI don't know what else is upgraded in the transactions where this appears, as it sneaks in and I don't notice it until the mkinitcpio starts failing.
Offline
The presets are created by /usr/share/alpm/scripts/mkinitcpio .
line 24 - 34 show how it detects which presets to generate .
Check your /usr/lib/modules folder, it probably has leftovers from when you did have stock linux kernel installed.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
The presets are created by /usr/share/alpm/scripts/mkinitcpio .
line 24 - 34 show how it detects which presets to generate .
Check your /usr/lib/modules folder, it probably has leftovers from when you did have stock linux kernel installed.
Thanks, this is exactly what I need! It looks like I have a good number of old files here, maybe created by kernel-modules-hook or by dkms. Is it safe to delete all the ones that aren't owned by a current package?
Offline