Running sudo grub2-switch-to-blscfg migrated the grub config and removed the duplicate entries for me on Silverblue 37 (installed as 36). I’d imagine new installs from 38 up won’t have this issue anymore.
I am having the same issue on Fedora Silverblue 40 & grub 2.06. It is especially annoying when using grub boot menu. What code generates duplicate entries? And can it be patched?
If no one is up to the task, can anyone share any starting points? I guess first place to look will be grub2 source code? Or rpm-ostree source code?
I recently checked grub.cfg on a kinoite system, and it contains old pre-bls entries for the kernels and in addition it also reads the bls files for the same kernels. Seems likely to be a bug in rpm-ostree related to kernel updates.
Both of the quoted links are about whether or not use bootupd to transfer the shim and grub2 .efi file to the ESP file system. That is not related to whether to use bls configuration or old style grub.cfg configuration without bls. Or in this case use both at the same time.
Old systems shipped with a GRUB that did not support BLS configs. Until we’ve made sure that everyone got they bootloader updated (thus the dependency on bootupd), we need to keep generating the older entries alongside the new BLS ones as we don’t know if they will be displayed by the GRUB installed on the system.
If people haven’t upgraded the grub2 and shim modules in the ESPyet, then they wouldn’t be able to boot because of the new Fedora key in the new shim version.