Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 721834

Summary: app-admin/eclean-kernel cannot detect latest grub2 autogenerated grub.cfg and generate new config after kernel removal
Product: Gentoo Linux Reporter: drserge
Component: Current packagesAssignee: Michał Górny <mgorny>
Status: RESOLVED FIXED    
Severity: normal CC: konstantinos.smanis
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description drserge 2020-05-09 10:29:35 UTC
eclean-kernel does not autogenerate new GRUB2 grub.cfg config file after kernel removal.

Reproducible: Always

Steps to Reproduce:
1. (3 or more kernel image/initramfs versions in /boot)
2. grub-mkconfig -o /boot/grub/grub.cfg
3. eclean-kernel -d -n 2
Actual Results:  
grub.cfg is not autogenerated after kernel image/initramfs files have been removed.

Expected Results:  
grub.cfg should be autogenerated after image/initramfs files removal.

eclean-kernel-0.4.3 is affected.
/usr/lib/python3.7/site-packages/ecleankernel/bootloader/grub2.py is looking for '# It is automatically generated by grub2-mkconfig' in grub.cfg to determine if it is autogenerated, but lastest version of GRUB2 config autogeneration utility is named grub-mkconfig and places '# It is automatically generated by grub-mkconfig' in grub.cfg.
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-05-24 09:56:42 UTC
Could you --sync and try -9999?  I've just made the check more flexible.
Comment 2 drserge 2020-06-28 08:40:11 UTC
Manually downloaded from git grub2.py detects auto-generated grub.cfg correctly and executes grub-mkconfig and then outputs the following message:

eclean-kernel has met the following issue:

  FileNotFoundError(2, "No such file or directory: 'grub2-mkconfig'")
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-06-30 20:14:59 UTC
The fallback logic was wrong indeed.  Please try now.
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-07-04 06:49:08 UTC
Gentle ping.  I'd like to make a release, so I'd use a confirmation if I actually fixed your problem.
Comment 5 drserge 2020-07-08 19:14:54 UTC
(In reply to Michał Górny from comment #4)
> Gentle ping.  I'd like to make a release, so I'd use a confirmation if I
> actually fixed your problem.

Now it's working properly without any error/warning messages.
Comment 6 Raymond Jennings 2020-09-04 05:43:49 UTC
I was just about to report this myself and I did indeed notice that eclean'ed kernels aren't removed from the grub2 boot menu, suspect that it's not rerunning grub-mkconfig the way genkernel does.
Comment 7 Raymond Jennings 2020-09-04 05:54:57 UTC
Re-keyworded to allow 2.99.1, it still doesn't appear to be regenerating the boot menu as the grub.cfg still references a removed kernel.

No errors this time complaining about a missing grub2-mkconfig
Comment 8 Larry the Git Cow gentoo-dev 2020-09-22 07:48:30 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=88f6ce2f36cc65a2934a5c6575fef77dc463227c

commit 88f6ce2f36cc65a2934a5c6575fef77dc463227c
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2020-09-22 07:47:21 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2020-09-22 07:47:23 +0000

    app-admin/eclean-kernel: Bump to 2.99.2
    
    Closes: https://bugs.gentoo.org/721834
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 app-admin/eclean-kernel/Manifest                   |  1 +
 .../eclean-kernel/eclean-kernel-2.99.2.ebuild      | 22 ++++++++++++++++++++++
 2 files changed, 23 insertions(+)