Whenever there’s a system update that involves updating the kernel, I get error messages relating to previous kernel versions, and these versions also appear in GRUB but do not boot.
As far as I can tell, it’s not causing any obvious issues, not any that I can see anyway. But it’s a little annoying getting these errors after an update, and having a cleaner GRUB would be nice too.
I don’t know what other information I can provide to help resolve this, but I’m attaching a screenshot of the error for now.
I have followed those steps (except installing 5.4, I will do that later). The 5.9 kernel has been removed and is no longer being listed by mhwd-kernel -li.
But the kernel versions are still being listed in GRUB, and after having done a kernel update now, I am still getting those error messages…
Updating linux initcpios...
==> Building image from preset: /etc/mkinitcpio.d/linux510.preset: 'default'
-> -k /boot/vmlinuz-5.10-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.10-x86_64.img
==> Starting build: 5.10.32-1-MANJARO
-> Running build hook: [base]
-> Running build hook: [udev]
-> Running build hook: [autodetect]
-> Running build hook: [modconf]
-> Running build hook: [block]
-> Running build hook: [keyboard]
-> Running build hook: [keymap]
-> Running build hook: [resume]
-> Running build hook: [filesystems]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-5.10-x86_64.img
==> Image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux510.preset: 'fallback'
-> -k /boot/vmlinuz-5.10-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.10-x86_64-fallback.img -S autodetect
==> Starting build: 5.10.32-1-MANJARO
-> Running build hook: [base]
-> Running build hook: [udev]
-> Running build hook: [modconf]
-> Running build hook: [block]
-> Running build hook: [keyboard]
-> Running build hook: [keymap]
-> Running build hook: [resume]
-> Running build hook: [filesystems]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-5.10-x86_64-fallback.img
==> Image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux59.preset: 'default'
-> -k /boot/vmlinuz-5.9-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.9-x86_64.img
==> ERROR: '/lib/modules/5.9.16-1-MANJARO' is not a valid kernel module directory
==> Building image from preset: /etc/mkinitcpio.d/linux59.preset: 'fallback'
-> -k /boot/vmlinuz-5.9-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.9-x86_64-fallback.img -S autodetect
==> ERROR: '/lib/modules/5.9.16-1-MANJARO' is not a valid kernel module directory
Error: command failed to execute correctly
Updating Kernel initcpios for Nvidia-DRM...
Updating Grub-Bootmenu
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.10-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.10-x86_64.img
Found initrd fallback image: /boot/initramfs-5.10-x86_64-fallback.img
Found linux image: /boot/vmlinuz-5.9-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.9-x86_64.img
Found initrd fallback image: /boot/initramfs-5.9-x86_64-fallback.img
Found linux image: /boot/vmlinuz-5.8-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.8-x86_64.img
Found initrd fallback image: /boot/initramfs-5.8-x86_64-fallback.img
Found linux image: /boot/vmlinuz-5.7-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.7-x86_64.img
Found initrd fallback image: /boot/initramfs-5.7-x86_64-fallback.img
I shall do that, however even after removing linux57.preset and linux58.preset as suggested by @stephane you can see the output also refer to those versions as well polluting GRUB
You can see the references to kernels 5.7, 5.8, and 5.9 although they are no longer installed on my system. Are these what are causing these versions to be listed in GRUB? I’m guessing they need to be removed right?
I would manually remove all the old things not supposed to be here, but there may be a proper way to do that. So do it at your own risk but that seems OK to me. You have a live Manjaro USB anyway just in case?