We don't fail if the stub is not installed and a bootable image is
explicitly requested as this is handled later on already in build_uki().
):
return
- if state.config.architecture.to_efi() is None and state.config.bootable == ConfigFeature.auto:
+ if (arch := state.config.architecture.to_efi()) is None and state.config.bootable == ConfigFeature.auto:
+ return
+
+ stub = state.root / f"usr/lib/systemd/boot/efi/linux{arch}.efi.stub"
+ if not stub.exists() and state.config.bootable == ConfigFeature.auto:
return
roothash = finalize_roothash(partitions)