Why does Grub2 present twice/double menuentry for each ostree entry

Hi all !

I have three Silverblue deployments

$ rpm-ostree status
State: idle
Deployments:
● ostree://fedora:fedora/34/x86_64/silverblue
                   Version: 34.20210423.n.0 (2021-04-23T08:10:25Z)
                
  ostree://fedora:fedora/34/x86_64/silverblue
                   Version: 34.20210423.n.0 (2021-04-23T08:10:25Z)
                
  ostree://fedora:fedora/34/x86_64/silverblue
                   Version: 34.20210423.n.0 (2021-04-23T08:10:25Z)
          

They match the three ostree entries

$ sudo tree /boot/loader
/boot/loader
β”œβ”€β”€ entries
β”‚   β”œβ”€β”€ ostree-1-fedora.conf
β”‚   β”œβ”€β”€ ostree-2-fedora.conf
β”‚   └── ostree-3-fedora.conf

Thus using blscfg , as I understand it, I should have the corresponding GRUB2 menuentries:

menuentry 'Fedora 34.20210423.n.0 (Silverblue) (ostree:0)' 
menuentry 'Fedora 34.20210423.n.0 (Silverblue) (ostree:1)' 
menuentry 'Fedora 34.20210423.n.0 (Silverblue) (ostree:2)'

So why does GRUB2 present me with 6 menuentries ? they seem doubled …
What are they for ?

Thanks

See this:

And:
https://fedoraproject.org/wiki/Changes/BootLoaderSpecByDefault#Config_files_provided_by_kernel.2C_grub2-switch-to-blscfg.2C_and_zipl-switch-to-blscfg

1 Like

I have the same issue, it should be solved by the bootupd migration. Changes/FedoraSilverblueBootupd - Fedora Project Wiki

Relevant issue: Use bootupd and remove ostree-grub2 (was: All deployments are shown twice in grub) Β· Issue #120 Β· fedora-silverblue/issue-tracker Β· GitHub

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.

1 Like

Running sudo grub2-switch-to-blscfg did not work for me on Kinoite 37. I get an error
/usr/bin/grub2-editenv: error: invalid environment block.

Are you on EFI? If not, perhaps this could help grub2: Don't add menu entries if GRUB supports parsing BLS snippets by martinezjavier Β· Pull Request #2044 Β· ostreedev/ostree Β· GitHub

1 Like

Any updates on this ? on F39 sb im facing the same problem. If i do this command will mess my grub with windows on it ?

2 Likes