Skip to content

Conversation

@schaefi
Copy link
Collaborator

@schaefi schaefi commented Apr 11, 2025

If the bootloader attribute: bls is set to true, make sure the LOADER_TYPE changes to grub-bls. This is related to Issue #2773

@schaefi schaefi requested a review from Conan-Kudo April 11, 2025 08:50
@schaefi schaefi self-assigned this Apr 11, 2025
@schaefi
Copy link
Collaborator Author

schaefi commented Apr 11, 2025

@Conan-Kudo I know things are different on Fedora and RHEL regarding BLS and I believe it is just working there. At least that's what my integration tests tell me. The same applies to Ubuntu and the implementation in kiwi for grub just makes use of the available grub tooling. There is a conversation about the setting of the LOADER_TYPE in the referenced Issue #2773. I would be very much interested how this is handled in Fedora and RHEL and if we maybe need to adapt more kiwi code.

The change here is tightly coupled to the bls attribute. Thus users have a chance to control it. That's why I think the change here is safe and useful but to be honest all about BLS is so confusing and I thought with the spec things should be easy and not so messy

Alternatively it would also be possible to implement a complete new bootloader class only for BLS. But I'm only open for this if it can be done in a generic way for all OS'es

Thanks

@aplanas
Copy link
Contributor

aplanas commented Apr 11, 2025

If the bootloader attribute: bls is set to true, make sure the LOADER_TYPE changes to grub-bls

Should be LOADER_TYPE="grub2-bls", as is recognized by update-bootloader

(Moving from #2773 (comment))

Look, many other OS'es uses BLS as the default and we don't set the LOADER_TYPE to grub2-bls on any of them because it's a setting for the system boot architecture and it's working as such on all of them.

Are they using update-bootloader? This file in /etc/sysconfig/bootloader does now have an owner, and it is generated by YaST, but I thought that main consumer as always pbl. Is this a cross-distro file?

From a plain boot technology it makes a huge difference if you need boot code at some offset that you jump to (BIOS) or if you boot through a firmware and its layout requirements (EFI). Therefore the loader type setting to grub2 or grub2-efi made sense to me.

Ah, but this is not only about the UEFI/BIOS separation, is about the kind of installed bootloader. Another possible value for LOADER_TYPE is systemd-boot

Well if the system is EFI it stays EFI and a lot of actions must be the same because EFI is EFI

No, they are totally different. The ESP (an EFI artifact) is managed very different in the case of grub2-efi or systemd-boot. In this case, grub2-efi is almost identical to systemd-boot.

Don't get me wrong but everyone is cooking its own soup here and all this is making our lives unbelievable complicated. I'm very concerned that I won't be able to map what SUSE is doing with grub BLS into kiwi in a generic way.

I understand. I would be OK if this is not implemented at all. At least not until there is an official BLS support from GRUB2.

With grub2-bls we decided to move to a different path, more close to systemd-boot, with the hope to unify all the BLS under bootctl and the systemd tools.

In this case GRUB_ENABLE_BLSCFG is just wrong. For example, with grub2-bls there is no place to put this variable (there is no grub.conf not in ESP nor in /etc). grub2-bls is just a file that you copy into the ESP, and all the theme is embedded there (grubenv is used as the load.conf from systemd-boot)

@Conan-Kudo
Copy link
Member

We need to put the /etc/sysconfig/bootloader logic on the chopping block for kiwi 11. There's no reason that this shouldn't just be configured in config.sh like every other distribution's weird config files.

@schaefi schaefi force-pushed the fix_grub_loader_type_for_bls branch from 550a222 to 28d597a Compare April 11, 2025 14:58
@schaefi
Copy link
Collaborator Author

schaefi commented Apr 11, 2025

Should be LOADER_TYPE="grub2-bls", as is recognized by update-bootloader

typo in my commit text, the code was doing it right :) fixed

@Conan-Kudo
Copy link
Member

This commit needs to make it clear that it's about the SUSE-only /etc/sysconfig/bootloader file used by perl-Bootloader.

@schaefi
Copy link
Collaborator Author

schaefi commented Apr 11, 2025

We need to put the /etc/sysconfig/bootloader logic on the chopping block for kiwi 11. There's no reason that this shouldn't just be configured in config.sh like every other distribution's weird config files.

So you are suggesting that we drop this from kiwi ? Consequently this would also mean to drop what kiwi does on /etc/default/grub. It would make things easier for us but it could lead to broken builds by default. Anyway it would be a behavior change that we cannot afford before v11 as you mentioned

@Conan-Kudo
Copy link
Member

/etc/default/grub is mainline GRUB configuration file. /etc/sysconfig/bootloader is for perl-bootloader. We don't have anything for grubby in kiwi either.

@schaefi
Copy link
Collaborator Author

schaefi commented Apr 22, 2025

/etc/default/grub is mainline GRUB configuration file. /etc/sysconfig/bootloader is for perl-bootloader. We don't have anything for grubby in kiwi either.

Hmm, that is actually a good point. Getting rid of all the code that messes with /etc/sysconfig/bootloader would be indeed great

@Conan-Kudo
Copy link
Member

If we're okay with dropping it now in kiwi 10, we could, but all the SUSE kiwi descriptions need to be updated for such an incompatibility...

If the bootloader attribute: bls is set to true, make sure
the LOADER_TYPE changes to grub2-bls. This is related to
Issue #2773
@schaefi schaefi force-pushed the fix_grub_loader_type_for_bls branch from 28d597a to cf5f01a Compare April 24, 2025 10:50
@schaefi
Copy link
Collaborator Author

schaefi commented Apr 24, 2025

I created #2783 to drop writing /etc/sysconfig/bootloader beginning with kiwi-11

  • I don't want to add incompatible changes in the v10 code base.
  • I added a comment to the method in grub that it will be deleted with the next major version of kiwi because not a mainline grub config file

@schaefi
Copy link
Collaborator Author

schaefi commented Apr 24, 2025

@Conan-Kudo can you redo the review please ? Thanks

@Conan-Kudo Conan-Kudo merged commit 11c69bf into main Apr 24, 2025
14 checks passed
@Conan-Kudo Conan-Kudo deleted the fix_grub_loader_type_for_bls branch April 24, 2025 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants