This repository has been archived by the owner on Apr 22, 2024. It is now read-only.
forked from JasonN3/build-container-installer
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add Secure Boot Support and Remove Grub Entry for Test this Med…
…ia (#28) * chore: First pass of adding secure boot key enrollment * feat: Add secure boot support * feat: Removed Test this media grub entry and set default to install * fix: simplify secureboot scripts --------- Co-authored-by: Kyle Gospodnetich <me@kylegospodneti.ch>
- Loading branch information
1 parent
c6b30c9
commit bf4d136
Showing
5 changed files
with
38 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
append usr/share/anaconda/interactive-defaults.ks "%post --logfile=/root/ks-post.log --erroronfail --nochroot" | ||
append usr/share/anaconda/interactive-defaults.ks "set -m" | ||
append usr/share/anaconda/interactive-defaults.ks "/run/install/repo/enroll-secureboot-key.sh" | ||
append usr/share/anaconda/interactive-defaults.ks "%end" | ||
|
||
append usr/share/anaconda/post-scripts/secure_boot_key.ks "%post --logfile=/root/ks-post.log --erroronfail --nochroot" | ||
append usr/share/anaconda/post-scripts/secure_boot_key.ks "set -m" | ||
append usr/share/anaconda/post-scripts/secure_boot_key.ks "/run/install/repo/enroll-secureboot-key.sh" | ||
append usr/share/anaconda/post-scripts/secure_boot_key.ks "%end" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/sh | ||
|
||
set -oue pipefail | ||
|
||
readonly SECUREBOOT_KEY="/run/install/repo/ublue-os-akmods-public-key.der" | ||
readonly ENROLLMENT_PASSWORD="ublue-os" | ||
|
||
if [[ ! -d "/sys/firmware/efi" ]]; then | ||
echo "EFI mode not detected. Skipping key enrollment." | ||
exit 0 | ||
fi | ||
|
||
if [[ ! -f "${SECUREBOOT_KEY}" ]]; then | ||
echo "Secure boot key not found: ${SECUREBOOT_KEY}" | ||
exit 1 | ||
fi | ||
|
||
mokutil --timeout -1 || : | ||
echo -e "${ENROLLMENT_PASSWORD}\n${ENROLLMENT_PASSWORD}" | mokutil --import "${SECUREBOOT_KEY}" || : |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters