feat: Enable TPM for manual installations

This commit is contained in:
Kroese 2024-04-18 22:08:08 +02:00 committed by GitHub
parent fa6d472878
commit 2a30410cf5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -236,6 +236,7 @@ skipInstall() {
finishInstall() {
local iso="$1"
local aborted="$2"
# Mark ISO as prepared via magic byte
printf '\x16' | dd of="$iso" bs=1 seek=0 count=1 conv=notrunc status=none
@ -249,6 +250,12 @@ finishInstall() {
rm -f "$STORAGE/windows.old"
fi
if [[ "${BOOT_MODE,,}" == "windows" ]] && [[ "${DETECTED,,}" == "win11"* ]]; then
if [[ "$MANUAL" == [Yy1]* ]] || [[ "$aborted" == [Yy1]* ]]; then
BOOT_MODE="windows_secure"
fi
fi
rm -rf "$TMP"
return 0
}
@ -261,7 +268,7 @@ abortInstall() {
mv -f "$iso" "$STORAGE/$BASE"
fi
finishInstall "$STORAGE/$BASE"
finishInstall "$STORAGE/$BASE" "Y"
return 0
}
@ -312,7 +319,7 @@ startInstall() {
if [[ "$magic" == "16" ]]; then
if hasDisk || [[ "$MANUAL" = [Yy1]* ]]; then
if hasDisk || [[ "$MANUAL" == [Yy1]* ]]; then
return 1
fi
@ -1128,7 +1135,7 @@ if ! buildImage "$DIR"; then
exit 65
fi
finishInstall "$STORAGE/$BASE"
finishInstall "$STORAGE/$BASE" "N"
html "Successfully prepared image for installation..."
return 0