Building image from preset: linux55.preset error although linux55 kernel is no longer installed

Today I successfully updated and rebooted my stable Manjaro system but encountered this error messages that are irritating:

=> Image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux55.preset: 'default'
  -> -k /boot/vmlinuz-5.5-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.5-x86_64.img
==> ERROR: '/lib/modules/5.5.19-1-MANJARO' is not a valid kernel module directory
==> Building image from preset: /etc/mkinitcpio.d/linux55.preset: 'fallback'
  -> -k /boot/vmlinuz-5.5-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.5-x86_64-fallback.img -S autodetect
==> ERROR: '/lib/modules/5.5.19-1-MANJARO' is not a valid kernel module directory
Fehler: Befehl konnte nicht korrekt ausgeführt werden

Calling mhwd-kernel -li returns this …

Currently running: 5.10.23-1-MANJARO (linux510)
The following kernels are installed in your system:
   * linux419
   * linux510
   * linux54

I assume the linux55.preset is still stored but orphaned in my filesystem.
Thanks for your advice on how to clean this up correctly.

boot on USB iso manjaro
do chroot ( sudo manjaro-chroot -a )
check list kernels installed & files /etc/mkinitcpio.d/*.preset

i think you should remove 5.5preset
and then redo mkinitcpio for others

sudo manjaro-chroot -a 
ls /etc/mkinitcpio.d/*.preset
mhwd-kernel -li
rm /etc/mkinitcpio.d/linux55.preset
mkinitcpio -P 
update-grub
exit

then reboot

1 Like

Those commands can be done on a booted system with sudo, no need for the chroot.

2 Likes

@Yochanan I ran your commands with sudo and rebooted successfully. No need for using my USB ISO.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.