1. Michał Górny
  2. eclean-kernel
Issue #3 new

Not detect kernels in grub.cfg (grub2)

Anonymous created an issue
# ls /boot
boot
grub2
initramfs-genkernel-x86_64-3.7.10-aufs-v1
initramfs-genkernel-x86_64-3.7.8-gentoo-v1
initramfs-genkernel-x86_64-3.8.0-gentoo-v1
initramfs-genkernel-x86_64-3.8.1-gentoo-v1
initramfs-genkernel-x86_64-3.8.2-gentoo-v1
kernel-genkernel-x86_64-3.7.10-aufs-v1
kernel-genkernel-x86_64-3.7.8-gentoo-v1
kernel-genkernel-x86_64-3.8.0-gentoo-v1
kernel-genkernel-x86_64-3.8.1-gentoo-v1
kernel-genkernel-x86_64-3.8.2-gentoo-v1
System.map-genkernel-x86_64-3.7.10-aufs-v1
System.map-genkernel-x86_64-3.7.8-gentoo-v1
System.map-genkernel-x86_64-3.8.0-gentoo-v1
System.map-genkernel-x86_64-3.8.1-gentoo-v1
System.map-genkernel-x86_64-3.8.2-gentoo-v1

# eclean-kernel -a -p
These are the kernels which would be removed:
- genkernel-x86_64-3.8.2-gentoo-v1: not referenced by bootloader (grub2)
- genkernel-x86_64-3.8.0-gentoo-v1: not referenced by bootloader (grub2)
- genkernel-x86_64-3.7.10-aufs-v1: not referenced by bootloader (grub2)
- genkernel-x86_64-3.8.1-gentoo-v1: not referenced by bootloader (grub2)
- genkernel-x86_64-3.7.8-gentoo-v1: not referenced by bootloader (grub2)
Bootloader grub2 config will be updated.

grub.cfg in attacment

Comments (9)

  1. Martino Dell'Ambrogio

    I think that both parties are right, we need a new feature and the current behavior is an actual bug.

    The bug: While grub's configuration would often be a selection of kernels and could be used as a cleaning source, grub2 selects and presents anything available. This means that the behavior expected when using -a is to keep all kernels, not remove them.

    The needed feature: In my opinion we need a new method for kernel selection, because -n is not powerful enough. We would like to remove some kernels, but we have no way to tell eclean-kernel which ones if we are using grub2, unless we just want to select the latest.

  2. Log in to comment