Bug 1713902 - With Fedora 30 the kernel update does not update the grub configuration anymore
Summary: With Fedora 30 the kernel update does not update the grub configuration anymore
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: grub2
Version: 30
Hardware: i686
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Peter Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-05-25 15:17 UTC by Albert Flügel
Modified: 2020-03-28 23:05 UTC (History)
10 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2020-03-19 17:29:14 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Requested files packed into a tar (20.00 KB, application/octet-stream)
2019-05-28 18:14 UTC, Albert Flügel
no flags Details
requested files (2.54 KB, application/gzip)
2019-08-24 22:36 UTC, Lonni J Friedman
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1711628 0 unspecified CLOSED new installed kernels are not added in grub2 boot menu 2021-02-22 00:41:40 UTC

Internal Links: 1711628

Description Albert Flügel 2019-05-25 15:17:47 UTC
Description of problem:
Since the update to Fedora 30 my Dell laptop boots 5.0.11-200, though i run
dnf update several times and tried to remedy in various ways.

Version-Release number of selected component (if applicable):
grub2-tools-2.02-81.fc30 (not sure, if this package is the culprit)

How reproducible:


Steps to Reproduce:
1. Upgrade a dell D500 from Fedora 29 to 30
2. Upgrade the kernel, when a higher version is available running dnf upgrade

Actual results:
Box still boots the old kernel

Expected results:
Machine boots the enw kernel

Additional info:
In /boot/grub2 only the file grubenv has a modified modification time stamp.
There is no error message shown.
As this is a phenomenon, that appeared already several times in the Fedora
history and pops up again and again, i tried some of the recommended procedures i found in the web. But nothing helped. On the contrary:
As the developers could not help modifying the handling of the grub.cfg file and friends significantly, recreating grub.cfg by running grub2-mkconfig -o /boot/grub2/grub.cfg
makes things greatly worse.
I'd prefer to have a procedure to recreate grub.cfg in a safe way, but i did
not find any except rewriting it manually. grubby neither helps, but makes things more obscure.

Comment 1 Javier Martinez Canillas 2019-05-27 07:51:06 UTC
Please share the following files:

- /boot/grub2/grub.cfg
- /boot/grub2/grubenv
- /etc/default/grub
- /boot/loader/entries/*.conf

Comment 2 Albert Flügel 2019-05-28 18:14:39 UTC
Created attachment 1574439 [details]
Requested files packed into a tar

Comment 3 Javier Martinez Canillas 2019-05-29 07:59:56 UTC
The problem is that you have GRUB_ENABLE_BLSCFG=true in /etc/default/grub but your /boot/grub2/grub.cfg is for an non-BLS configuration. You need to re-generated your grub.cfg with grub2-mkconfig -o /boot/grub2/grub.cfg.

Comment 4 Albert Flügel 2019-06-01 10:26:42 UTC
With GRUB_ENABLE_BLSCFG=false the kernel neither got updated.

Since i recovered from an unbootable system there was no kernel update, so the real check, whether the kernel update is booted, was not yet possible.

For anyone googling this: To regenerate the /boot/grub2/grub.cfg after an upgrade to a release with BLS, that is GRUB_ENABLE_BLSCFG=true in /etc/default/grub, first do:
grub2-install /dev/sda (or whatever is your boot device)
Then run grub2-mkconfig -o /boot/grub2/grub.cfg .
Otherwise the grub on your disk is probably not BLS capable and your computer does not boot anymore with error messages. Recovery using the rescue entry is neither possible anymore, because the grub config is broken to larger degree for the different system entries.
On my laptop only the memtest was left offered for booting. Then you must boot a rescue image from CD/DVD/USB-stick or whatever your machine is able to. Or type in the correct boot parameters to grub.

Comment 5 Albert Flügel 2019-06-01 10:30:41 UTC
Sorry, i wanted to say: With GRUB_ENABLE_BLSCFG=false the grub.cfg neither got updated during a kernel upgrade

Comment 6 Albert Flügel 2019-06-07 17:17:12 UTC
A successive kernel update worked without issues.

Nonetheless, this bug was regarding the distribution upgrade.

As i'm not willing to downgrade just to test the scenario again, i assume, this problem will see the eol of F30 without much further care, if noone else experiences it or silently fixes himself.

Comment 7 Lonni J Friedman 2019-08-24 22:35:37 UTC
I'm also running into this same problem after upgrading from Fedora 29 to 30.  Every time there's a new kernel, the grub config is never updated.  If I manually run ' grub2-mkconfig -o /boot/grub2/grub.cfg' then the config is updated.

Comment 8 Lonni J Friedman 2019-08-24 22:36:51 UTC
Created attachment 1607742 [details]
requested files

Attaching the files requested earlier.

Comment 9 Carlo de Wolf 2019-09-16 17:29:16 UTC
I reinstalled grub on my boot device and used grub2-switch-to-blscfg to switch configuration style. This bypasses the issue described here.

See also https://fedoraproject.org/wiki/Changes/BootLoaderSpecByDefault#How_To_Test

Comment 10 Sergio Basto 2019-09-17 13:16:37 UTC
see also https://bugzilla.redhat.com/show_bug.cgi?id=1711628

Comment 11 Javier Martinez Canillas 2020-03-19 17:29:14 UTC
(In reply to Albert Flügel from comment #4)
> With GRUB_ENABLE_BLSCFG=false the kernel neither got updated.
> 

Yes, this is likely due the GRUB core.img becoming stale and needing to be updated with grub2-install. This is a known F30 bug documented in [0], there is also documented the work around for this issue.

[0]: https://fedoraproject.org/wiki/Common_F30_bugs#GRUB_boot_menu_is_not_populated_after_an_upgrade.

Comment 12 Lonni J Friedman 2020-03-20 00:11:27 UTC
This isn't fixed, and the "documented the work around" does not apply.  I long ago dealt with the broken grub.  I'm still stuck with a grub config that never updates whenever I update the kernel version.  The only "work around" is to run 'grub2-mkconfig -o /boot/grub2/grub.cfg' manually after every kernel update.

Comment 13 Javier Martinez Canillas 2020-03-20 00:46:14 UTC
(In reply to Lonni J Friedman from comment #12)
> This isn't fixed, and the "documented the work around" does not apply.  I
> long ago dealt with the broken grub.  I'm still stuck with a grub config
> that never updates whenever I update the kernel version.  The only "work
> around" is to run 'grub2-mkconfig -o /boot/grub2/grub.cfg' manually after
> every kernel update.

If you are re-generating your grub.cfg after each kernel install then I assume that you don't have GRUB_ENABLE_BLSCFG=true set in /etc/default/grub, so in that case you need to install the grubby-deprecated package to make new menu entries to be added to the existing grub.cfg.

The other option is to set GRUB_ENABLE_BLSCFG=true in /etc/default/grub and re-generate your grub.cfg. If you have a legacy BIOS install, then it may be needed to update the GRUB core.img with grub2-install /dev/X (where X is the block device where the GRUB was installed).

Comment 14 Lonni J Friedman 2020-03-28 23:05:19 UTC
Thanks.  Installing grubby-deprecated fixed the problem when GRUB_ENABLE_BLSCFG=false is set.


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