mirror of
https://github.com/dockur/windows.git
synced 2025-10-27 03:15:49 +00:00
feat: Unattended installation
This commit is contained in:
parent
aa40aec586
commit
02d6ca55da
1 changed files with 6 additions and 0 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -Eeuo pipefail
|
set -Eeuo pipefail
|
||||||
|
|
||||||
|
: "${ATTENDED:="N"}"
|
||||||
: "${VERSION:="win11x64"}"
|
: "${VERSION:="win11x64"}"
|
||||||
|
|
||||||
ARGUMENTS="-chardev socket,id=chrtpm,path=/tmp/emulated_tpm/swtpm-sock $ARGUMENTS"
|
ARGUMENTS="-chardev socket,id=chrtpm,path=/tmp/emulated_tpm/swtpm-sock $ARGUMENTS"
|
||||||
|
|
@ -36,6 +37,11 @@ info "Customizing ISO to remove keypress requirement during boot..."
|
||||||
|
|
||||||
DIR="$TMP/unpack"
|
DIR="$TMP/unpack"
|
||||||
7z x "$TMP/$BASE" -o"$DIR"
|
7z x "$TMP/$BASE" -o"$DIR"
|
||||||
|
|
||||||
|
if [ -f "/run/assets/$VERSION.xml" ]; then
|
||||||
|
cp "/run/assets/$VERSION.xml" "$DIR/Unattend.xml"
|
||||||
|
fi
|
||||||
|
|
||||||
genisoimage -b boot/etfsboot.com -no-emul-boot -c BOOT.CAT -iso-level 4 -J -l -D -N -joliet-long -relaxed-filenames -v -V "$VERSION" -udf -boot-info-table -eltorito-alt-boot -eltorito-boot efi/microsoft/boot/efisys_noprompt.bin -no-emul-boot -o "$TMP/$BASE.tmp" -allow-limited-size "$DIR"
|
genisoimage -b boot/etfsboot.com -no-emul-boot -c BOOT.CAT -iso-level 4 -J -l -D -N -joliet-long -relaxed-filenames -v -V "$VERSION" -udf -boot-info-table -eltorito-alt-boot -eltorito-boot efi/microsoft/boot/efisys_noprompt.bin -no-emul-boot -o "$TMP/$BASE.tmp" -allow-limited-size "$DIR"
|
||||||
|
|
||||||
mv "$TMP/$BASE.tmp" "$STORAGE/$BASE"
|
mv "$TMP/$BASE.tmp" "$STORAGE/$BASE"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue