feat: Added support for Reactos (#1999)

This commit is contained in:
Kroese
2026-07-26 23:55:50 +02:00
committed by GitHub
parent 5287b0ba85
commit a6c1e4c8a5
6 changed files with 126 additions and 27 deletions
+29 -9
View File
@@ -54,13 +54,23 @@ boot() {
legacyBootReady() {
local last
local bios="Booting from Hard"
local line last recent
local hard="Booting from Hard"
local cdrom="Booting from DVD/CD"
last=$(grep "^Booting.*" "$QEMU_PTY" | tail -1)
[[ "${last,,}" != "${bios,,}"* ]] && return 1
grep -Fq "No bootable device." "$QEMU_PTY" && return 1
grep -Fq "BOOTMGR is missing" "$QEMU_PTY" && return 1
line=$(grep -n "^Booting.*" "$QEMU_PTY" | tail -1)
[ -z "$line" ] && return 1
last="${line#*:}"
recent=$(tail -n +"${line%%:*}" "$QEMU_PTY")
[[ "${last,,}" != "${hard,,}"* ]] && return 1
grep -Fq "Loading FreeLoader..." <<< "$recent" && return 0
grep -Fq "No bootable device." <<< "$recent" && return 1
grep -Fq "BOOTMGR is missing" <<< "$recent" && return 1
grep -Fq "Boot failed: not a bootable disk" <<< "$recent" && return 1
grep -Fq "Boot failed: could not read the boot disk" <<< "$recent" && return 1
return 0
}
@@ -75,8 +85,14 @@ ready() {
return 1
fi
local line="\"Windows Boot Manager\""
grep -Fq "$line" "$QEMU_PTY" && return 0
local last
last=$(grep -E \
'BdsDxe: starting Boot[[:xdigit:]]{4} ' \
"$QEMU_PTY" | tail -1)
grep -Eq \
'BdsDxe: starting Boot[[:xdigit:]]{4} "Windows Boot Manager" from HD\(' \
<<< "$last" && return 0
return 1
}
@@ -150,7 +166,11 @@ abortDuringSetup() {
local code="$1"
info "Cannot send ACPI signal during $(app) setup, aborting..."
if [[ "${DETECTED,,}" != "reactos" ]] || [ -n "${CUSTOM:-}" ]; then
info "Cannot send ACPI signal during $(app) setup, aborting..."
else
info "ReactOS LiveCD does not support ACPI shutdown, terminating..."
fi
terminateQemu