Zen kernel does not remove old images after update?

I do now see i have 2 zen kernel entries in systemd-boot showing up and also the images under /efi/XXX/
2025-05-02_16-22

It could be me i hope this is not a general issue, as i set it to boot from zen kernel and it boots on the old kernel images not the updated
default XXX-*.*.*-zen*-*-zen.conf (XXX is my UUID)

Wonder if anyone else using zen kernel and systemd-boot have the same?

I cannot confirm this. Use systemd and as you can see all kernels are listed as they should be

[root@starship XXXXXXXXX]# ls
6.12.25-2-lts  6.14.4-arch1-2  6.14.4-zen1-2-zen

I am using the zen kernel and systemd-boot and it looks OK on my system.

There are a few scenarios that can cause this:

  • Restoring a snapshot/backup and not cleaning up /efi after
  • Removing or updating a kernel when your EFI partition was not mounted
  • Hooks that copy files to /efi
  • Removing kernel-install-for-dracut

How would I check this?

1 Like

Go to your main directory with su. Under /efi/ you should see a folder with a longer sequence of numbers. Then open it. I have only made this sequence of numbers unrecognizable with XXXXX

1 Like

I had a corrupted ESP before and recreated it.. but thats some times ago already, and the 6.14.2 i had hanging there is not that old.

No clue what i could have done to generate images without having esp mounted but could happen for sure.

In general it will remove old images first and after that it will rebuild them. I try to replicate with downgrading and updating again now.

No all good.. must have been me or hickup.. could be something with dkms?

( 1/13) Restoring Linux kernel modules...
++ uname -r
+ KVER=6.14.2-zen1-1-zen
+ test -e /usr/lib/modules/backup/6.14.2-zen1-1-zen
+ rsync -AHXal --ignore-existing /usr/lib/modules/backup/6.14.2-zen1-1-zen /usr/lib/modules/
+ rm -rf /usr/lib/modules/backup
( 2/13) Reloading user manager configuration...
( 3/13) Arming ConditionNeedsUpdate...
( 4/13) Updating module dependencies...
( 5/13) Install DKMS modules
==> dkms install --no-depmod acpi_call/1.2.2 -k 6.14.4-zen1-2-zen
Deprecated feature: CLEAN (/var/lib/dkms/acpi_call/1.2.2/source/dkms.conf)
==> dkms install --no-depmod vmware-workstation/17.6.3_24583834 -k 6.14.4-zen1-2-zen
Deprecated feature: CLEAN (/var/lib/dkms/vmware-workstation/17.6.3_24583834/source/dkms.conf)
==> dkms install --no-depmod it87/269.213db3a -k 6.14.4-zen1-2-zen
Deprecated feature: CLEAN (/var/lib/dkms/it87/269.213db3a/source/dkms.conf)
==> dkms install --no-depmod vboxhost/7.1.8_OSE -k 6.14.4-zen1-2-zen
==> depmod 6.14.4-zen1-2-zen
( 6/13) Running kernel-install...
:: kernel-install installing kernel 6.14.4-zen1-2-zen

Probably not dkms issue in the EFI partition. The dkms modules don’t live in the ESP.

It removes the files as a pre-hook, before it starts installing the new files, then there is a post-hook which generates and copies the new files.

true.. i bet i was may updating initramfs ( reinstall-kernels ) from chroot and not having esp properly mounted one day by accident