Bug 1711628 - new installed kernels are not added in grub2 boot menu
Summary: new installed kernels are not added in grub2 boot menu
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: grub2
Version: 30
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Peter Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-05-19 05:01 UTC by Claude Frantz
Modified: 2020-03-19 17:03 UTC (History)
5 users (show)

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


Attachments (Terms of Use)
/etc/default/grub (489 bytes, text/plain)
2019-05-21 08:12 UTC, Claude Frantz
no flags Details
/boot/grub2/grubenv (1.00 KB, text/plain)
2019-05-21 08:13 UTC, Claude Frantz
no flags Details
/boot/grub2/grub.cfg (7.34 KB, text/plain)
2019-05-21 08:14 UTC, Claude Frantz
no flags Details
/boot/loader/entries/72d3a4c728fc44929d30dbf0ee8dc601-0-rescue.conf (379 bytes, text/plain)
2019-05-21 08:15 UTC, Claude Frantz
no flags Details
/boot/loader/entries/72d3a4c728fc44929d30dbf0ee8dc601-5.0.11-100.fc28.i686.conf (321 bytes, text/plain)
2019-05-21 08:16 UTC, Claude Frantz
no flags Details
/boot/loader/entries/72d3a4c728fc44929d30dbf0ee8dc601-5.0.13-300.fc30.i686.conf (269 bytes, text/plain)
2019-05-21 08:17 UTC, Claude Frantz
no flags Details
/boot/loader/entries/72d3a4c728fc44929d30dbf0ee8dc601-5.0.14-300.fc30.i686.conf (269 bytes, text/plain)
2019-05-21 08:18 UTC, Claude Frantz
no flags Details
/boot/loader/entries/72d3a4c728fc44929d30dbf0ee8dc601-5.0.16-300.fc30.i686.conf (269 bytes, text/plain)
2019-05-21 08:19 UTC, Claude Frantz
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1713902 0 unspecified CLOSED With Fedora 30 the kernel update does not update the grub configuration anymore 2021-02-22 00:41:40 UTC

Internal Links: 1713902

Description Claude Frantz 2019-05-19 05:01:13 UTC
Description of problem:
After "dnf update" having installed new kernels, new installed kernels are not added in grub2 boot menu.

Version-Release number of selected component (if applicable):
grub2-common-2.02-80.fc30.noarch

How reproducible:
Always

Steps to Reproduce:
1. Booting
2.
3.

Actual results:
The grub2 menu is not up to date

Expected results:


Additional info:
Coming from bug 1652806

Comment 1 Claude Frantz 2019-05-19 05:07:33 UTC
Unfortunately, I'm not able to attached the requested files:

Error 500 - Internal Server Error
The server encountered an internal error and was unable to complete your request.

Comment 2 Claude Frantz 2019-05-19 05:09:45 UTC
I have done, in this order:

I have installed the grubby-deprecated package.
I have created the attached tar file containing the requested files.
I have entered "grub2-mkconfig -o" saving the output in a scratch file.
I have entered "grub2-install /dev/sda".
I have entered "grub2-mkconfig -o" saving the output in another scratch file.

I have compared both output files of grub2-mkconfig and I have found then identical.

I have saved such a file as /boot/grub2/tentative.cfg.
I have booted and used this /boot/grub2/tentative.cfg as configfile of grub2.

The first look is that the boot was successful. I will have to see what will happen at the next kernel installation by dnf.

I will try to update the requested files later, when the server will accept them.

Comment 3 Claude Frantz 2019-05-21 08:12:11 UTC
Created attachment 1571516 [details]
/etc/default/grub

Comment 4 Claude Frantz 2019-05-21 08:13:42 UTC
Created attachment 1571525 [details]
/boot/grub2/grubenv

Comment 5 Claude Frantz 2019-05-21 08:14:24 UTC
Created attachment 1571526 [details]
/boot/grub2/grub.cfg

Comment 6 Claude Frantz 2019-05-21 08:15:29 UTC
Created attachment 1571527 [details]
/boot/loader/entries/72d3a4c728fc44929d30dbf0ee8dc601-0-rescue.conf

Comment 7 Claude Frantz 2019-05-21 08:16:33 UTC
Created attachment 1571528 [details]
/boot/loader/entries/72d3a4c728fc44929d30dbf0ee8dc601-5.0.11-100.fc28.i686.conf

Comment 8 Claude Frantz 2019-05-21 08:17:33 UTC
Created attachment 1571529 [details]
/boot/loader/entries/72d3a4c728fc44929d30dbf0ee8dc601-5.0.13-300.fc30.i686.conf

Comment 9 Claude Frantz 2019-05-21 08:18:28 UTC
Created attachment 1571530 [details]
/boot/loader/entries/72d3a4c728fc44929d30dbf0ee8dc601-5.0.14-300.fc30.i686.conf

Comment 10 Claude Frantz 2019-05-21 08:19:23 UTC
Created attachment 1571531 [details]
/boot/loader/entries/72d3a4c728fc44929d30dbf0ee8dc601-5.0.16-300.fc30.i686.conf

Comment 11 Javier Martinez Canillas 2019-05-21 08:44:29 UTC
(In reply to Claude Frantz from comment #5)
> Created attachment 1571526 [details]
> /boot/grub2/grub.cfg

The problem is that you have a non-BLS grub.cfg that contains the menu entries but have GRUB_ENABLE_BLSCFG=true in your /etc/default/grub. You should set it to false if you don't want to use a BLS configuration.

Comment 12 Claude Frantz 2019-05-21 12:22:54 UTC
I suspect that the problem started with the upgrade from Fedora 28 to 30. To be honest, I have no problem if BLS configuration is installed and running well. 

What do you suggest me to return to a clean situation with BLS configuration ? Please remember, that the attached files are in the state before I have run grub2-mkconfig. See comment 2.

Comment 13 Javier Martinez Canillas 2019-05-21 12:34:16 UTC
(In reply to Claude Frantz from comment #12)
> I suspect that the problem started with the upgrade from Fedora 28 to 30. To
> be honest, I have no problem if BLS configuration is installed and running
> well. 
> 
> What do you suggest me to return to a clean situation with BLS configuration
> ? Please remember, that the attached files are in the state before I have
> run grub2-mkconfig. See comment 2.

I would suggest to keep GRUB_ENABLE_BLSCFG=true in your /etc/default/grub, generate a grub.cfg with GRUB_ENABLE_BLSCFG=true and remove the grubby-deprecated package (since it's only needed with a non-BLS config).

Comment 14 Claude Frantz 2019-05-21 13:07:13 UTC
OK ! Thanks ! The current grub.cfg has been generated with GRUB_ENABLE_BLSCFG=true, so it needs not to be changed. I have simply removed the grubby-deprecated package.

Comment 15 Claude Frantz 2019-05-24 15:18:29 UTC
I have another system running f28 and I have to upgrade it to f30. Exactly the same situation as I had. 

The grubby-deprecated package doesn't exist in f28. I suspect that the upgrade process will again result in a non bootable system. What can I do in order to try to avoid this situation ?

Is it a good idea to simply insert GRUB_ENABLE_BLSCFG="false" in /etc/default/grub ?

Comment 16 Javier Martinez Canillas 2019-05-24 15:25:48 UTC
(In reply to Claude Frantz from comment #15)
> I have another system running f28 and I have to upgrade it to f30. Exactly
> the same situation as I had. 
> 
> The grubby-deprecated package doesn't exist in f28. I suspect that the
> upgrade process will again result in a non bootable system. What can I do in
> order to try to avoid this situation ?
> 
> Is it a good idea to simply insert GRUB_ENABLE_BLSCFG="false" in
> /etc/default/grub ?

Just run grub2-install before doing your upgrade to make sure that you have a recent GRUB core.img as mentioned here:

https://fedoraproject.org/wiki/Common_F30_bugs#GRUB_boot_menu_is_not_populated_after_an_upgrade

Comment 17 Sergio Basto 2019-05-31 04:39:41 UTC
I have this problem in F29 [1] 



grub2-common-2.02-62.fc29.noarch
grub2-efi-ia32-2.02-62.fc29.x86_64
grub2-pc-2.02-62.fc29.x86_64
grub2-pc-modules-2.02-62.fc29.noarch
grub2-tools-2.02-62.fc29.x86_64
grub2-tools-efi-2.02-62.fc29.x86_64
grub2-tools-extra-2.02-62.fc29.x86_64
grub2-tools-minimal-2.02-62.fc29.x86_64
grubby-8.40-18.fc29.x86_64
grubby-bls-8.40-18.fc29.noarch
grub-customizer-5.1.0-1.fc29.x86_64

Comment 18 Javier Martinez Canillas 2019-05-31 07:12:42 UTC
(In reply to Sergio Monteiro Basto from comment #17)
> I have this problem in F29 [1] 
> 
> 
> 
> grub2-common-2.02-62.fc29.noarch
> grub2-efi-ia32-2.02-62.fc29.x86_64
> grub2-pc-2.02-62.fc29.x86_64
> grub2-pc-modules-2.02-62.fc29.noarch
> grub2-tools-2.02-62.fc29.x86_64
> grub2-tools-efi-2.02-62.fc29.x86_64
> grub2-tools-extra-2.02-62.fc29.x86_64
> grub2-tools-minimal-2.02-62.fc29.x86_64
> grubby-8.40-18.fc29.x86_64
> grubby-bls-8.40-18.fc29.noarch

You need to remove grubby-bls. Unless you switched your F29 configuration to BLS.

Comment 19 Sergio Basto 2019-05-31 15:35:12 UTC
(In reply to Javier Martinez Canillas from comment #18)
> (In reply to Sergio Monteiro Basto from comment #17)
> > I have this problem in F29 [1] 
> > 
> > 
> > 
> > grub2-common-2.02-62.fc29.noarch
> > grub2-efi-ia32-2.02-62.fc29.x86_64
> > grub2-pc-2.02-62.fc29.x86_64
> > grub2-pc-modules-2.02-62.fc29.noarch
> > grub2-tools-2.02-62.fc29.x86_64
> > grub2-tools-efi-2.02-62.fc29.x86_64
> > grub2-tools-extra-2.02-62.fc29.x86_64
> > grub2-tools-minimal-2.02-62.fc29.x86_64
> > grubby-8.40-18.fc29.x86_64
> > grubby-bls-8.40-18.fc29.noarch
> 
> You need to remove grubby-bls. Unless you switched your F29 configuration to
> BLS.

yes, it fixes thanks .

Comment 20 Claude Frantz 2019-06-08 14:37:15 UTC
According to your recommendation, I have ran grub2-install before doing your upgrade. The upgrade process ended without problem but the system was not able to boot, but the new situation is different now.

grub2 booted well and plymouth was started but then stopped with the message "Failed to Start Switch Root". After some investigation, I have found that root= had probably no or a wrong value. 

Here are the steps which I have ran next:

Reboot.

In the grub2 menu, I have edited the highlighted entry, adding "root=LABEL=root" at the end of the line beginning with "linux" and I have allowed to boot. The partition which should be mounted at "/" has this label "root". The system booted well.

I have entered "dnf update". It ended with just a warning about skipped packages. No critical ones.

I have ran "grub2-mkconfig -o /boot/grub2/grub.cfg". It ended without error.

Reboot.

Stopped again with he message "Failed to Start Switch Root".

Reboot with the edited grub2 line as previously. The system started.

I have added "root=LABEL=root" at the end of the "GRUB_CMDLINE_LINUX" in /etc/default/grub. Then grub2-mkconfig again, no error message displayed. 

Reboot without editing the highlighted line in the grub2 menu. Again got the message "Failed to Start Switch Root".

I'm suspecting dracut now. What can I do now ?

Comment 21 Claude Frantz 2019-06-09 07:26:56 UTC
In addition to the above mentioned procedure, I have tried to run grub2-install and grub2-mkconfig again, on the upgraded system. Now, the system is able to start itself, on power on, as expected.

Comment 22 Sergio Basto 2019-09-06 17:42:21 UTC
(In reply to Javier Martinez Canillas from comment #18)
> (In reply to Sergio Monteiro Basto from comment #17)
> > I have this problem in F29 [1] 
> > 
> > 
> > 
> > grub2-common-2.02-62.fc29.noarch
> > grub2-efi-ia32-2.02-62.fc29.x86_64
> > grub2-pc-2.02-62.fc29.x86_64
> > grub2-pc-modules-2.02-62.fc29.noarch
> > grub2-tools-2.02-62.fc29.x86_64
> > grub2-tools-efi-2.02-62.fc29.x86_64
> > grub2-tools-extra-2.02-62.fc29.x86_64
> > grub2-tools-minimal-2.02-62.fc29.x86_64
> > grubby-8.40-18.fc29.x86_64
> > grubby-bls-8.40-18.fc29.noarch
> 
> You need to remove grubby-bls. Unless you switched your F29 configuration to
> BLS.

Moving to grubby component .

Seems to be a grubby fault , shouldn't we force just have one grubby in system ? 

Thanks

Comment 23 Sergio Basto 2019-09-12 18:32:12 UTC
It happens again with me, [1] doesn't add new entry in grub boot menu .

and with verbose [2] and with command [3] which a command of grub2-common on 99-grub-mkconfig.install I find out that wan't run in my machine [4]
exits with exit 0 .
How is suppose have an KERNEL_INSTALL_MACHINE_ID variable ? 

Thanks 

[1] 
/bin/kernel-install add 5.2.13-200.fc30.x86_64 /lib/modules/5.2.13-200.fc30.x86_64/vmlinuz || exit $?

[2]
/bin/kernel-install --verbose add 5.2.13-200.fc30.x86_64 /lib/modules/5.2.13-200.fc30.x86_64/vmlinuz

[3]
/usr/lib/kernel/install.d/99-grub-mkconfig.install add 5.2.13-200.fc30.x86_64 /boot/07adf8bb49c3c0cad262e42800000010/5.2.13-200.fc30.x86_64 /lib/modules/5.2.13-200.fc30.x86_64/vmlinuz 

[4]
if ! [[ $KERNEL_INSTALL_MACHINE_ID ]]; then
    echo exit 0
    exit 0
fi

Comment 24 Sergio Basto 2019-09-12 22:00:35 UTC
After run "systemd-machine-id-setup",  it seems that fix this issue ( new installed kernels are not added in grub2 boot menu  ) , after read this commit [1], I guessed that, I needed to run systemd-machine-id-setup , my laptop is an F30 upgraded from F29, F28 etc.  


[1]
https://src.fedoraproject.org/rpms/grub2/c/db5dccf3325bf366642be1556d71e2fabccef496

Comment 25 Sergio Basto 2019-09-17 13:17:32 UTC
see also https://bugzilla.redhat.com/show_bug.cgi?id=1713902

Comment 26 Javier Martinez Canillas 2019-10-14 13:18:22 UTC
(In reply to Sergio Monteiro Basto from comment #24)
> After run "systemd-machine-id-setup",  it seems that fix this issue ( new
> installed kernels are not added in grub2 boot menu  ) , after read this
> commit [1], I guessed that, I needed to run systemd-machine-id-setup , my
> laptop is an F30 upgraded from F29, F28 etc.  
> 
> 
> [1]
> https://src.fedoraproject.org/rpms/grub2/c/
> db5dccf3325bf366642be1556d71e2fabccef496

I'm surprised that you didn't have an /etc/machine-id set.

Comment 27 Javier Martinez Canillas 2020-03-19 17:03:36 UTC
Closing this as NOTABUG since it was caused by a missing /etc/machine-id.


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