diff --git a/src/define.sh b/src/define.sh index a85cd41c..683b1577 100644 --- a/src/define.sh +++ b/src/define.sh @@ -417,6 +417,7 @@ printVersion() { "win9x"* ) desc="Windows ME" ;; "win98"* ) desc="Windows 98" ;; "win95"* ) desc="Windows 95" ;; + "winnt4"* ) desc="Windows NT 4" ;; "win2k"* ) desc="Windows 2000" ;; "winvista"* ) desc="Windows Vista" ;; "win2019-hv"* ) desc="Hyper-V Server" ;; diff --git a/src/image.sh b/src/image.sh index 48ccd535..aa27f526 100644 --- a/src/image.sh +++ b/src/image.sh @@ -1753,13 +1753,6 @@ buildImage() { error "Failed to locate file \"$ETFS\" in ISO image!" && return 1 fi - if [[ "${BOOT_MODE,,}" == "windows_legacy" && - "${DETECTED,,}" != "win9"* && - -z "${BOOT_LOAD_SIZE:-}" ]]; then - error "Failed to determine the boot image load size!" - return 1 - fi - if ! size=$(du -b --max-depth=0 "$dir" | cut -f1); then error "Failed to calculate the size of directory \"$dir\"!" return 1 @@ -1767,6 +1760,13 @@ buildImage() { checkFreeSpace "$TMP" "$size" || return 1 + if [[ "${BOOT_MODE,,}" == "windows_legacy" ]] && [ -z "${BOOT_LOAD_SIZE:-}" ]; then + if [[ "${DETECTED,,}" != "win9"* && "${DETECTED,,}" != "winnt4" ]]; then + error "Failed to determine the boot image load size!" + return 1 + fi + fi + /run/progress.sh "$out" "$size" "$msg ([P])..." & local -a args=( @@ -1816,7 +1816,7 @@ buildImage() { "${name_args[@]}" ) ;; - "win9"* ) + "win9"* | "winnt4" ) args+=( -J diff --git a/src/install.sh b/src/install.sh index e78a5694..1262e71d 100644 --- a/src/install.sh +++ b/src/install.sh @@ -923,8 +923,10 @@ prepareImage() { desc=$(printVariant "$DETECTED" "$DETECTED") # Legacy rebuilt media must retain the source ISO's El Torito boot-load size. - if [[ "${BOOT_MODE,,}" == "windows_legacy" && "${DETECTED,,}" != "win9"* ]]; then - getBootLoadSize "$iso" "$dir" "$desc" || return 1 + if [[ "${BOOT_MODE,,}" == "windows_legacy" ]]; then + if [[ "${DETECTED,,}" != "win9"* && "${DETECTED,,}" != "winnt4" ]]; then + getBootLoadSize "$iso" "$dir" "$desc" || return 1 + fi fi supportsXML "$DETECTED" || return 0 @@ -1586,7 +1588,7 @@ setMachine() { case "${id,,}" in - "win9"* ) + "win9"* | "winnt4" ) writeState "usb" "N" || return 1 writeState "net" "pcnet" || return 1 @@ -1626,7 +1628,7 @@ setMachine() { case "${id,,}" in - "win9"* | "win2k"* | *"x86"* | "reactos" ) + "win9"* | "winnt4" | "win2k"* | *"x86"* | "reactos" ) # Legacy 32-bit Windows may enter an incompatible PAE/DEP path when the # NX flag is exposed, causing installation failures or repeated resets. @@ -1637,7 +1639,7 @@ setMachine() { case "${id,,}" in - "win9"* | "win2k"* | "winxp"* | "win2003"* | \ + "win9"* | "winnt4" | "win2k"* | "winxp"* | "win2003"* | \ "winvistax86"* | "win7x86"* | "reactos" ) if isQ35 "$MACHINE"; then