windows/src/install.sh

622 lines
14 KiB
Bash
Raw Normal View History

2024-01-14 15:39:24 +00:00
#!/usr/bin/env bash
2024-01-14 14:19:58 +00:00
set -Eeuo pipefail
2024-01-19 00:25:39 +00:00
: "${MANUAL:=""}"
2024-01-26 21:11:12 +00:00
: "${DETECTED:=""}"
2024-01-14 19:32:24 +00:00
: "${VERSION:="win11x64"}"
if [[ "${VERSION}" == \"*\" || "${VERSION}" == \'*\' ]]; then
VERSION="${VERSION:1:-1}"
fi
2024-01-17 02:40:19 +00:00
[[ "${VERSION,,}" == "11" ]] && VERSION="win11x64"
[[ "${VERSION,,}" == "win11" ]] && VERSION="win11x64"
[[ "${VERSION,,}" == "10" ]] && VERSION="win10x64"
[[ "${VERSION,,}" == "win10" ]] && VERSION="win10x64"
[[ "${VERSION,,}" == "8" ]] && VERSION="win81x64"
[[ "${VERSION,,}" == "81" ]] && VERSION="win81x64"
[[ "${VERSION,,}" == "8.1" ]] && VERSION="win81x64"
[[ "${VERSION,,}" == "win81" ]] && VERSION="win81x64"
[[ "${VERSION,,}" == "win8" ]] && VERSION="win81x64"
2024-01-26 21:11:12 +00:00
[[ "${VERSION,,}" == "7" ]] && VERSION="win7x64"
[[ "${VERSION,,}" == "win7" ]] && VERSION="win7x64"
2024-01-17 02:40:19 +00:00
[[ "${VERSION,,}" == "22" ]] && VERSION="win2022-eval"
[[ "${VERSION,,}" == "2022" ]] && VERSION="win2022-eval"
[[ "${VERSION,,}" == "win22" ]] && VERSION="win2022-eval"
[[ "${VERSION,,}" == "win2022" ]] && VERSION="win2022-eval"
[[ "${VERSION,,}" == "19" ]] && VERSION="win2019-eval"
[[ "${VERSION,,}" == "2019" ]] && VERSION="win2019-eval"
[[ "${VERSION,,}" == "win19" ]] && VERSION="win2019-eval"
[[ "${VERSION,,}" == "win2019" ]] && VERSION="win2019-eval"
[[ "${VERSION,,}" == "16" ]] && VERSION="win2016-eval"
[[ "${VERSION,,}" == "2016" ]] && VERSION="win2016-eval"
[[ "${VERSION,,}" == "win16" ]] && VERSION="win2016-eval"
[[ "${VERSION,,}" == "win2016" ]] && VERSION="win2016-eval"
2024-01-26 05:05:01 +00:00
[[ "${VERSION,,}" == "ltsc10" ]] && VERSION="win10x64-enterprise-ltsc-eval"
[[ "${VERSION,,}" == "10ltsc" ]] && VERSION="win10x64-enterprise-ltsc-eval"
[[ "${VERSION,,}" == "win10-ltsc" ]] && VERSION="win10x64-enterprise-ltsc-eval"
[[ "${VERSION,,}" == "win10x64-ltsc" ]] && VERSION="win10x64-enterprise-ltsc-eval"
2024-01-26 21:11:12 +00:00
if [[ "${VERSION,,}" == "win10x64-enterprise-ltsc-eval" ]]; then
DETECTED="win10x64-ltsc"
fi
2024-01-26 05:05:01 +00:00
if [[ "${VERSION,,}" == "tiny10" ]]; then
2024-01-26 21:11:12 +00:00
DETECTED="win10x64-ltsc"
2024-01-26 05:05:01 +00:00
VERSION="https://archive.org/download/tiny-10-23-h2/tiny10%20x64%2023h2.iso"
fi
2024-01-26 21:11:12 +00:00
if [[ "${VERSION,,}" == "win7x64" ]]; then
DETECTED="win7x64"
2024-01-27 04:10:45 +00:00
VERSION="https://dl.bobpony.com/windows/7/en_windows_7_enterprise_with_sp1_x64_dvd_u_677651.iso"
2024-01-26 21:11:12 +00:00
fi
if [[ "${VERSION,,}" == "tiny11" ]]; then
DETECTED="win11x64"
VERSION="https://archive.org/download/tiny-11-core-x-64-beta-1/tiny11%20core%20x64%20beta%201.iso"
fi
CUSTOM="custom.iso"
[ ! -f "$STORAGE/$CUSTOM" ] && CUSTOM="Custom.iso"
[ ! -f "$STORAGE/$CUSTOM" ] && CUSTOM="custom.ISO"
[ ! -f "$STORAGE/$CUSTOM" ] && CUSTOM="CUSTOM.ISO"
[ ! -f "$STORAGE/$CUSTOM" ] && CUSTOM="custom.img"
[ ! -f "$STORAGE/$CUSTOM" ] && CUSTOM="Custom.img"
[ ! -f "$STORAGE/$CUSTOM" ] && CUSTOM="custom.IMG"
[ ! -f "$STORAGE/$CUSTOM" ] && CUSTOM="CUSTOM.IMG"
TMP="$STORAGE/tmp"
DIR="$TMP/unpack"
FB="falling back to manual installation!"
ETFS="boot/etfsboot.com"
EFISYS="efi/microsoft/boot/efisys_noprompt.bin"
2024-01-17 02:40:19 +00:00
2024-01-27 13:52:58 +00:00
printVersion() {
local id="$1"
local desc=""
[[ "$id" == "win7"* ]] && desc="Windows 7"
[[ "$id" == "win8"* ]] && desc="Windows 8"
[[ "$id" == "win10"* ]] && desc="Windows 10"
[[ "$id" == "win11"* ]] && desc="Windows 11"
[[ "$id" == "winvista"* ]] && desc="Windows Vista"
[[ "$id" == "win2022"* ]] && desc="Windows Server 2022"
[[ "$id" == "win2019"* ]] && desc="Windows Server 2019"
[[ "$id" == "win2016"* ]] && desc="Windows Server 2016"
[[ "$id" == "win10x64-ltsc" ]] && desc="Windows 10 LTSC"
echo "$desc"
return 0
}
replaceXML() {
local dir="$1"
local asset="$2"
local path="$dir/autounattend.xml"
2024-01-24 23:18:59 +00:00
[ -f "$path" ] && cp "$asset" "$path"
path="$dir/Autounattend.xml"
2024-01-24 23:18:59 +00:00
[ -f "$path" ] && cp "$asset" "$path"
path="$dir/AutoUnattend.xml"
2024-01-24 23:18:59 +00:00
[ -f "$path" ] && cp "$asset" "$path"
path="$dir/autounattend.XML"
2024-01-24 23:18:59 +00:00
[ -f "$path" ] && cp "$asset" "$path"
path="$dir/Autounattend.XML"
2024-01-24 23:18:59 +00:00
[ -f "$path" ] && cp "$asset" "$path"
path="$dir/AutoUnattend.XML"
2024-01-24 23:18:59 +00:00
[ -f "$path" ] && cp "$asset" "$path"
path="$dir/AUTOUNATTEND.xml"
2024-01-24 23:18:59 +00:00
[ -f "$path" ] && cp "$asset" "$path"
path="$dir/AUTOUNATTEND.XML"
2024-01-24 23:18:59 +00:00
[ -f "$path" ] && cp "$asset" "$path"
return 0
}
hasDisk() {
2024-01-17 02:40:19 +00:00
[ -b "${DEVICE:-}" ] && return 0
2024-01-17 02:40:19 +00:00
if [ -f "$STORAGE/data.img" ] || [ -f "$STORAGE/data.qcow2" ]; then
return 0
2024-01-22 01:56:28 +00:00
fi
2024-01-17 02:40:19 +00:00
return 1
}
skipInstall() {
if hasDisk && [ -f "$STORAGE/windows.boot" ]; then
return 0
fi
2024-01-19 03:28:03 +00:00
return 1
}
finishInstall() {
local iso="$1"
2024-01-17 02:40:19 +00:00
# Mark ISO as prepared via magic byte
printf '\x16' | dd of="$iso" bs=1 seek=0 count=1 conv=notrunc status=none
2024-01-22 01:56:28 +00:00
rm -f "$STORAGE/windows.boot"
cp /run/version "$STORAGE/windows.ver"
2024-01-17 02:40:19 +00:00
if [[ "${BOOT_MODE,,}" == "windows_legacy" ]]; then
touch "$STORAGE/windows.old"
else
rm -f "$STORAGE/windows.old"
fi
rm -rf "$TMP"
return 0
}
2024-01-22 01:56:28 +00:00
abortInstall() {
local iso="$1"
if [[ "$iso" != "$STORAGE/$BASE" ]]; then
mv -f "$iso" "$STORAGE/$BASE"
fi
finishInstall "$STORAGE/$BASE"
return 0
}
startInstall() {
2024-01-16 18:58:55 +00:00
2024-01-27 13:52:58 +00:00
local magic desc
local msg="Windows is being started, please wait..."
2024-01-22 22:31:35 +00:00
if [ -f "$STORAGE/$CUSTOM" ]; then
2024-01-14 14:19:58 +00:00
EXTERNAL="Y"
BASE="$CUSTOM"
2024-01-14 14:19:58 +00:00
else
2024-01-14 14:19:58 +00:00
CUSTOM=""
2024-01-14 14:19:58 +00:00
if [[ "${VERSION,,}" == "http"* ]]; then
EXTERNAL="Y"
else
EXTERNAL="N"
fi
if [[ "$EXTERNAL" != [Yy1]* ]]; then
BASE="$VERSION.iso"
if ! skipInstall && [ ! -f "$STORAGE/$BASE" ]; then
2024-01-27 16:20:55 +00:00
2024-01-27 13:52:58 +00:00
desc=$(printVersion "$VERSION")
[ -z "$desc" ] && desc="Windows"
msg="$desc is being downloaded, please wait..."
fi
else
BASE=$(basename "${VERSION%%\?*}")
: "${BASE//+/ }"; printf -v BASE '%b' "${_//%/\\x}"
BASE=$(echo "$BASE" | sed -e 's/[^A-Za-z0-9._-]/_/g')
if ! skipInstall && [ ! -f "$STORAGE/$BASE" ]; then
msg="Image '$BASE' is being downloaded, please wait..."
fi
fi
[[ "${BASE,,}" == "custom."* ]] && BASE="windows.iso"
fi
html "$msg"
[ -z "$MANUAL" ] && MANUAL="N"
if [ -f "$STORAGE/$BASE" ]; then
2024-01-17 02:40:19 +00:00
# Check if the ISO was already processed by our script
2024-01-24 04:54:26 +00:00
magic=$(dd if="$STORAGE/$BASE" seek=0 bs=1 count=1 status=none | tr -d '\000')
magic="$(printf '%s' "$magic" | od -A n -t x1 -v | tr -d ' \n')"
2024-01-17 02:40:19 +00:00
if [[ "$magic" == "16" ]]; then
if hasDisk || [[ "$MANUAL" = [Yy1]* ]]; then
return 1
fi
fi
2024-01-22 01:56:28 +00:00
EXTERNAL="Y"
CUSTOM="$BASE"
2024-01-15 14:15:12 +00:00
2024-01-17 02:40:19 +00:00
else
if skipInstall; then
BASE=""
return 1
2024-01-22 01:56:28 +00:00
fi
2024-01-14 14:19:58 +00:00
fi
2024-01-15 14:15:12 +00:00
mkdir -p "$TMP"
2024-01-22 01:56:28 +00:00
if [ ! -f "$STORAGE/$CUSTOM" ]; then
CUSTOM=""
ISO="$TMP/$BASE"
else
ISO="$STORAGE/$CUSTOM"
2024-01-22 01:56:28 +00:00
fi
rm -f "$TMP/$BASE"
return 0
}
downloadImage() {
2024-01-17 02:40:19 +00:00
local iso="$1"
local url="$2"
local progress
rm -f "$iso"
2024-01-17 02:40:19 +00:00
if [[ "$EXTERNAL" != [Yy1]* ]]; then
2024-01-17 02:40:19 +00:00
cd "$TMP"
if ! /run/mido.sh "$url"; then
return 1
fi
cd /run
2024-01-22 01:56:28 +00:00
[ ! -f "$iso" ] && return 1
return 0
fi
2024-01-22 01:56:28 +00:00
info "Downloading $BASE as boot image..."
2024-01-14 14:19:58 +00:00
# Check if running with interactive TTY or redirected to docker log
if [ -t 1 ]; then
progress="--progress=bar:noscroll"
else
progress="--progress=dot:giga"
fi
2024-01-17 02:40:19 +00:00
{ wget "$url" -O "$iso" -q --no-check-certificate --show-progress "$progress"; rc=$?; } || :
2024-01-27 01:00:04 +00:00
(( rc != 0 )) && error "Failed to download $url , reason: $rc" && exit 60
2024-01-19 14:18:56 +00:00
[ ! -f "$iso" ] && return 1
return 0
}
extractImage() {
local iso="$1"
local dir="$2"
2024-01-27 13:52:58 +00:00
local desc="downloaded ISO"
2024-01-24 04:54:26 +00:00
local size size_gb space space_gb
2024-01-24 23:18:59 +00:00
2024-01-27 13:52:58 +00:00
if [[ "$EXTERNAL" != [Yy1]* ]] && [ -z "$CUSTOM" ]; then
desc=$(printVersion "$VERSION")
[ -z "$desc" ] && desc="downloaded ISO"
fi
local msg="Extracting $desc image..."
[ -n "$CUSTOM" ] && msg="Extracting local ISO image..."
info "$msg" && html "$msg"
2024-01-24 04:54:26 +00:00
size=$(stat -c%s "$iso")
size_gb=$(( (size + 1073741823)/1073741824 ))
space=$(df --output=avail -B 1 "$TMP" | tail -n 1)
space_gb=$(( (space + 1073741823)/1073741824 ))
if ((size<10000000)); then
error "Invalid ISO file: Size is smaller than 10 MB" && exit 62
2024-01-19 14:18:56 +00:00
fi
2024-01-19 00:25:39 +00:00
if (( size > space )); then
error "Not enough free space in $STORAGE, have $space_gb GB available but need at least $size_gb GB." && exit 63
fi
2024-01-22 01:56:28 +00:00
rm -rf "$dir"
if ! 7z x "$iso" -o"$dir" > /dev/null; then
error "Failed to extract ISO file!"
exit 66
fi
2024-01-19 00:25:39 +00:00
return 0
}
2024-01-15 22:45:35 +00:00
2024-01-27 13:52:58 +00:00
getVersion() {
local name="$1"
local detected=""
2024-01-19 14:18:56 +00:00
2024-01-26 21:11:12 +00:00
[[ "${name,,}" == *"windows 7"* ]] && detected="win7x64"
2024-01-27 13:52:58 +00:00
[[ "${name,,}" == *"windows 8"* ]] && detected="win81x64"
[[ "${name,,}" == *"windows 11"* ]] && detected="win11x64"
2024-01-26 21:11:12 +00:00
[[ "${name,,}" == *"windows vista"* ]] && detected="winvistax64"
[[ "${name,,}" == *"server 2022"* ]] && detected="win2022-eval"
[[ "${name,,}" == *"server 2019"* ]] && detected="win2019-eval"
[[ "${name,,}" == *"server 2016"* ]] && detected="win2016-eval"
2024-01-26 21:11:12 +00:00
2024-01-26 05:05:01 +00:00
if [[ "${name,,}" == *"windows 10"* ]]; then
2024-01-27 16:20:55 +00:00
if [[ "${name,,}" == *"ltsc"* ]]; then
2024-01-26 05:05:01 +00:00
detected="win10x64-ltsc"
else
detected="win10x64"
fi
fi
2024-01-15 22:45:35 +00:00
echo "$detected"
return 0
}
2024-01-15 22:45:35 +00:00
detectImage() {
2024-01-19 00:25:39 +00:00
XML=""
2024-01-19 00:25:39 +00:00
2024-01-26 21:11:12 +00:00
if [ -n "$CUSTOM" ]; then
DETECTED=""
else
if [ -z "$DETECTED" ] && [[ "$EXTERNAL" != [Yy1]* ]]; then
2024-01-26 05:05:01 +00:00
DETECTED="$VERSION"
fi
2024-01-26 21:11:12 +00:00
fi
if [ -n "$DETECTED" ]; then
2024-01-27 13:52:58 +00:00
2024-01-26 21:11:12 +00:00
if [ -f "/run/assets/$DETECTED.xml" ]; then
[[ "$MANUAL" != [Yy1]* ]] && XML="$DETECTED.xml"
return 0
fi
2024-01-27 13:52:58 +00:00
local dsc
dsc=$(printVersion "$DETECTED")
[ -z "$dsc" ] && dsc="$DETECTED"
warn "got $desc, but no matching XML file exists, $FB."
return 0
fi
2024-01-19 00:25:39 +00:00
info "Detecting Windows version from ISO image..."
2024-01-19 00:25:39 +00:00
2024-01-26 21:11:12 +00:00
local dir="$1"
2024-01-27 13:52:58 +00:00
local tag result name name2 desc
local loc="$dir/sources/install.wim"
[ ! -f "$loc" ] && loc="$dir/sources/install.esd"
2024-01-19 00:25:39 +00:00
if [ ! -f "$loc" ]; then
warn "failed to locate 'install.wim' or 'install.esd' in ISO image, $FB"
BOOT_MODE="windows_legacy"
return 1
fi
2024-01-24 04:54:26 +00:00
tag="DISPLAYNAME"
result=$(wimlib-imagex info -xml "$loc" | tr -d '\000')
name=$(sed -n "/$tag/{s/.*<$tag>\(.*\)<\/$tag>.*/\1/;p}" <<< "$result")
2024-01-27 13:52:58 +00:00
DETECTED=$(getVersion "$name")
if [ -z "$DETECTED" ]; then
tag="PRODUCTNAME"
2024-01-24 04:54:26 +00:00
name2=$(sed -n "/$tag/{s/.*<$tag>\(.*\)<\/$tag>.*/\1/;p}" <<< "$result")
[ -z "$name" ] && name="$name2"
2024-01-27 13:52:58 +00:00
DETECTED=$(getVersion "$name2")
fi
2024-01-19 00:25:39 +00:00
2024-01-27 13:52:58 +00:00
if [ -z "$DETECTED" ]; then
warn "failed to determine Windows version from string '$name', $FB"
return 0
fi
2024-01-22 01:56:28 +00:00
2024-01-27 13:52:58 +00:00
desc=$(printVersion "$DETECTED")
[ -z "$desc" ] && desc="$DETECTED"
2024-01-27 13:52:58 +00:00
if [ -f "/run/assets/$DETECTED.xml" ]; then
[[ "$MANUAL" != [Yy1]* ]] && XML="$DETECTED.xml"
info "Detected: $desc"
else
2024-01-27 13:52:58 +00:00
warn "detected $desc, but no matching XML file exists, $FB."
2024-01-15 22:45:35 +00:00
fi
2024-01-27 13:52:58 +00:00
return 0
}
prepareImage() {
local iso="$1"
local dir="$2"
2024-01-26 21:11:12 +00:00
if [[ "${BOOT_MODE,,}" == "windows" ]]; then
if [[ "${DETECTED,,}" != "win7x64"* ]] && [[ "${DETECTED,,}" != "winvistax64"* ]]; then
if [ -f "$dir/$ETFS" ] && [ -f "$dir/$EFISYS" ]; then
return 0
fi
if [ ! -f "$dir/$ETFS" ]; then
warn "failed to locate file 'etfsboot.com' in ISO image, falling back to legacy boot!"
else
warn "failed to locate file 'efisys_noprompt.bin' in ISO image, falling back to legacy boot!"
fi
fi
fi
ETFS="boot.img"
BOOT_MODE="windows_legacy"
local len offset
len=$(isoinfo -d -i "$iso" | grep "Nsect " | grep -o "[^ ]*$")
offset=$(isoinfo -d -i "$iso" | grep "Bootoff " | grep -o "[^ ]*$")
if ! dd "if=$iso" "of=$dir/$ETFS" bs=2048 "count=$len" "skip=$offset" status=none; then
error "Failed to extract boot image from ISO!"
exit 67
fi
2024-01-15 22:45:35 +00:00
return 0
}
2024-01-17 02:40:19 +00:00
updateImage() {
2024-01-17 02:40:19 +00:00
local iso="$1"
local dir="$2"
local asset="/run/assets/$3"
2024-01-24 04:54:26 +00:00
local index result
[ ! -f "$asset" ] && return 0
replaceXML "$dir" "$asset"
2024-01-17 02:40:19 +00:00
local loc="$dir/sources/boot.wim"
[ ! -f "$loc" ] && loc="$dir/sources/boot.esd"
2024-01-19 00:25:39 +00:00
if [ ! -f "$loc" ]; then
warn "failed to locate 'boot.wim' or 'boot.esd' in ISO image, $FB"
BOOT_MODE="windows_legacy"
return 1
fi
2024-01-19 00:25:39 +00:00
info "Adding XML file for automatic installation..."
2024-01-14 14:19:58 +00:00
2024-01-24 04:54:26 +00:00
index="1"
result=$(wimlib-imagex info -xml "$loc" | tr -d '\000')
2024-01-19 00:25:39 +00:00
if [[ "${result^^}" == *"<IMAGE INDEX=\"2\">"* ]]; then
index="2"
fi
2024-01-19 00:25:39 +00:00
if ! wimlib-imagex update "$loc" "$index" --command "add $asset /autounattend.xml" > /dev/null; then
warn "failed to add XML to ISO image, $FB"
return 1
fi
2024-01-19 00:25:39 +00:00
return 0
}
buildImage() {
local dir="$1"
local cat="BOOT.CAT"
local label="${BASE%.*}"
local log="/run/shm/iso.log"
2024-01-27 13:52:58 +00:00
local size size_gb space space_gb desc
2024-01-24 04:54:26 +00:00
label="${label::30}"
local out="$TMP/$label.tmp"
rm -f "$out"
2024-01-27 13:52:58 +00:00
desc=$(printVersion "$DETECTED")
[ -z "$desc" ] && desc="ISO"
local msg="Building $desc image..."
info "$msg" && html "$msg"
2024-01-19 00:25:39 +00:00
2024-01-24 04:54:26 +00:00
size=$(du -h -b --max-depth=0 "$dir" | cut -f1)
size_gb=$(( (size + 1073741823)/1073741824 ))
space=$(df --output=avail -B 1 "$TMP" | tail -n 1)
space_gb=$(( (space + 1073741823)/1073741824 ))
if (( size > space )); then
error "Not enough free space in $STORAGE, have $space_gb GB available but need at least $size_gb GB."
return 1
fi
if [[ "${BOOT_MODE,,}" != "windows_legacy" ]]; then
if ! genisoimage -o "$out" -b "$ETFS" -no-emul-boot -c "$cat" -iso-level 4 -J -l -D -N -joliet-long -relaxed-filenames -V "$label" \
-udf -boot-info-table -eltorito-alt-boot -eltorito-boot "$EFISYS" -no-emul-boot -allow-limited-size -quiet "$dir" 2> "$log"; then
[ -f "$log" ] && echo "$(<"$log")"
return 1
fi
else
if ! genisoimage -o "$out" -b "$ETFS" -no-emul-boot -c "$cat" -iso-level 2 -J -l -D -N -joliet-long -relaxed-filenames -V "$label" \
-udf -allow-limited-size -quiet "$dir" 2> "$log"; then
[ -f "$log" ] && echo "$(<"$log")"
return 1
fi
fi
2024-01-19 00:25:39 +00:00
local error=""
local hide="Warning: creating filesystem that does not conform to ISO-9660."
[ -f "$log" ] && error="$(<"$log")"
[[ "$error" != "$hide" ]] && echo "$error"
if [ -f "$STORAGE/$BASE" ]; then
error "File $STORAGE/$BASE does already exist?!"
return 1
fi
mv "$out" "$STORAGE/$BASE"
return 0
}
2024-01-22 01:56:28 +00:00
######################################
2024-01-22 01:56:28 +00:00
if ! startInstall; then
if [ -f "$STORAGE/windows.old" ]; then
BOOT_MODE="windows_legacy"
fi
rm -rf "$TMP"
return 0
2024-01-22 01:56:28 +00:00
fi
2024-01-19 03:28:03 +00:00
if [ ! -f "$ISO" ]; then
if ! downloadImage "$ISO" "$VERSION"; then
error "Failed to download $VERSION"
exit 61
fi
fi
2024-01-19 00:25:39 +00:00
if ! extractImage "$ISO" "$DIR"; then
abortInstall "$ISO"
return 0
fi
2024-01-22 01:56:28 +00:00
if ! detectImage "$DIR"; then
abortInstall "$ISO"
return 0
fi
2024-01-19 00:25:39 +00:00
if ! prepareImage "$ISO" "$DIR"; then
abortInstall "$ISO"
return 0
fi
if ! updateImage "$ISO" "$DIR" "$XML"; then
abortInstall "$ISO"
return 0
fi
rm -f "$ISO"
if ! buildImage "$DIR"; then
error "Failed to build image!"
exit 65
fi
2024-01-14 14:19:58 +00:00
finishInstall "$STORAGE/$BASE"
2024-01-20 16:03:59 +00:00
html "Successfully prepared image for installation..."
2024-01-14 14:19:58 +00:00
return 0