diff --git a/subiquity/common/types.py b/subiquity/common/types.py index 73e05b8f..712f2699 100644 --- a/subiquity/common/types.py +++ b/subiquity/common/types.py @@ -388,6 +388,7 @@ class GuidedDisallowedCapabilityReason(enum.Enum): TOO_SMALL = enum.auto() CORE_BOOT_ENCRYPTION_UNAVAILABLE = enum.auto() NOT_UEFI = enum.auto() + THIRD_PARTY_DRIVERS = enum.auto() @attr.s(auto_attribs=True) diff --git a/subiquity/server/controllers/filesystem.py b/subiquity/server/controllers/filesystem.py index 6919d871..fbb4aec1 100644 --- a/subiquity/server/controllers/filesystem.py +++ b/subiquity/server/controllers/filesystem.py @@ -419,7 +419,23 @@ class FilesystemController(SubiquityController, FilesystemManipulator): info.capability_info.disallow_if( lambda cap: cap.is_core_boot(), GuidedDisallowedCapabilityReason.NOT_UEFI, - "Enhanced secure boot options only available on UEFI systems.", + _( + "Enhanced secure boot options only available on UEFI " + "systems." + ), + ) + if self.app.base_model.source.search_drivers: + log.debug( + "Disabling core boot based install options as third-party " + "drivers selected" + ) + info.capability_info.disallow_if( + lambda cap: cap.is_core_boot(), + GuidedDisallowedCapabilityReason.THIRD_PARTY_DRIVERS, + _( + "Enhanced secure boot options cannot currently install " + "third party drivers." + ), ) self._variation_info[name] = info elif catalog_entry.type.startswith("dd-"): diff --git a/subiquity/server/controllers/tests/test_filesystem.py b/subiquity/server/controllers/tests/test_filesystem.py index f891d789..36fd47cb 100644 --- a/subiquity/server/controllers/tests/test_filesystem.py +++ b/subiquity/server/controllers/tests/test_filesystem.py @@ -1144,6 +1144,7 @@ class TestCoreBootInstallMethods(IsolatedAsyncioTestCase): self.app.dr_cfg = DRConfig() self.app.dr_cfg.systems_dir_exists = True self.app.controllers.Source.get_handler.return_value = TrivialSourceHandler("") + self.app.base_model.source.search_drivers = False self.fsc = FilesystemController(app=self.app) self.fsc._configured = True self.fsc.model = make_model(Bootloader.UEFI)