From 01f970855afef03413eecbe1c5a1817d4e9a61db Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 26 May 2024 22:15:58 +0200 Subject: [PATCH] Update install.sh --- src/install.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/install.sh b/src/install.sh index 700677d..ce3b453 100644 --- a/src/install.sh +++ b/src/install.sh @@ -122,6 +122,7 @@ finishInstall() { rm -f "$STORAGE/windows.base" rm -f "$STORAGE/windows.boot" rm -f "$STORAGE/windows.mode" + rm -f "$STORAGE/windows.type" cp -f /run/version "$STORAGE/windows.ver" @@ -154,6 +155,10 @@ finishInstall() { fi fi + if [ -n "$DISK_TYPE" ] && [[ "${DISK_TYPE,,}" != "scsi" ]]; then + echo "$DISK_TYPE" > "$STORAGE/windows.type" + fi + rm -rf "$TMP" return 0 } @@ -645,7 +650,7 @@ prepareImage() { case "${DETECTED,,}" in "winxp"* ) HV="N" - DISK_TYPE="auto" + DISK_TYPE="ide" BOOT_MODE="windows_legacy" prepareXP "$iso" "$dir" && return 0 error "Failed to prepare Windows XP ISO!" && return 1 @@ -1046,6 +1051,10 @@ bootWindows() { [[ "${PLATFORM,,}" == "arm64" ]] && VGA="virtio-gpu" + if [ -s "$STORAGE/windows.type" ] && [ -f "$STORAGE/windows.type" ]; then + DISK_TYPE=$(<"$STORAGE/windows.type") + fi + if [ -s "$STORAGE/windows.mode" ] && [ -f "$STORAGE/windows.mode" ]; then BOOT_MODE=$(<"$STORAGE/windows.mode") if [ -s "$STORAGE/windows.old" ] && [ -f "$STORAGE/windows.old" ]; then