Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1678445

Summary: grub2-mkconfig does not write usefull information into /boot/grub2/grub.cfg
Product: [Fedora] Fedora Reporter: Thomas Schweikle <tschweikle>
Component: grub2Assignee: Peter Jones <pjones>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: fmartine, lkundrak, oyvinds, paul.destefano-redhat2, pjones, shlomif, yann
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-03-11 10:55:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Thomas Schweikle 2019-02-18 19:07:12 UTC
Description of problem:
grub2-mkconfig -o /boot/grub2/grub.cfg

does not write useful information about kernels bootable into /boot/grub2/grub.cfg. In tune there is no bootable kernel listed within grubs menue while booting. The system does stop with grub loaded not booting further.

Version-Release number of selected component (if applicable):
grub2-tools-extra-2.02-70.fc30.x86_64
grub2-common-2.02-66.fc30.noarch
grub2-tools-minimal-2.02-66.fc30.x86_64
grub2-common-2.02-70.fc30.noarch
grub2-pc-modules-2.02-70.fc30.noarch
grub2-pc-2.02-70.fc30.x86_64
grubby-8.40-24.fc30.x86_64
grub2-tools-minimal-2.02-70.fc30.x86_64
grub2-tools-2.02-70.fc30.x86_64
grub2-pc-modules-2.02-66.fc30.noarch
grubby-8.40-27.fc30.x86_64
grub2-tools-efi-2.02-70.fc30.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Install fedora 29
2. Upgrade to fedora rawhide
3. Look at kernels installed
4. call grub2-mkconfig -o /boot/grub2/grub.cfg
5. reboot
6. grub shows up, but no entry to boot fedora from.

Actual results:
No entry in grub menue to boot fedora from.

Expected results:
Grub boot menue showing up to select a kernel to boot.

Additional info:

Comment 1 Javier Martinez Canillas 2019-02-18 19:22:48 UTC
The boot entries not present in the GRUB config file is expected since Fedora now uses BLS files in /boot/loader/entries instead. GRUB not showing the entries is not expected of course.

Is this an EFI or legacy BIOS install?

Could you please run the blscfg command from the GRUB prompt and check if the menu is populated? If it's not, can you set debug=blscfg, run the blscfg command again and share the output?

Also, can you share the content of your /boot/grub2/grubenv file and /boot/loader/entries directory?

You can also try to load the old config file from the GRUB prompt, i.e: configfile /grub2/grub.cfg.rpmsave

Comment 2 Yann Droneaud 2019-03-05 11:09:11 UTC
In bug #1661955, comment #13, I've described the same issue.

Comment 3 Yann Droneaud 2019-03-05 11:12:56 UTC
(In reply to Yann Droneaud from comment #2)
> In bug #1661955, comment #13, I've described the same issue.

Which happen when upgrading from F29 to F30.

Comment 4 Yann Droneaud 2019-03-05 11:40:43 UTC
(In reply to Javier Martinez Canillas from comment #1)
> The boot entries not present in the GRUB config file is expected since
> Fedora now uses BLS files in /boot/loader/entries instead. GRUB not showing
> the entries is not expected of course.
> 
> Is this an EFI or legacy BIOS install?
> 
> Could you please run the blscfg command from the GRUB prompt and check if
> the menu is populated?

The command was not available.

Which mean my installed grub is not up to date.

After running "grub2-install /dev/sda", grub now shows all entry.

Comment 5 Yann Droneaud 2019-03-05 11:42:20 UTC
There's also a way to workaround the issue without having to update installed boot loader:

- remove GRUB_ENABLE_BLSCFG=true from /etc/default/grub
- run grub2-mkconfig -o /boot/grub2/grub.cfg

Comment 6 Yann Droneaud 2019-03-05 11:47:53 UTC
See also #1599445

Comment 7 Yann Droneaud 2019-03-05 12:10:44 UTC
(In reply to Yann Droneaud from comment #6)
> See also bug #1599445

And https://fedoraproject.org/wiki/Changes/BootLoaderSpecByDefault#Upgrade.2Fcompatibility_impact

Comment 8 Javier Martinez Canillas 2019-03-11 10:45:38 UTC
*** Bug 1687191 has been marked as a duplicate of this bug. ***

Comment 9 Javier Martinez Canillas 2019-03-11 10:46:16 UTC
*** Bug 1686470 has been marked as a duplicate of this bug. ***

Comment 10 Javier Martinez Canillas 2019-03-11 10:55:15 UTC

*** This bug has been marked as a duplicate of bug 1652806 ***