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 1940524 - grub2-mkconfig -o /boot/grub2/grub.cfg breaks grub
Summary: grub2-mkconfig -o /boot/grub2/grub.cfg breaks grub
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: grub2
Version: 34
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Peter Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1941379 1942081 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-03-18 15:22 UTC by William Maddler
Modified: 2021-03-27 17:05 UTC (History)
9 users (show)

Fixed In Version: grub2-2.06~rc1-2.fc35 grub2-2.06~rc1-2.fc34
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-03-24 08:54:40 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Diff between valilla grub.cfg and after running grun2-mkconfig (deleted)
2021-03-18 15:22 UTC, William Maddler
no flags Details
broken grub.cfg from 2.06 (deleted)
2021-03-18 17:13 UTC, William Maddler
no flags Details
grub.cfg from 2.04 (deleted)
2021-03-18 17:14 UTC, William Maddler
no flags Details

Description William Maddler 2021-03-18 15:22:34 UTC
Created attachment 1764407 [details]
Diff between valilla grub.cfg and after running grun2-mkconfig

Description of problem:
After running "grub2-mkconfig -o /boot/grub2/grub.cfg" the system will fail to boot and Grub menu will only show the system firmware option.

This happens even without making any changes to grub config files.
Just launch it after a clean install.

Version-Release number of selected component (if applicable):
2.06~RC1-1.fc34

How reproducible:
Always


Steps to Reproduce:
1. grub2-mkconfig -o /boot/grub2/grub.cfg 
2. reboot
3.

Actual results:
Only available option in Grub menu is system firmware


Expected results:
All boot options should show.



Additional info:

Comment 1 Javier Martinez Canillas 2021-03-18 15:33:29 UTC
Can you please check which one of the snippets in your attached diff is causing the issue?

Comment 2 William Maddler 2021-03-18 16:58:21 UTC
Hi Javier,
I'll upload the files in a minute but I can confirm this is only happening with 2.06, tested with 2.04 before dns update and everything worked fine.

W.

Comment 3 William Maddler 2021-03-18 17:07:37 UTC
Just for clarit, that was clarly "dnf" not "dns"

Comment 4 William Maddler 2021-03-18 17:13:04 UTC
Created attachment 1764445 [details]
broken grub.cfg from 2.06

Comment 5 William Maddler 2021-03-18 17:14:28 UTC
Created attachment 1764446 [details]
grub.cfg from 2.04

Comment 6 Javier Martinez Canillas 2021-03-18 17:50:58 UTC
Can you try updating your GRUB core.img ? i.e:

grub2-install /dev/X (where X is the block device where GRUB is installed).

Comment 7 William Maddler 2021-03-18 20:19:03 UTC
Am I missing anything here?

grub2-install: error: /usr/lib/grub/x86_64-efi/modinfo.sh doesn't exist. Please specify --target or --directory.
[root@fedora ~]# ls /usr/lib/grub/x86_64-efi/modinfo.sh
ls: cannot access '/usr/lib/grub/x86_64-efi/modinfo.sh': No such file or directory
[root@fedora ~]# grub2-install --version
grub2-install (GRUB) 2.04

root@fedora ~]# grub2-install 
grub2-install: error: /usr/lib/grub/x86_64-efi/modinfo.sh doesn't exist. Please specify --target or --directory.


[root@fedora ~]# grub2-install --target=arm64-efi --efi-directory=/boot/efi --bootloader-id=grub2 /dev/nvme0n1
grub2-install: error: this utility cannot be used for EFI platforms because it does not support UEFI Secure Boot.

looks this is related to #1201220?

Anyway, the main issue is 100% with 2.06, I've done a few more tests and 2.04 worked no problem every time.

W.

Comment 8 Javier Martinez Canillas 2021-03-18 21:57:49 UTC
(In reply to William Maddler from comment #7)
> Am I missing anything here?
> 

Sorry, I wrongly assumed that you had a legacy BIOS install and thought
that the issue was related to the fact that the installed GRUB core.img
was not compatible with the latest GRUB config file.

[snip]

> looks this is related to #1201220?
>

Partly, but grub2-install shouldn't really be used for EFI installs since
the package already updates the GRUB binary in the EFI System Partition.
 
> Anyway, the main issue is 100% with 2.06, I've done a few more tests and
> 2.04 worked no problem every time.
> 

Yes, I just don't see what could be causing your issue with the new config.
I'll try to dig more and attempt to reproduce your issue.

Comment 9 Javier Martinez Canillas 2021-03-18 21:59:51 UTC
In the meantime what you could try to do is what I suggested in Comment 1,
that's to figure out which change exactly is the one that causes the issue.

Comment 10 William Maddler 2021-03-19 19:21:40 UTC
I've tried following the steps to repair the grub2 install, but all the guides I found failed.
Just let me know if there's anything else I can provide to help with this.

Comment 11 Jonathan Schroeder 2021-03-21 01:26:25 UTC
Greetings,

This has affected me also. grub.cfg generated by 2.04 works. In my case, this appears to be from the root variable being overwritten by a duplicated search command in grub.cfg.

I was able to fix my boot by changing this section of grub.cfg from:

### BEGIN /etc/grub.d/10_linux ###
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root ff05363b-3d4c-402b-ba6c-46709f7d0eb6
insmod part_gpt
insmod fat
search --no-floppy --fs-uuid --set=root EA7D-3385

to:

### BEGIN /etc/grub.d/10_linux ###
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root ff05363b-3d4c-402b-ba6c-46709f7d0eb6
insmod part_gpt
insmod fat
search --no-floppy --fs-uuid --set=boot EA7D-3385

Note the change of --set=boot in the final line.

A possible root cause could be /usr/share/grub/grub-mkconfig_lib line 189 which isn't using the value of ${device_variable}. Making the below change allows grub2-mkconfig to generate working configs.

189c189
<       echo "search --no-floppy --fs-uuid --set=root ${fs_uuid}"
---
>       echo "search --no-floppy --fs-uuid --set=${device_variable} ${fs_uuid}"


Thank you for your contributions to Fedora project. Have a nice day.

Comment 12 Javier Martinez Canillas 2021-03-22 19:00:03 UTC
(In reply to Jonathan Schroeder from comment #11)

[snip]

> 
> A possible root cause could be /usr/share/grub/grub-mkconfig_lib line 189
> which isn't using the value of ${device_variable}. Making the below change
> allows grub2-mkconfig to generate working configs.
> 
> 189c189
> <       echo "search --no-floppy --fs-uuid --set=root ${fs_uuid}"
> ---
> >       echo "search --no-floppy --fs-uuid --set=${device_variable} ${fs_uuid}"
> 
> 

Thanks a lot for the information. That's exactly the issue and was caused by
a mistake introduced when resolving merge conflicts with the 2.06~rc1 rebase.

The grub2 package is failing to build right now due some toolchain changes,
I'll fix this bugzilla after I've figured that out and be able to push an update.

Comment 13 msmafra 2021-03-22 19:18:21 UTC
*** Bug 1941379 has been marked as a duplicate of this bug. ***

Comment 14 msmafra 2021-03-22 20:28:24 UTC
Downgrading to grub 2.0.4 did not solve it for me on both my installation (fresh one and upgrade from F33).

Strangely (not sure why), probably because it is installed in an USB SSD, the fresh one even without the entries boots if I choose its device, but my NVMe one doesn't.

❯ doas grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Adding boot menu entry for EFI firmware configuration
done
❯ doas grub2-mkconfig -o $(doas find /boot -name grub.cfg)
Generating grub configuration file ...
Adding boot menu entry for EFI firmware configuration
done
❯ doas grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
Generating grub configuration file ...
Adding boot menu entry for EFI firmware configuration
done
❯ grub2-mkconfig --version
grub2-mkconfig (GRUB) 2.04

Comment 15 Javier Martinez Canillas 2021-03-23 16:21:09 UTC
*** Bug 1942081 has been marked as a duplicate of this bug. ***

Comment 16 msmafra 2021-03-23 17:10:58 UTC
I tested with Manjaro (worked grub 2.04), POP!_OS (systemd-boot) and Fedora 33 live media (did not work). I reseted my UEFI configuration before trying.
What worked for me was changing the GRUB_ENABLE_BLSCFG to false, tested with 2.0.4, run grub2-mkconfig, and then set it back to true. I think I had a similar problem with Fedora 30.
As the system upgrade gnome-shell to 40.0-1, kernel to 5.11.8, grub to 2.06~rc1 and a bunch of other files after the change, It seems to be working again partially. I can use the two older entries, but the new kernel hasn't been added nor is added while I run grub2-mkconfig.

> doas grub2-mkconfig --version                                                                               6.3s  ter 23 mar 2021 13:52:28
grub2-mkconfig (GRUB) 2.06~rc1

> doas grub2-mkconfig -o /boot/grub2/grub.cfg                                                                 8.9m  ter 23 mar 2021 12:04:30
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.11.8-300.fc34.x86_64
Found initrd image: /boot/initramfs-5.11.8-300.fc34.x86_64.img
Found linux image: /boot/vmlinuz-5.11.7-300.fc34.x86_64
Found initrd image: /boot/initramfs-5.11.7-300.fc34.x86_64.img
Found linux image: /boot/vmlinuz-5.11.3-300.fc34.x86_64
Found initrd image: /boot/initramfs-5.11.3-300.fc34.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-e97c184598fb4b3caa95a68a5657ee3d
Found initrd image: /boot/initramfs-0-rescue-e97c184598fb4b3caa95a68a5657ee3d.img
Adding boot menu entry for UEFI Firmware Settings ...

I am boot with 5.11.8 because I edited the GRUB entry to point to the 5.11.8 files.

Comment 17 Fedora Update System 2021-03-24 08:37:57 UTC
FEDORA-2021-c5ed9c3970 has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-c5ed9c3970

Comment 18 Fedora Update System 2021-03-24 08:54:40 UTC
FEDORA-2021-6e172a47e2 has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 19 Fedora Update System 2021-03-25 01:23:21 UTC
FEDORA-2021-c5ed9c3970 has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-c5ed9c3970`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-c5ed9c3970

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 20 Siddharth Naithani 2021-03-25 08:33:41 UTC
This was ~1 day ago, I am not doing it again for now.

```
$ sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
Generating grub configuration file ...
Adding boot menu entry for UEFI Firmware Settings ...
done
```

There are no entries created:
```
$ sudo awk -F\' '/menuentry / {print $2}' /boot/grub2/grub.cfg 
UEFI Firmware Settings
```

On fresh Install of 34:
```
$ sudo awk -F\' '/menuentry / {print $2}' /boot/grub2/grub.cfg 
System setup
```

Comment 21 msmafra 2021-03-25 13:58:05 UTC
Today during my dnf distro-sync, it was upgrading to, what I think is the fixed version, of GRUB 2.0.6:

...
Running scriptlet: grub2-common-1:2.06~rc1-2.fc34.noarch
cp: cannot stat '/boot/efi/EFI/fedora/grubenv': No such file or directory
warning: %posttrans(grub2-common-1:2.06~rc1-2.fc34.noarch) scriptlet failed, exit status 1

Error in POSTTRANS scriptlet in rpm package grub2-common
...


Shouldn't it be as describe in https://www.fedoraproject.org/wiki/Changes/UnifyGrubConfig#How_To_Test?

"How To Test
Install Fedora 34 and verify that the GRUB configuration is correct.
Check that the /boot/efi/EFI/fedora/grub{.cfg,env} files are not present.
Check that the /boot/grub2/grub{.cfg,env} files are present."

❯ doas ls /boot/efi/EFI/fedora/
BOOTIA32.CSV  gcdia32.efi  grub.cfg.OLDCONFIG  grubenv.rpmsave	mmia32.efi  shimia32-fedora.efi  shimx64.efi
BOOTX64.CSV   gcdx64.efi   grub.cfg.rpmsave    grubia32.efi	mmx64.efi   shimia32.efi
fonts	      grub.cfg	   grub.cfg.stb        grubx64.efi	shim.efi    shimx64-fedora.efi


I tried to check and kernel 5.11.8 and the today's installed onem 5.11.9, were not added:

❯ doas awk -F\' '/menuentry / { print i++, $2}' /boot/grub2/grub.cfg
0 UEFI Firmware Settings
doas awk -F\' '/menuentry / { print i++, $2}' /boot/efi/EFI/fedora/grub.cfg
0 UEFI Firmware Settings


❯ doas grub2-editenv list
boot_success=1
saved_entry=e97c184598fb4b3caa95a68a5657ee3d-5.11.9-300.fc34.x86_64
menu_show_once=1

❯ cat /etc/default/grub
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="rd.luks.uuid=luks-7b63c76d-cf2c-4661-9431-4a3c79d4cf3f rhgb quiet rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1"
GRUB_DISABLE_RECOVERY="true"
GRUB_ENABLE_BLSCFG=true

Disabling BLS:

❯ doas sed -i 's#GRUB_ENABLE_BLSCFG=true#GRUB_ENABLE_BLSCFG=false#' /etc/default/grub
❯ cat /etc/default/grub
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="rd.luks.uuid=luks-7b63c76d-cf2c-4661-9431-4a3c79d4cf3f rhgb quiet rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1"
GRUB_DISABLE_RECOVERY="true"
GRUB_ENABLE_BLSCFG=false

doas grub2-mkconfig -o /tmp/grub-no-bls.cfg
❯ awk -F\' '/menuentry / { print i++, $2}' /tmp/grub-no-bls.cfg
0 Fedora (5.11.9-300.fc34.x86_64) 34 (Workstation Edition Prerelease)
1 Fedora (5.11.8-300.fc34.x86_64) 34 (Workstation Edition Prerelease)
2 Fedora (5.11.7-300.fc34.x86_64) 34 (Workstation Edition Prerelease)
3 Fedora (5.11.3-300.fc34.x86_64) 34 (Workstation Edition Prerelease)
4 Fedora (0-rescue-e97c184598fb4b3caa95a68a5657ee3d) 34 (Workstation Edition Prerelease)
5 UEFI Firmware Settings

❯ doas dmesg --ctime | grep -i EFI
[Thu Mar 25 08:47:48 2021] efi: EFI v2.50 by INSYDE Corp.
[Thu Mar 25 08:47:48 2021] efi: ACPI 2.0=0x7aefd014 SMBIOS=0x7a013000 SMBIOS 3.0=0x7a011000 ESRT=0x7a00f7d8 RNG=0x7a00e998 TPMEventLog=0x63b95018 
[Thu Mar 25 08:47:48 2021] efi: seeding entropy pool
[Thu Mar 25 08:47:48 2021] ACPI: UEFI 0x000000007AEFB000 000042 (v01 ACRSYS ACRPRDCT 00000002 1025 00040000)
[Thu Mar 25 08:47:48 2021] ACPI: UEFI 0x000000007AEFC000 000236 (v01 ACRSYS ACRPRDCT 00000001 1025 00040000)
[Thu Mar 25 08:47:48 2021] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1910969940391419 ns
[Thu Mar 25 08:47:48 2021] pci 0000:00:02.0: BAR 2: assigned to efifb
[Thu Mar 25 08:47:48 2021] Registered efivars operations
[Thu Mar 25 08:47:48 2021] efifb: probing for efifb
[Thu Mar 25 08:47:48 2021] efifb: showing boot graphics
[Thu Mar 25 08:47:48 2021] efifb: framebuffer at 0xb0000000, using 8100k, total 8100k
[Thu Mar 25 08:47:48 2021] efifb: mode is 1920x1080x32, linelength=7680, pages=1
[Thu Mar 25 08:47:48 2021] efifb: scrolling: redraw
[Thu Mar 25 08:47:48 2021] efifb: Truecolor: size=8:8:8:8, shift=24:16:8:0
[Thu Mar 25 08:47:48 2021] fb0: EFI VGA frame buffer device
[Thu Mar 25 08:47:48 2021] integrity: Loading X.509 certificate: UEFI:db
[Thu Mar 25 08:47:48 2021] integrity: Loading X.509 certificate: UEFI:db
[Thu Mar 25 08:47:48 2021] integrity: Loaded X.509 cert 'Microsoft Corporation UEFI CA 2011: 13adbf4309bd82709c8cd54f316ed522988a1bd4'
[Thu Mar 25 08:47:48 2021] integrity: Loading X.509 certificate: UEFI:db
[Thu Mar 25 08:47:48 2021] integrity: Loading X.509 certificate: UEFI:db
[Thu Mar 25 08:47:48 2021] integrity: Error adding keys to platform keyring UEFI:db
[Thu Mar 25 08:47:48 2021] integrity: Loading X.509 certificate: UEFI:db
[Thu Mar 25 08:47:48 2021] integrity: Error adding keys to platform keyring UEFI:db
[Thu Mar 25 08:47:49 2021] tsc: Refined TSC clocksource calibration: 2495.999 MHz
[Thu Mar 25 08:47:50 2021] fb0: switching to inteldrmfb from EFI VGA
[Thu Mar 25 08:47:51 2021] [Firmware Bug]: ACPI(PEGP) defines _DOD but not _DOS

❯ ls /sys/firmware/efi
config_table  esrt              fw_vendor  runtime-map
efivars       fw_platform_size  runtime    systab

Comment 22 Javier Martinez Canillas 2021-03-25 14:22:12 UTC
(In reply to msmafra from comment #21)
> Today during my dnf distro-sync, it was upgrading to, what I think is the
> fixed version, of GRUB 2.0.6:
> 
> ...
> Running scriptlet: grub2-common-1:2.06~rc1-2.fc34.noarch
> cp: cannot stat '/boot/efi/EFI/fedora/grubenv': No such file or directory
> warning: %posttrans(grub2-common-1:2.06~rc1-2.fc34.noarch) scriptlet failed,
> exit status 1
> 
> Error in POSTTRANS scriptlet in rpm package grub2-common
> ...
> 
> 
> Shouldn't it be as describe in
> https://www.fedoraproject.org/wiki/Changes/UnifyGrubConfig#How_To_Test?
> 
> "How To Test
> Install Fedora 34 and verify that the GRUB configuration is correct.
> Check that the /boot/efi/EFI/fedora/grub{.cfg,env} files are not present.
> Check that the /boot/grub2/grub{.cfg,env} files are present."
> 
> ❯ doas ls /boot/efi/EFI/fedora/
> BOOTIA32.CSV  gcdia32.efi  grub.cfg.OLDCONFIG  grubenv.rpmsave	mmia32.efi 
> shimia32-fedora.efi  shimx64.efi
> BOOTX64.CSV   gcdx64.efi   grub.cfg.rpmsave    grubia32.efi	mmx64.efi  
> shimia32.efi
> fonts	      grub.cfg	   grub.cfg.stb        grubx64.efi	shim.efi   
> shimx64-fedora.efi

Can you share the content of your /boot/efi/EFi/fedora/grub.cfg file ?

> 
> I tried to check and kernel 5.11.8 and the today's installed onem 5.11.9,
> were not added:
> 
> ❯ doas awk -F\' '/menuentry / { print i++, $2}' /boot/grub2/grub.cfg
> 0 UEFI Firmware Settings
> doas awk -F\' '/menuentry / { print i++, $2}' /boot/efi/EFI/fedora/grub.cfg
> 0 UEFI Firmware Settings
>

So you are not using a BLS configuration? Because with BLS enabled the
boot entries are in /boot/loader/entries/*.conf and not in the grub.cfg.

Comment 23 msmafra 2021-03-25 14:42:40 UTC
> Can you share the content of your /boot/efi/EFi/fedora/grub.cfg file ?

❯ doas cat /boot/efi/EFi/fedora/grub.cfg          qui 25 mar 2021 11:23:38
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub2-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
set pager=1

if [ -f ${config_directory}/grubenv ]; then
  load_env -f ${config_directory}/grubenv
elif [ -s $prefix/grubenv ]; then
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="${saved_entry}"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

terminal_output console
if [ x$feature_timeout_style = xy ] ; then
  set timeout_style=menu
  set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
  set timeout=5
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/01_users ###
if [ -f ${prefix}/user.cfg ]; then
  source ${prefix}/user.cfg
  if [ -n "${GRUB2_PASSWORD}" ]; then
    set superusers="root"
    export superusers
    password_pbkdf2 root ${GRUB2_PASSWORD}
  fi
fi
### END /etc/grub.d/01_users ###

### BEGIN /etc/grub.d/08_fallback_counting ###
insmod increment
# Check if boot_counter exists and boot_success=0 to activate this behaviour.
if [ -n "${boot_counter}" -a "${boot_success}" = "0" ]; then
  # if countdown has ended, choose to boot rollback deployment,
  # i.e. default=1 on OSTree-based systems.
  if  [ "${boot_counter}" = "0" -o "${boot_counter}" = "-1" ]; then
    set default=1
    set boot_counter=-1
  # otherwise decrement boot_counter
  else
    decrement boot_counter
  fi
  save_env boot_counter
fi
### END /etc/grub.d/08_fallback_counting ###

### BEGIN /etc/grub.d/10_linux ###
insmod part_gpt
insmod ext2
search --no-floppy --fs-uuid --set=root 97b577f5-e3ae-4e34-a077-9a77280adbac
insmod part_gpt
insmod fat
search --no-floppy --fs-uuid --set=boot 5D5F-0A1F

# This section was generated by a script. Do not modify the generated file - all changes
# will be lost the next time file is regenerated. Instead edit the BootLoaderSpec files.
#
# The blscfg command parses the BootLoaderSpec files stored in /boot/loader/entries and
# populates the boot menu. Please refer to the Boot Loader Specification documentation
# for the files format: https://www.freedesktop.org/wiki/Specifications/BootLoaderSpec/.

# The kernelopts variable should be defined in the grubenv file. But to ensure that menu
# entries populated from BootLoaderSpec files that use this variable work correctly even
# without a grubenv file, define a fallback kernelopts variable if this has not been set.
#
# The kernelopts variable in the grubenv file can be modified using the grubby tool or by
# executing the grub2-mkconfig tool. For the latter, the values of the GRUB_CMDLINE_LINUX
# and GRUB_CMDLINE_LINUX_DEFAULT options from /etc/default/grub file are used to set both
# the kernelopts variable in the grubenv file and the fallback kernelopts variable.
if [ -z "${kernelopts}" ]; then
  set kernelopts="root=UUID=c7f83ade-47a2-4ab3-853e-52364e13fdc6 ro rootflags=subvol=@ rd.luks.uuid=luks-7b63c76d-cf2c-4661-9431-4a3c79d4cf3f rhgb quiet rd.driver.blacklist=nouveau modprobe.blacklist=nouveau nvidia-drm.modeset=1 "
fi

insmod blscfg
blscfg
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/10_reset_boot_success ###
# Hiding the menu is ok if last boot was ok or if this is a first boot attempt to boot the entry
if [ "${boot_success}" = "1" -o "${boot_indeterminate}" = "1" ]; then
  set menu_hide_ok=1
else
  set menu_hide_ok=0 
fi
# Reset boot_indeterminate after a successful boot
if [ "${boot_success}" = "1" ] ; then
  set boot_indeterminate=0
# Avoid boot_indeterminate causing the menu to be hidden more then once
elif [ "${boot_indeterminate}" = "1" ]; then
  set boot_indeterminate=2
fi
# Reset boot_success for current boot 
set boot_success=0
save_env boot_success boot_indeterminate
### END /etc/grub.d/10_reset_boot_success ###

### BEGIN /etc/grub.d/12_menu_auto_hide ###
if [ x$feature_timeout_style = xy ] ; then
  if [ "${menu_show_once}" ]; then
    unset menu_show_once
    save_env menu_show_once
    set timeout_style=menu
    set timeout=60
  elif [ "${menu_auto_hide}" -a "${menu_hide_ok}" = "1" ]; then
    set orig_timeout_style=${timeout_style}
    set orig_timeout=${timeout}
    if [ "${fastboot}" = "1" ]; then
      # timeout_style=menu + timeout=0 avoids the countdown code keypress check
      set timeout_style=menu
      set timeout=0
    else
      set timeout_style=hidden
      set timeout=1
    fi
  fi
fi
### END /etc/grub.d/12_menu_auto_hide ###

### BEGIN /etc/grub.d/14_menu_show_once ###
if [ x$feature_timeout_style = xy ]; then
  if [ "${menu_show_once_timeout}" ]; then
    set timeout_style=menu
    set timeout="${menu_show_once_timeout}"
    unset menu_show_once_timeout
    save_env menu_show_once_timeout
  fi
fi
### END /etc/grub.d/14_menu_show_once ###

### BEGIN /etc/grub.d/20_linux_xen ###

### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_ppc_terminfo ###
### END /etc/grub.d/20_ppc_terminfo ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' {
	fwsetup
}
### END /etc/grub.d/30_uefi-firmware ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg
fi
### END /etc/grub.d/41_custom ###

> So you are not using a BLS configuration? Because with BLS enabled the
> boot entries are in /boot/loader/entries/*.conf and not in the grub.cfg.

No, I let it enabled. I just tested with it disable because the entries are/were not being created. And with even it disable some, not all, were created. I say some, because not all kernel are being added even disabling BLS. I have 5.11.3, 5.11.7, 5.11.8 and now 5.11.9 (dnf.conf: installonly_limit=7). Even show that all are "Found", they're not being added.

❯ doas awk -F\' '/menuentry / { print i++, $2}' /boot/efi/EFi/fedora/grub.cfg
0 UEFI Firmware Settings
❯ doas grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.11.9-300.fc34.x86_64
Found initrd image: /boot/initramfs-5.11.9-300.fc34.x86_64.img
Found linux image: /boot/vmlinuz-5.11.8-300.fc34.x86_64
Found initrd image: /boot/initramfs-5.11.8-300.fc34.x86_64.img
Found linux image: /boot/vmlinuz-5.11.7-300.fc34.x86_64
Found initrd image: /boot/initramfs-5.11.7-300.fc34.x86_64.img
Found linux image: /boot/vmlinuz-5.11.3-300.fc34.x86_64
Found initrd image: /boot/initramfs-5.11.3-300.fc34.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-e97c184598fb4b3caa95a68a5657ee3d
Found initrd image: /boot/initramfs-0-rescue-e97c184598fb4b3caa95a68a5657ee3d.img
Adding boot menu entry for UEFI Firmware Settings ...
done
❯ doas sed -i 's#GRUB_ENABLE_BLSCFG=false#GRUB_ENABLE_BLSCFG=true#' /etc/default/grub
❯ doas grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Adding boot menu entry for UEFI Firmware Settings ...
done
❯ doas ls -halt /boot/loader/entries/
total 24K
drwx------. 2 root root 4.0K Mar 25 11:29 .
-rw-r--r--. 1 root root  549 Mar 25 11:29 e97c184598fb4b3caa95a68a5657ee3d-0-rescue.conf
-rw-r--r--. 1 root root  473 Mar 25 11:29 e97c184598fb4b3caa95a68a5657ee3d-5.11.7-300.fc34.x86_64.conf
-rw-r--r--. 1 root root  473 Mar 25 11:29 e97c184598fb4b3caa95a68a5657ee3d-5.11.8-300.fc34.x86_64.conf
-rw-r--r--. 1 root root  473 Mar 25 11:29 e97c184598fb4b3caa95a68a5657ee3d-5.11.9-300.fc34.x86_64.conf
drwxr-xr-x. 3 root root 4.0K Mar 21 19:36 ..
❯ doas grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
Generating grub configuration file ...
Adding boot menu entry for UEFI Firmware Settings ...
done

❯ doas ls -halt /boot/loader/entries/
total 24K
drwx------. 2 root root 4.0K Mar 25 11:30 .
-rw-r--r--. 1 root root  549 Mar 25 11:30 e97c184598fb4b3caa95a68a5657ee3d-0-rescue.conf
-rw-r--r--. 1 root root  473 Mar 25 11:30 e97c184598fb4b3caa95a68a5657ee3d-5.11.7-300.fc34.x86_64.conf
-rw-r--r--. 1 root root  473 Mar 25 11:30 e97c184598fb4b3caa95a68a5657ee3d-5.11.8-300.fc34.x86_64.conf
-rw-r--r--. 1 root root  473 Mar 25 11:30 e97c184598fb4b3caa95a68a5657ee3d-5.11.9-300.fc34.x86_64.conf
drwxr-xr-x. 3 root root 4.0K Mar 21 19:36 ..

❯ doas dnf reinstall kernel
Last metadata expiration check: 1:14:26 ago on Thu Mar 25 10:18:21 2021.
Dependencies resolved.
===================================================================================================================================================
 Package                       Architecture                  Version                                  Repository                              Size
===================================================================================================================================================
Reinstalling:
 kernel                        x86_64                        5.11.7-300.fc34                          fedora                                 148 k
 kernel                        x86_64                        5.11.9-300.fc34                          updates-testing                        150 k

Transaction Summary
===================================================================================================================================================

Total download size: 298 k
Installed size: 0  
Is this ok [y/N]: 

❯ doas ls -halt /boot/loader/entries/
total 24K
drwx------. 2 root root 4.0K Mar 25 11:30 .
-rw-r--r--. 1 root root  549 Mar 25 11:30 e97c184598fb4b3caa95a68a5657ee3d-0-rescue.conf
-rw-r--r--. 1 root root  473 Mar 25 11:30 e97c184598fb4b3caa95a68a5657ee3d-5.11.7-300.fc34.x86_64.conf
-rw-r--r--. 1 root root  473 Mar 25 11:30 e97c184598fb4b3caa95a68a5657ee3d-5.11.8-300.fc34.x86_64.conf
-rw-r--r--. 1 root root  473 Mar 25 11:30 e97c184598fb4b3caa95a68a5657ee3d-5.11.9-300.fc34.x86_64.conf
drwxr-xr-x. 3 root root 4.0K Mar 21 19:36 ..
❯ doas grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Adding boot menu entry for UEFI Firmware Settings ...
done
❯ doas ls -halt /boot/loader/entries/
total 24K
drwx------. 2 root root 4.0K Mar 25 11:33 .
-rw-r--r--. 1 root root  549 Mar 25 11:33 e97c184598fb4b3caa95a68a5657ee3d-0-rescue.conf
-rw-r--r--. 1 root root  473 Mar 25 11:33 e97c184598fb4b3caa95a68a5657ee3d-5.11.7-300.fc34.x86_64.conf
-rw-r--r--. 1 root root  473 Mar 25 11:33 e97c184598fb4b3caa95a68a5657ee3d-5.11.8-300.fc34.x86_64.conf
-rw-r--r--. 1 root root  473 Mar 25 11:33 e97c184598fb4b3caa95a68a5657ee3d-5.11.9-300.fc34.x86_64.conf
drwxr-xr-x. 3 root root 4.0K Mar 21 19:36 ..

Comment 24 Javier Martinez Canillas 2021-03-25 15:06:13 UTC
(In reply to msmafra from comment #23)
> > Can you share the content of your /boot/efi/EFi/fedora/grub.cfg file ?
> 
> ❯ doas cat /boot/efi/EFi/fedora/grub.cfg          qui 25 mar 2021 11:23:38
> #
> # DO NOT EDIT THIS FILE
> #
> # It is automatically generated by grub2-mkconfig using templates
> # from /etc/grub.d and settings from /etc/default/grub
> #
>

Right, you have the full GRUB config file in /boot/efi/EFI/fedora/grub.cfg
while you should just have the minimal config there and the full config
file in /boot/grub2/grub.cfg.

I think the problem is that the grub2 package %posttrans scriptlet assumes
that an /boot/efi/EFI/fedora/grubenv would exist and unconditionally tries
to copy that to /boot/grub2/ and fails.

Can you please do:

cp /boot/grub2/grubenv /boot/efi/EFI/fedora/grubenv

and then try to re-install the grub2 packages ?

I'll fix the %posttrans scriptlet to just avoid copying the grubenv file
if this doesn't exist.

Comment 25 msmafra 2021-03-25 17:39:06 UTC
Sorry about he delay.

❯ doas cp -v /boot/grub2/grubenv /boot/efi/EFI/fedora/grubenv
'/boot/grub2/grubenv' -> '/boot/efi/EFI/fedora/grubenv'



❯ doas dnf -y reinstall $(doas -- dnf info --installed | grep -e grub | grep "Name         :" | awk -F" :" '{printf $2}' | tr -d "\n")
Last metadata expiration check: 2:15:46 ago on Thu Mar 25 10:18:21 2021.
Dependencies resolved.
===================================================================================================================================================
 Package                                  Architecture              Version                               Repository                          Size
===================================================================================================================================================
Reinstalling:
 grub2-common                             noarch                    1:2.06~rc1-2.fc34                     updates-testing                    934 k
 grub2-efi-ia32                           x86_64                    1:2.06~rc1-2.fc34                     updates-testing                    470 k
 grub2-efi-ia32-cdboot                    x86_64                    1:2.06~rc1-2.fc34                     updates-testing                    1.4 M
 grub2-efi-x64                            x86_64                    1:2.06~rc1-2.fc34                     updates-testing                    499 k
 grub2-pc                                 x86_64                    1:2.06~rc1-2.fc34                     updates-testing                     19 k
 grub2-pc-modules                         noarch                    1:2.06~rc1-2.fc34                     updates-testing                    912 k
 grub2-tools                              x86_64                    1:2.06~rc1-2.fc34                     updates-testing                    1.9 M
 grub2-tools-efi                          x86_64                    1:2.06~rc1-2.fc34                     updates-testing                    552 k
 grub2-tools-extra                        x86_64                    1:2.06~rc1-2.fc34                     updates-testing                    855 k
 grub2-tools-minimal                      x86_64                    1:2.06~rc1-2.fc34                     updates-testing                    612 k

Transaction Summary
===================================================================================================================================================

Total download size: 8.0 M
Installed size: 35 M
Downloading Packages:
(1/10): grub2-efi-ia32-2.06~rc1-2.fc34.x86_64.rpm                                                                  1.1 MB/s | 470 kB     00:00    
(2/10): grub2-common-2.06~rc1-2.fc34.noarch.rpm                                                                    2.2 MB/s | 934 kB     00:00    
(3/10): grub2-efi-ia32-cdboot-2.06~rc1-2.fc34.x86_64.rpm                                                           2.3 MB/s | 1.4 MB     00:00    
(4/10): grub2-pc-modules-2.06~rc1-2.fc34.noarch.rpm                                                                3.2 MB/s | 912 kB     00:00    
(5/10): grub2-tools-2.06~rc1-2.fc34.x86_64.rpm                                                                     3.8 MB/s | 1.9 MB     00:00    
(6/10): grub2-tools-efi-2.06~rc1-2.fc34.x86_64.rpm                                                                 1.8 MB/s | 552 kB     00:00    
(7/10): grub2-tools-extra-2.06~rc1-2.fc34.x86_64.rpm                                                               2.8 MB/s | 855 kB     00:00    
(8/10): grub2-tools-minimal-2.06~rc1-2.fc34.x86_64.rpm                                                             3.9 MB/s | 612 kB     00:00    
(9/10): grub2-pc-2.06~rc1-2.fc34.x86_64.rpm                                                                         11 kB/s |  19 kB     00:01    
(10/10): grub2-efi-x64-2.06~rc1-2.fc34.x86_64.rpm                                                                  218 kB/s | 499 kB     00:02    
---------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                              2.5 MB/s | 8.0 MB     00:03     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                           1/1 
  Reinstalling     : grub2-common-1:2.06~rc1-2.fc34.noarch                                                                                    1/20 
  Reinstalling     : grub2-tools-minimal-1:2.06~rc1-2.fc34.x86_64                                                                             2/20 
  Running scriptlet: grub2-tools-1:2.06~rc1-2.fc34.x86_64                                                                                     3/20 
  Reinstalling     : grub2-tools-1:2.06~rc1-2.fc34.x86_64                                                                                     3/20 
  Reinstalling     : grub2-pc-modules-1:2.06~rc1-2.fc34.noarch                                                                                4/20 
  Reinstalling     : grub2-pc-1:2.06~rc1-2.fc34.x86_64                                                                                        5/20 
  Reinstalling     : grub2-efi-ia32-1:2.06~rc1-2.fc34.x86_64                                                                                  6/20 
  Reinstalling     : grub2-efi-x64-1:2.06~rc1-2.fc34.x86_64                                                                                   7/20 
  Reinstalling     : grub2-tools-extra-1:2.06~rc1-2.fc34.x86_64                                                                               8/20 
  Reinstalling     : grub2-efi-ia32-cdboot-1:2.06~rc1-2.fc34.x86_64                                                                           9/20 
  Reinstalling     : grub2-tools-efi-1:2.06~rc1-2.fc34.x86_64                                                                                10/20 
  Cleanup          : grub2-pc-1:2.06~rc1-2.fc34.x86_64                                                                                       11/20 
  Cleanup          : grub2-efi-x64-1:2.06~rc1-2.fc34.x86_64                                                                                  12/20 
  Cleanup          : grub2-efi-ia32-1:2.06~rc1-2.fc34.x86_64                                                                                 13/20 
  Cleanup          : grub2-pc-modules-1:2.06~rc1-2.fc34.noarch                                                                               14/20 
  Cleanup          : grub2-efi-ia32-cdboot-1:2.06~rc1-2.fc34.x86_64                                                                          15/20 
  Cleanup          : grub2-tools-extra-1:2.06~rc1-2.fc34.x86_64                                                                              16/20 
  Cleanup          : grub2-tools-minimal-1:2.06~rc1-2.fc34.x86_64                                                                            17/20 
  Cleanup          : grub2-tools-1:2.06~rc1-2.fc34.x86_64                                                                                    18/20 
  Cleanup          : grub2-tools-efi-1:2.06~rc1-2.fc34.x86_64                                                                                19/20 
  Cleanup          : grub2-common-1:2.06~rc1-2.fc34.noarch                                                                                   20/20 
  Running scriptlet: grub2-common-1:2.06~rc1-2.fc34.noarch                                                                                   20/20 
  Verifying        : grub2-common-1:2.06~rc1-2.fc34.noarch                                                                                    1/20 
  Verifying        : grub2-common-1:2.06~rc1-2.fc34.noarch                                                                                    2/20 
  Verifying        : grub2-efi-ia32-1:2.06~rc1-2.fc34.x86_64                                                                                  3/20 
  Verifying        : grub2-efi-ia32-1:2.06~rc1-2.fc34.x86_64                                                                                  4/20 
  Verifying        : grub2-efi-ia32-cdboot-1:2.06~rc1-2.fc34.x86_64                                                                           5/20 
  Verifying        : grub2-efi-ia32-cdboot-1:2.06~rc1-2.fc34.x86_64                                                                           6/20 
  Verifying        : grub2-efi-x64-1:2.06~rc1-2.fc34.x86_64                                                                                   7/20 
  Verifying        : grub2-efi-x64-1:2.06~rc1-2.fc34.x86_64                                                                                   8/20 
  Verifying        : grub2-pc-1:2.06~rc1-2.fc34.x86_64                                                                                        9/20 
  Verifying        : grub2-pc-1:2.06~rc1-2.fc34.x86_64                                                                                       10/20 
  Verifying        : grub2-pc-modules-1:2.06~rc1-2.fc34.noarch                                                                               11/20 
  Verifying        : grub2-pc-modules-1:2.06~rc1-2.fc34.noarch                                                                               12/20 
  Verifying        : grub2-tools-1:2.06~rc1-2.fc34.x86_64                                                                                    13/20 
  Verifying        : grub2-tools-1:2.06~rc1-2.fc34.x86_64                                                                                    14/20 
  Verifying        : grub2-tools-efi-1:2.06~rc1-2.fc34.x86_64                                                                                15/20 
  Verifying        : grub2-tools-efi-1:2.06~rc1-2.fc34.x86_64                                                                                16/20 
  Verifying        : grub2-tools-extra-1:2.06~rc1-2.fc34.x86_64                                                                              17/20 
  Verifying        : grub2-tools-extra-1:2.06~rc1-2.fc34.x86_64                                                                              18/20 
  Verifying        : grub2-tools-minimal-1:2.06~rc1-2.fc34.x86_64                                                                            19/20 
  Verifying        : grub2-tools-minimal-1:2.06~rc1-2.fc34.x86_64                                                                            20/20 

Reinstalled:
  grub2-common-1:2.06~rc1-2.fc34.noarch            grub2-efi-ia32-1:2.06~rc1-2.fc34.x86_64      grub2-efi-ia32-cdboot-1:2.06~rc1-2.fc34.x86_64    
  grub2-efi-x64-1:2.06~rc1-2.fc34.x86_64           grub2-pc-1:2.06~rc1-2.fc34.x86_64            grub2-pc-modules-1:2.06~rc1-2.fc34.noarch         
  grub2-tools-1:2.06~rc1-2.fc34.x86_64             grub2-tools-efi-1:2.06~rc1-2.fc34.x86_64     grub2-tools-extra-1:2.06~rc1-2.fc34.x86_64        
  grub2-tools-minimal-1:2.06~rc1-2.fc34.x86_64    

Complete!

Comment 26 Javier Martinez Canillas 2021-03-25 23:02:24 UTC
(In reply to msmafra from comment #25)
> Sorry about he delay.
> 
> ❯ doas cp -v /boot/grub2/grubenv /boot/efi/EFI/fedora/grubenv
> '/boot/grub2/grubenv' -> '/boot/efi/EFI/fedora/grubenv'
> 

Thanks for testing that. I've modified the %posttrans scriptlet
to not fail if the grubenv file isn't present in the ESP:

https://bodhi.fedoraproject.org/updates/FEDORA-2021-ee8707a6af

Comment 27 Fedora Update System 2021-03-26 00:16:40 UTC
FEDORA-2021-c5ed9c3970 has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 28 msmafra 2021-03-26 11:26:42 UTC
(In reply to Javier Martinez Canillas from comment #26)
> (In reply to msmafra from comment #25)
> > Sorry about he delay.
> > 
> > ❯ doas cp -v /boot/grub2/grubenv /boot/efi/EFI/fedora/grubenv
> > '/boot/grub2/grubenv' -> '/boot/efi/EFI/fedora/grubenv'
> > 
> 
> Thanks for testing that. I've modified the %posttrans scriptlet
> to not fail if the grubenv file isn't present in the ESP:
> 
> https://bodhi.fedoraproject.org/updates/FEDORA-2021-ee8707a6af

You're welcome. I'll give the feedback when I'm able to test it.

Comment 29 msmafra 2021-03-27 17:05:20 UTC
Hello.
It is working now. Thanks

❯ doas grub2-mkconfig --version
grub2-mkconfig (GRUB) 2.06~rc1


❯ doas ls -halt /boot/loader/entries/
total 24K
drwx------. 2 root root 4.0K Mar 27 11:40 .
-rw-r--r--. 1 root root  549 Mar 27 11:40 e97c184598fb4b3caa95a68a5657ee3d-0-rescue.conf
-rw-r--r--. 1 root root  473 Mar 27 11:40 e97c184598fb4b3caa95a68a5657ee3d-5.11.7-300.fc34.x86_64.conf
-rw-r--r--. 1 root root  473 Mar 27 11:40 e97c184598fb4b3caa95a68a5657ee3d-5.11.8-300.fc34.x86_64.conf
-rw-r--r--. 1 root root  473 Mar 27 11:40 e97c184598fb4b3caa95a68a5657ee3d-5.11.9-300.fc34.x86_64.conf
drwxr-xr-x. 3 root root 4.0K Mar 21 19:36 ..


❯ doas dnf info --installed | grep -E "grub2"
Name         : grub2-common
Source       : grub2-2.06~rc1-3.fc34.src.rpm
Summary      : grub2 common layout
Description  : This package provides some directories which are required by various grub2
Name         : grub2-efi-ia32
Source       : grub2-2.06~rc1-3.fc34.src.rpm
Name         : grub2-efi-ia32-cdboot
Source       : grub2-2.06~rc1-3.fc34.src.rpm
Name         : grub2-efi-x64
Source       : grub2-2.06~rc1-3.fc34.src.rpm
Name         : grub2-pc
Source       : grub2-2.06~rc1-3.fc34.src.rpm
Name         : grub2-pc-modules
Source       : grub2-2.06~rc1-3.fc34.src.rpm
Name         : grub2-tools
Source       : grub2-2.06~rc1-3.fc34.src.rpm
Name         : grub2-tools-efi
Source       : grub2-2.06~rc1-3.fc34.src.rpm
Name         : grub2-tools-extra
Source       : grub2-2.06~rc1-3.fc34.src.rpm
Name         : grub2-tools-minimal
Source       : grub2-2.06~rc1-3.fc34.src.rpm


❯ doas dnf -y reinstall $(doas -- dnf info --installed | grep -e grub | grep "Name         :" | awk -F" :" '{printf $2}' | tr -d "\n")
Last metadata expiration check: 2:44:21 ago on Sat Mar 27 09:07:26 2021.
Dependencies resolved.
===================================================================================================================================================
 Package                                  Architecture              Version                               Repository                          Size
===================================================================================================================================================
Reinstalling:
 grub2-common                             noarch                    1:2.06~rc1-3.fc34                     updates-testing                    935 k
 grub2-efi-ia32                           x86_64                    1:2.06~rc1-3.fc34                     updates-testing                    470 k
 grub2-efi-ia32-cdboot                    x86_64                    1:2.06~rc1-3.fc34                     updates-testing                    1.4 M
 grub2-efi-x64                            x86_64                    1:2.06~rc1-3.fc34                     updates-testing                    499 k
 grub2-pc                                 x86_64                    1:2.06~rc1-3.fc34                     updates-testing                     19 k
 grub2-pc-modules                         noarch                    1:2.06~rc1-3.fc34                     updates-testing                    912 k
 grub2-tools                              x86_64                    1:2.06~rc1-3.fc34                     updates-testing                    1.8 M
 grub2-tools-efi                          x86_64                    1:2.06~rc1-3.fc34                     updates-testing                    552 k
 grub2-tools-extra                        x86_64                    1:2.06~rc1-3.fc34                     updates-testing                    855 k
 grub2-tools-minimal                      x86_64                    1:2.06~rc1-3.fc34                     updates-testing                    612 k

Transaction Summary
===================================================================================================================================================

Total download size: 8.0 M
Installed size: 35 M
Downloading Packages:
(1/10): grub2-efi-ia32-2.06~rc1-3.fc34.x86_64.rpm                                                                  859 kB/s | 470 kB     00:00    
(2/10): grub2-common-2.06~rc1-3.fc34.noarch.rpm                                                                    1.1 MB/s | 935 kB     00:00    
(3/10): grub2-efi-ia32-cdboot-2.06~rc1-3.fc34.x86_64.rpm                                                           1.7 MB/s | 1.4 MB     00:00    
(4/10): grub2-pc-modules-2.06~rc1-3.fc34.noarch.rpm                                                                2.9 MB/s | 912 kB     00:00    
(5/10): grub2-tools-efi-2.06~rc1-3.fc34.x86_64.rpm                                                                 2.1 MB/s | 552 kB     00:00    
(6/10): grub2-tools-extra-2.06~rc1-3.fc34.x86_64.rpm                                                               2.7 MB/s | 855 kB     00:00    
(7/10): grub2-tools-2.06~rc1-3.fc34.x86_64.rpm                                                                     4.6 MB/s | 1.8 MB     00:00    
(8/10): grub2-tools-minimal-2.06~rc1-3.fc34.x86_64.rpm                                                             3.7 MB/s | 612 kB     00:00    
(9/10): grub2-pc-2.06~rc1-3.fc34.x86_64.rpm                                                                         11 kB/s |  19 kB     00:01    
(10/10): grub2-efi-x64-2.06~rc1-3.fc34.x86_64.rpm                                                                  220 kB/s | 499 kB     00:02    
---------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                              2.4 MB/s | 8.0 MB     00:03     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                           1/1 
  Reinstalling     : grub2-common-1:2.06~rc1-3.fc34.noarch                                                                                    1/20 
  Reinstalling     : grub2-tools-minimal-1:2.06~rc1-3.fc34.x86_64                                                                             2/20 
  Running scriptlet: grub2-tools-1:2.06~rc1-3.fc34.x86_64                                                                                     3/20 
  Reinstalling     : grub2-tools-1:2.06~rc1-3.fc34.x86_64                                                                                     3/20 
  Reinstalling     : grub2-pc-modules-1:2.06~rc1-3.fc34.noarch                                                                                4/20 
  Reinstalling     : grub2-pc-1:2.06~rc1-3.fc34.x86_64                                                                                        5/20 
  Reinstalling     : grub2-efi-ia32-1:2.06~rc1-3.fc34.x86_64                                                                                  6/20 
  Reinstalling     : grub2-efi-x64-1:2.06~rc1-3.fc34.x86_64                                                                                   7/20 
  Reinstalling     : grub2-tools-extra-1:2.06~rc1-3.fc34.x86_64                                                                               8/20 
  Reinstalling     : grub2-efi-ia32-cdboot-1:2.06~rc1-3.fc34.x86_64                                                                           9/20 
  Reinstalling     : grub2-tools-efi-1:2.06~rc1-3.fc34.x86_64                                                                                10/20 
  Cleanup          : grub2-pc-1:2.06~rc1-3.fc34.x86_64                                                                                       11/20 
  Cleanup          : grub2-efi-x64-1:2.06~rc1-3.fc34.x86_64                                                                                  12/20 
  Cleanup          : grub2-efi-ia32-1:2.06~rc1-3.fc34.x86_64                                                                                 13/20 
  Cleanup          : grub2-pc-modules-1:2.06~rc1-3.fc34.noarch                                                                               14/20 
  Cleanup          : grub2-efi-ia32-cdboot-1:2.06~rc1-3.fc34.x86_64                                                                          15/20 
  Cleanup          : grub2-tools-extra-1:2.06~rc1-3.fc34.x86_64                                                                              16/20 
  Cleanup          : grub2-tools-minimal-1:2.06~rc1-3.fc34.x86_64                                                                            17/20 
  Cleanup          : grub2-tools-1:2.06~rc1-3.fc34.x86_64                                                                                    18/20 
  Cleanup          : grub2-tools-efi-1:2.06~rc1-3.fc34.x86_64                                                                                19/20 
  Cleanup          : grub2-common-1:2.06~rc1-3.fc34.noarch                                                                                   20/20 
  Running scriptlet: grub2-common-1:2.06~rc1-3.fc34.noarch                                                                                   20/20 
  Verifying        : grub2-common-1:2.06~rc1-3.fc34.noarch                                                                                    1/20 
  Verifying        : grub2-common-1:2.06~rc1-3.fc34.noarch                                                                                    2/20 
  Verifying        : grub2-efi-ia32-1:2.06~rc1-3.fc34.x86_64                                                                                  3/20 
  Verifying        : grub2-efi-ia32-1:2.06~rc1-3.fc34.x86_64                                                                                  4/20 
  Verifying        : grub2-efi-ia32-cdboot-1:2.06~rc1-3.fc34.x86_64                                                                           5/20 
  Verifying        : grub2-efi-ia32-cdboot-1:2.06~rc1-3.fc34.x86_64                                                                           6/20 
  Verifying        : grub2-efi-x64-1:2.06~rc1-3.fc34.x86_64                                                                                   7/20 
  Verifying        : grub2-efi-x64-1:2.06~rc1-3.fc34.x86_64                                                                                   8/20 
  Verifying        : grub2-pc-1:2.06~rc1-3.fc34.x86_64                                                                                        9/20 
  Verifying        : grub2-pc-1:2.06~rc1-3.fc34.x86_64                                                                                       10/20 
  Verifying        : grub2-pc-modules-1:2.06~rc1-3.fc34.noarch                                                                               11/20 
  Verifying        : grub2-pc-modules-1:2.06~rc1-3.fc34.noarch                                                                               12/20 
  Verifying        : grub2-tools-1:2.06~rc1-3.fc34.x86_64                                                                                    13/20 
  Verifying        : grub2-tools-1:2.06~rc1-3.fc34.x86_64                                                                                    14/20 
  Verifying        : grub2-tools-efi-1:2.06~rc1-3.fc34.x86_64                                                                                15/20 
  Verifying        : grub2-tools-efi-1:2.06~rc1-3.fc34.x86_64                                                                                16/20 
  Verifying        : grub2-tools-extra-1:2.06~rc1-3.fc34.x86_64                                                                              17/20 
  Verifying        : grub2-tools-extra-1:2.06~rc1-3.fc34.x86_64                                                                              18/20 
  Verifying        : grub2-tools-minimal-1:2.06~rc1-3.fc34.x86_64                                                                            19/20 
  Verifying        : grub2-tools-minimal-1:2.06~rc1-3.fc34.x86_64                                                                            20/20 

Reinstalled:
  grub2-common-1:2.06~rc1-3.fc34.noarch            grub2-efi-ia32-1:2.06~rc1-3.fc34.x86_64      grub2-efi-ia32-cdboot-1:2.06~rc1-3.fc34.x86_64    
  grub2-efi-x64-1:2.06~rc1-3.fc34.x86_64           grub2-pc-1:2.06~rc1-3.fc34.x86_64            grub2-pc-modules-1:2.06~rc1-3.fc34.noarch         
  grub2-tools-1:2.06~rc1-3.fc34.x86_64             grub2-tools-efi-1:2.06~rc1-3.fc34.x86_64     grub2-tools-extra-1:2.06~rc1-3.fc34.x86_64        
  grub2-tools-minimal-1:2.06~rc1-3.fc34.x86_64    

Complete!

❯ doas ls -halt /boot/loader/entries/
total 24K
-rw-r--r--. 1 root root  549 Mar 27 11:40 e97c184598fb4b3caa95a68a5657ee3d-0-rescue.conf
-rw-r--r--. 1 root root  473 Mar 27 11:40 e97c184598fb4b3caa95a68a5657ee3d-5.11.7-300.fc34.x86_64.conf
-rw-r--r--. 1 root root  473 Mar 27 11:40 e97c184598fb4b3caa95a68a5657ee3d-5.11.8-300.fc34.x86_64.conf
-rw-r--r--. 1 root root  473 Mar 27 11:40 e97c184598fb4b3caa95a68a5657ee3d-5.11.9-300.fc34.x86_64.conf

❯ doas grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Adding boot menu entry for UEFI Firmware Settings ...
done
❯ doas ls -halt /boot/loader/entries/
total 24K
drwx------. 2 root root 4.0K Mar 27 13:41 .
-rw-r--r--. 1 root root  549 Mar 27 13:41 e97c184598fb4b3caa95a68a5657ee3d-0-rescue.conf
-rw-r--r--. 1 root root  473 Mar 27 13:41 e97c184598fb4b3caa95a68a5657ee3d-5.11.7-300.fc34.x86_64.conf
-rw-r--r--. 1 root root  473 Mar 27 13:41 e97c184598fb4b3caa95a68a5657ee3d-5.11.8-300.fc34.x86_64.conf
-rw-r--r--. 1 root root  473 Mar 27 13:41 e97c184598fb4b3caa95a68a5657ee3d-5.11.9-300.fc34.x86_64.conf


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