windows_init/src/iso.sh

34 lines
661 B
Bash
Raw Normal View History

#!/bin/sh
2021-10-04 05:39:20 +00:00
printf '%b\n' "\n\033[1m"WINDOWS_INIT:"\033[0m"" Executing extract_iso.sh"
2021-09-28 17:38:12 +00:00
src/extract_iso.sh
2021-10-03 21:01:26 +00:00
EXTRACT="win/"
2021-10-04 05:39:20 +00:00
printf '%b\n' "\n\033[1m"WINDOWS_INIT:"\033[0m"" Executing bootsect.sh"
2021-10-03 21:01:26 +00:00
src/bootsect.sh
2021-09-28 17:38:12 +00:00
# add answerfile
2021-10-03 21:01:26 +00:00
cp data/autounattend.xml ${EXTRACT}
2021-10-04 04:52:36 +00:00
BOOT="bootsect.bin"
2021-09-28 17:38:12 +00:00
# install mkisofs
# recreate iso
2021-10-03 21:01:26 +00:00
mkisofs \
-allow-limited-size \
2021-10-04 04:52:36 +00:00
-b ${BOOT} \
2021-10-03 21:01:26 +00:00
-no-emul-boot \
-boot-load-seg 1984 \
-boot-load-size 4 \
-iso-level 2 \
-J -l -D -N -joliet-long -relaxed-filenames \
-V "WINSP" \
-o winsp.iso \
${EXTRACT}
2021-09-28 17:38:12 +00:00
2021-10-04 04:52:36 +00:00
# clean up bootsect
rm bootsect.bin
rm -rf bootsect/
2021-09-28 17:38:12 +00:00
# clean up iso extract
2021-10-03 21:01:26 +00:00
sudo rm -rf ${EXTRACT}