From a5f27dc68d8f0a445734545ecaea0d056b84c904 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 25 Oct 2021 16:13:53 +0100 Subject: [PATCH] Only set secureboot=on for Windows 11 on non-Debian/Ubuntu --- quickget | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/quickget b/quickget index 29aad13..f81aa05 100755 --- a/quickget +++ b/quickget @@ -526,6 +526,8 @@ function make_vm_config() { local ISO_FILE="" local IMAGE_TYPE="" local GUEST="" + local SEC_BOOT="" + IMAGE_FILE="${1}" ISO_FILE="${2}" if [ "${OS}" == "elementary" ]; then @@ -588,6 +590,13 @@ EOF # Enable TPM for Windows 11 if [ "${OS}" == "windows" ] && [ "${RELEASE}" -ge 11 ]; then 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 start_vm_info