Skip to content

Commit

Permalink
Fixed secure boot fallback setup
Browse files Browse the repository at this point in the history
Make sure MokManager gets copied. This Fixes bsc#1187515
  • Loading branch information
schaefi committed Jul 6, 2021
1 parent e0daf1a commit 4cbc733
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions kiwi/bootloader/config/grub2.py
Original file line number Diff line number Diff line change
Expand Up @@ -750,6 +750,12 @@ def _setup_secure_boot_efi_image(self, lookup_path, uuid=None, mbrid=None):
os.sep.join([self.efi_boot_path, grub_image.binaryname])
]
)
mok_manager = os.sep.join(
[os.path.dirname(shim_image), 'MokManager.efi']
)
Command.run(
['cp', mok_manager, self.efi_boot_path]
)
else:
# Without shim a self signed grub image is used that
# gets loaded by the firmware
Expand Down
12 changes: 12 additions & 0 deletions test/unit/bootloader/config/grub2_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1358,6 +1358,12 @@ def side_effect_glob(arg):
'cp', 'root_dir/usr/lib64/efi/grub.efi',
'root_dir/boot/efi/EFI/BOOT/grub.efi'
]
),
call(
[
'cp', 'root_dir/usr/lib64/efi/MokManager.efi',
'root_dir/boot/efi/EFI/BOOT'
]
)
]

Expand Down Expand Up @@ -1722,6 +1728,12 @@ def side_effect_glob(arg):
'cp', 'root_dir/usr/lib64/efi/grub.efi',
'root_dir/EFI/BOOT/grub.efi'
]
),
call(
[
'cp', 'root_dir/usr/lib64/efi/MokManager.efi',
'root_dir/EFI/BOOT'
]
)
]

Expand Down

0 comments on commit 4cbc733

Please sign in to comment.