Only set secureboot=on for Windows 11 on non-Debian/Ubuntu

pull/163/head
Martin Wimpress 3 years ago
parent 5c0a7885c9
commit a5f27dc68d
No known key found for this signature in database
GPG Key ID: 61DF940515E06DA3
  1. 9
      quickget

@ -526,6 +526,8 @@ function make_vm_config() {
local ISO_FILE="" local ISO_FILE=""
local IMAGE_TYPE="" local IMAGE_TYPE=""
local GUEST="" local GUEST=""
local SEC_BOOT=""
IMAGE_FILE="${1}" IMAGE_FILE="${1}"
ISO_FILE="${2}" ISO_FILE="${2}"
if [ "${OS}" == "elementary" ]; then if [ "${OS}" == "elementary" ]; then
@ -588,6 +590,13 @@ EOF
# Enable TPM for Windows 11 # Enable TPM for Windows 11
if [ "${OS}" == "windows" ] && [ "${RELEASE}" -ge 11 ]; then if [ "${OS}" == "windows" ] && [ "${RELEASE}" -ge 11 ]; then
echo "tpm=\"on\"" >> "${OS}-${RELEASE}.conf" echo "tpm=\"on\"" >> "${OS}-${RELEASE}.conf"
# Only force SecureBoot on for non-Debian/Ubuntu distros.
if [ -e "/usr/share/OVMF/OVMF_CODE_4M.fd" ] && [ -e "/usr/share/OVMF/OVMF_VARS_4M.fd" ]; then
SEC_BOOT="off"
else
SEC_BOOT="on"
fi
echo "secureboot=\"${SEC_BOOT}\"" >> "${OS}-${RELEASE}.conf"
fi fi
fi fi
start_vm_info start_vm_info

Loading…
Cancel
Save