eclean-kernel claims kernels are unreferenced by grub2, even when they are referenced. Reproducible: Always Steps to Reproduce: 1. Have at least one other kernel than the one running referenced by grub2 2. eclean-kernel -aA 3. Actual Results: Claims kernels are unreferenced and asks to remove them, even though they are referenced. Expected Results: Skip over referenced kernels and don't ask. Output from eclean-kernel: gentoo ~ (0) # eclean-kernel -aAD * Trying bootloader lilo * Trying bootloader grub2 ** /boot/grub/grub.cfg found * In get_removal_list() ** Config is autogenerated, ignoring Preserving currently running kernel (4.0.4-gentoo-famine) Remove 4.0.5-gentoo-famine (not referenced by bootloader (grub2))? [Yes/No]n gentoo ~ (0) # Demonstration it's referenced: gentoo ~ (0) # grep vmlinuz /boot/grub/grub.cfg linux /boot/vmlinuz-4.0.5-gentoo-famine root=/dev/sda3 ro rootfstype=ext4 snd_virtuoso.index=0 snd_hda_intel.index=1 radeon.audio=1 linux /boot/vmlinuz-4.0.5-gentoo-famine root=/dev/sda3 ro rootfstype=ext4 snd_virtuoso.index=0 snd_hda_intel.index=1 radeon.audio=1 linux /boot/vmlinuz-4.0.5-gentoo-famine root=/dev/sda3 ro single rootfstype=ext4 snd_virtuoso.index=0 snd_hda_intel.index=1 radeon.audio=1 linux /boot/vmlinuz-4.0.4-gentoo-famine root=/dev/sda3 ro rootfstype=ext4 snd_virtuoso.index=0 snd_hda_intel.index=1 radeon.audio=1 linux /boot/vmlinuz-4.0.4-gentoo-famine root=/dev/sda3 ro single rootfstype=ext4 snd_virtuoso.index=0 snd_hda_intel.index=1 radeon.audio=1 gentoo ~ (0) #
same here: Generating grub configuration file ... Found linux image: /boot/kernel-genkernel-x86_64-4.2.6-hardened-r3 Found initrd image: /boot/initramfs-genkernel-x86_64-4.2.6-hardened-r3 Found linux image: /boot/kernel-genkernel-x86_64-4.2.5-hardened-r1 Found initrd image: /boot/initramfs-genkernel-x86_64-4.2.5-hardened-r1 Found linux image: /boot/kernel-genkernel-x86_64-4.2.5 Found initrd image: /boot/initramfs-genkernel-x86_64-4.2.5 Found linux image: /boot/kernel-genkernel-x86_64-4.1.7-hardened-r1 Found initrd image: /boot/initramfs-genkernel-x86_64-4.1.7-hardened-r1 Found linux image: /boot/kernel-genkernel-x86_64-4.1.6-hardened Found initrd image: /boot/initramfs-genkernel-x86_64-4.1.6-hardened Found linux image: /boot/kernel-genkernel-x86_64-4.0.5-gentoo Found initrd image: /boot/initramfs-genkernel-x86_64-4.0.5-gentoo Found Windows Boot Manager on /dev/sda1@/EFI/Microsoft/Boot/bootmgfw.efi Found Debian GNU/Linux (8.1) on /dev/sda3 done eclean-kernel -paD * Trying bootloader lilo * Trying bootloader grub2 ** /boot/grub/grub.cfg found * In get_removal_list() ** Config is autogenerated, ignoring These are the kernels which would be removed: - genkernel-x86_64-4.0.5-gentoo: not referenced by bootloader (grub2) - genkernel-x86_64-4.1.6-hardened: not referenced by bootloader (grub2) - genkernel-x86_64-4.2.5-hardened-r1: not referenced by bootloader (grub2) - genkernel-x86_64-4.1.7-hardened-r1: not referenced by bootloader (grub2) - genkernel-x86_64-4.2.6-hardened-r3: not referenced by bootloader (grub2) - genkernel-x86_64-4.2.5: not referenced by bootloader (grub2) Bootloader grub2 config will be updated. using eclean-kernel-0.4.1 Cya.
> ** Config is autogenerated, ignoring That's the key point. Since it is autogenerated, all kernels will always be referenced unless we remove them.