Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1573087 - Old kernels are not removed
Summary: Old kernels are not removed
Alias: None
Product: Fedora
Classification: Fedora
Component: grubby
Version: 28
Hardware: x86_64
OS: Unspecified
Target Milestone: ---
Assignee: Peter Jones
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2018-04-30 07:43 UTC by Juan Orti
Modified: 2019-05-29 00:10 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2019-05-29 00:10:11 UTC
Type: Bug

Attachments (Terms of Use)

Description Juan Orti 2018-04-30 07:43:58 UTC
Description of problem:
I still have old kernel entries in grub.cfg after they have been removed.

# grep menuentry /boot/efi/EFI/fedora/grub.cfg
if [ x"${feature_menuentry_id}" = xy ]; then
export menuentry_id_option
menuentry 'Fedora (4.16.4-300.fc28.x86_64) 28 (Workstation Edition)' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-4.16.3-300.fc28.x86_64-advanced-/dev/bcache2' {
menuentry 'Fedora (4.16.3-301.fc28.x86_64) 28 (Workstation Edition)' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-4.16.3-300.fc28.x86_64-advanced-/dev/bcache2' {
menuentry 'Fedora (4.16.3-300.fc28.x86_64) 28 (Workstation Edition)' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-4.16.3-300.fc28.x86_64-advanced-/dev/bcache2' {
menuentry 'Fedora (4.16.2-300.fc28.x86_64) 28 (Workstation Edition)' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-4.16.2-300.fc28.x86_64-advanced-/dev/bcache2' {
menuentry 'Fedora (4.16.1-300.fc28.x86_64) 28 (Workstation Edition)' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-4.16.1-300.fc28.x86_64-advanced-/dev/bcache2' {
menuentry 'Fedora (0-rescue-1a9a9528e1544fb1ad2bc8462a5b5264) 28 (Workstation Edition)' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-0-rescue-1a9a9528e1544fb1ad2bc8462a5b5264-advanced-/dev/bcache2' {

# rpm -qa|grep kernel-4

Version-Release number of selected component (if applicable):

Comment 1 Jan 2018-05-12 06:06:52 UTC
Same problem here. And I found some peculiarities in my grub.cfg and in the output of "grubby --info".

The linuxefi and initrdefi entries for the most recent kernel in grub.cfg start with 2 "/":

linuxefi //vmlinuz-4.16.7-300.fc28.x86_64 root=...
initrdefi //initramfs-4.16.7-300.fc28.x86_64.img

For the other kernels it's just 1 "/", as it probably should be:

linuxefi /vmlinuz-4.16.6-302.fc28.x86_64 root=...
initrdefi /initramfs-4.16.6-302.fc28.x86_64.img

And it's the same thing in the output of "grubby --info=ALL"



If I ask grubby for infos on specific kernels it runs into trouble:

grubby --info /boot//vmlinuz-4.16.7-300.fc28.x86_64
grubby: kernel not found

grubby --info /boot/vmlinuz-4.16.7-300.fc28.x86_64

grubby --info /boot/vmlinuz-4.16.6-302.fc28.x86_64
grubby: kernel not found

So if I ask grubby for infos on specific kernels it finds the most recent one only after I repair the path, outputting false paths to kernel and initrd, and it doesn't find any of the older kernels even though the kernels/paths exist.

grub2-mkconfig fixes the problem partly. The old/removed kernels disappear from the grub menu and all the weird "//" in crub.cfg and "grubby --info=ALL" are gone. But now "grubby --info /boot/vmlinuz-<version>.fc28.x86_64" doesn't find any kernel, not even the most recent. And after the next kernel update everything will start again.

Comment 2 Jan 2019-05-01 15:57:41 UTC
It looks like the upgrade to Fedora 30 and grubby-8.40-30 fixed this problem on my system.

Comment 3 Ben Cotton 2019-05-02 19:23:12 UTC
This message is a reminder that Fedora 28 is nearing its end of life.
On 2019-May-28 Fedora will stop maintaining and issuing updates for
Fedora 28. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora 'version' of '28'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 28 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 4 Ben Cotton 2019-05-29 00:10:11 UTC
Fedora 28 changed to end-of-life (EOL) status on 2019-05-28. Fedora 28 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.