Skip to content
This repository was archived by the owner on Jan 20, 2023. It is now read-only.

Commit b126348

Browse files
committed
Fix registration of KeyTool in the bootloader
This accidentally used the complete path, rather than the relative path in the ESP. Also get rid of machine-id, as that makes the boot loader default to KeyTool, which is not what we want. It's questionable to install stuff by machine-id, but I think it has the benefit that we do not accidentally overwrite a KeyTool signed by another key that is already in use.
1 parent c452d88 commit b126348

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sicherboot

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,8 @@ ENROLL_KEYS_HELP="Usage: sicherboot enroll-keys
217217
with KeyTool, so you can easily flash the new key.
218218
"
219219
enroll_keys() {
220-
local image="$BOOT_EFI_DIR/$MACHINE_ID/KeyTool.efi"
220+
local relative_image="$MACHINE_ID/KeyTool.efi"
221+
local image="$BOOT_EFI_DIR/$relative_image"
221222
local conf="$BOOT_EFI_DIR/loader/entries/$MACHINE_ID-keytool.conf"
222223
local key_dir_rel="Keys/$MACHINE_ID"
223224
local key_dir="$BOOT_EFI_DIR/$key_dir_rel"
@@ -242,8 +243,7 @@ enroll_keys() {
242243
sign_image "$image"
243244

244245
echo "title UEFI Key Setup Tool" > "$conf"
245-
echo "machine-id $MACHINE_ID" >> "$conf"
246-
echo "efi $image" >> "$conf"
246+
echo "efi $relative_image" >> "$conf"
247247

248248
echo "Installed KeyTool into the ESP."
249249
echo

0 commit comments

Comments
 (0)