#630 [f41] bootupd: Force enable BLS support in GRUB
Closed by siosm. Opened by siosm.
Unknown source f41

Download 630.patch

bootupd: Force enable BLS support in GRUB

Until Fedora 41, the bootloader entries were duplicated in the GRUB boot
menu as both the BLS configs and the ostree-grub2 static entries where
included and loaded in the GRUB config.

With the bootloader being updated and system being migrated to a static
GRUB config as part of the composefs support, we now want to rely on BLS
configs only.

The Fedora 31 release notes 1 suggested disabling BLS support in GRUB
to remove the duplicate entries.

We thus need to make sure that this support is turned back in the GRUB
config before systems are updated to F42.

See: https://gitlab.com/fedora/ostree/sig/-/issues/35
See: https://github.com/coreos/bootupd/issues/857


comps-sync f41 2025-03-12

See: https://pagure.io/fedora-comps/pull-request/1088
See: https://pagure.io/fedora-comps/pull-request/1099

This is only for F41 where we have bootupd enabled by default. We might backport it to F40 as well.

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci
https://fedora.softwarefactory-project.io/zuul/buildset/4fa4b6c561774b7c97c1d208a90bd171

Do we need to check if existing -f '/etc/default/grub' && as can not find it on f41

# systemctl start atomic-enable-grub-bls-support.service
# journalctl -u atomic-enable-grub-bls-support.service
Mar 12 03:14:56 fedora systemd[1]: Starting atomic-enable-grub-bls-support.service - Force enable BLS support in GRUB config...
Mar 12 03:14:56 fedora bash[3687]: grep: /etc/default/grub: No such file or directory
Mar 12 03:14:56 fedora bash[3688]: sed: can't read /etc/default/grub: No such file or directory
Mar 12 03:14:56 fedora systemd[1]: Finished atomic-enable-grub-bls-support.service - Force enable BLS support in GRUB config.

rebased onto 578562dc98617ef8fcdee83e17bbdfe9acf9bd9b

Good catch. Updated

1 new commit added

  • comps-sync f41 2025-03-12

Build succeeded.
https://fedora.softwarefactory-project.io/zuul/buildset/138334e6dea74e48bcde46157ace32eb

LGTM, one small question: if there is no such GRUB_ENABLE_BLSCFG=false or even no /etc/default/grub, blscfg is default enabled, right?

If /etc/default/grub does not exists then it should mean that the system has been installed from Fedora 41 and should be using a static GRUB config already with BLS enabled.

If GRUB_ENABLE_BLSCFG= is not present in /etc/default/grub then this script should add it.

Did some testing and this resulted in an unbootable system so will need more investigation.

Note: Disabling BLS support resulted in an unbootable system, not this change.

Did some testing and this resulted in an unbootable system so will need more investigation.

I might misunderstood, this is just to update GRUB_ENABLE_BLSCFG=false -> GRUB_ENABLE_BLSCFG=true, in which situation it would fail?

I did the following:
- Installed a Silverblue 40 system
- Updated it to F41
- Set GRUB_ENABLE_BLSCFG to false in /etc/default/grub
- Rebase to a test F41 container image with this change: https://quay.io/repository/travier/silverblue-devel?tab=tags

and it failed to boot due a GRUB config error.

I have not investigated more yet.

rebased onto 85efe9a9b1ab74a393fa451c2768c584b478b892

Build succeeded.
https://fedora.softwarefactory-project.io/zuul/buildset/53499453c22d430295daff2fa6169eb4

  • Installed a Silverblue 40 system
  • Set GRUB_ENABLE_BLSCFG=false in /etc/default/grub
  • Update it to F41

Reboot failed and get: Can not find command linux16, not sure if it is the same with you, will try to find out the reason.

Look at more about this, for error Can not find command linux16, with GRUB_ENABLE_BLSCFG=false, we need to depend on grub2-mkconfig to create legacy grub.cfg, that would call ostree admin instutil grub2-generate, and linux16 is defined at https://github.com/ostreedev/ostree/blob/main/src/libostree/ostree-bootloader-grub2.c#L41, so I think we should enable modern-grub to add --with-modern-grub=yes which will use linux without suffix 16.

So this is https://github.com/coreos/bootupd/issues/857#issuecomment-3013257311. I don't think we'll work on that here.

Pull-Request has been closed by siosm

Metadata