Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 551456 - app-admin/eclean-kernel wrongly identifies kernels as "not referenced by bootloader" with grub2
Summary: app-admin/eclean-kernel wrongly identifies kernels as "not referenced by boot...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal minor
Assignee: Michał Górny
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-07 18:46 UTC by faminebadger
Modified: 2015-11-17 07:13 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description faminebadger 2015-06-07 18:46:59 UTC
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) #
Comment 1 Lagu 2015-11-16 23:55:49 UTC
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.
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-11-17 07:13:09 UTC
> ** Config is autogenerated, ignoring

That's the key point. Since it is autogenerated, all kernels will always be referenced unless we remove them.