fix: Refactor ISO build arguments (#2041)

This commit is contained in:
Kroese
2026-08-04 12:21:30 +02:00
committed by GitHub
parent 6c5264d444
commit 2da8322dba
+57 -69
View File
@@ -1733,10 +1733,9 @@ buildImage() {
local dir="$1" local dir="$1"
local failed=""
local cat="BOOT.CAT" local cat="BOOT.CAT"
local log="/run/shm/iso.log" local log="/run/shm/iso.log"
local base size desc local base size desc failed=""
if [ -f "$BOOT" ]; then if [ -f "$BOOT" ]; then
error "File $BOOT does already exist?!" && return 1 error "File $BOOT does already exist?!" && return 1
@@ -1773,90 +1772,79 @@ buildImage() {
/run/progress.sh "$out" "$size" "$msg ([P])..." & /run/progress.sh "$out" "$size" "$msg ([P])..." &
local -a args=(
-o "$out"
-b "$ETFS"
)
local -a name_args=(
-J
-l
-D
-N
-joliet-long
-relaxed-filenames
-V "${LABEL::30}"
)
# Use separate layouts for modern hybrid media, NT 5.x legacy media, Win9x, # Use separate layouts for modern hybrid media, NT 5.x legacy media, Win9x,
# and other legacy releases because their El Torito requirements differ. # and other legacy releases because their El Torito requirements differ.
if [[ "${BOOT_MODE,,}" != "windows_legacy" ]]; then if [[ "${BOOT_MODE,,}" != "windows_legacy" ]]; then
genisoimage \ args+=(
-o "$out" \ -no-emul-boot
-b "$ETFS" \ -c "$cat"
-no-emul-boot \ -iso-level 4
-c "$cat" \ "${name_args[@]}"
-iso-level 4 \ -udf
-J \ -boot-info-table
-l \ -eltorito-alt-boot
-D \ -eltorito-boot "$EFISYS"
-N \ -no-emul-boot
-joliet-long \ -allow-limited-size
-relaxed-filenames \ )
-V "${LABEL::30}" \
-udf \
-boot-info-table \
-eltorito-alt-boot \
-eltorito-boot "$EFISYS" \
-no-emul-boot \
-allow-limited-size \
-quiet \
"$dir" 2> "$log" || failed="y"
else else
case "${DETECTED,,}" in case "${DETECTED,,}" in
"win2k"* | "winxp"* | "win2003"* ) "win2k"* | "winxp"* | "win2003"* )
genisoimage \
-o "$out" \ args+=(
-b "$ETFS" \ -no-emul-boot
-no-emul-boot \ -boot-load-seg 1984
-boot-load-seg 1984 \ -boot-load-size "$BOOT_LOAD_SIZE"
-boot-load-size "$BOOT_LOAD_SIZE" \ -c "$cat"
-c "$cat" \ -iso-level 2
-iso-level 2 \ "${name_args[@]}"
-J \ ) ;;
-l \
-D \
-N \
-joliet-long \
-relaxed-filenames \
-V "${LABEL::30}" \
-quiet \
"$dir" 2> "$log" || failed="y"
;;
"win9"* ) "win9"* )
genisoimage \
-o "$out" \ args+=(
-b "$ETFS" \ -r
-J \ ) ;;
-r \
-V "${LABEL::30}" \
-quiet \
"$dir" 2> "$log" || failed="y"
;;
* ) * )
genisoimage \
-o "$out" \ args+=(
-b "$ETFS" \ -no-emul-boot
-no-emul-boot \ -boot-load-size "$BOOT_LOAD_SIZE"
-boot-load-size "$BOOT_LOAD_SIZE" \ -c "$cat"
-c "$cat" \ -iso-level 2
-iso-level 2 \ "${name_args[@]}"
-J \ -udf
-l \ -allow-limited-size
-D \ ) ;;
-N \
-joliet-long \
-relaxed-filenames \
-V "${LABEL::30}" \
-udf \
-allow-limited-size \
-quiet \
"$dir" 2> "$log" || failed="y"
;;
esac esac
fi fi
if ! genisoimage "${args[@]}" -quiet "$dir" 2> "$log"; then
failed="y"
fi
fKill "progress.sh" fKill "progress.sh"
if [ -n "$failed" ]; then if [ -n "$failed" ]; then