Use xorriso instead of genisoimage

This commit is contained in:
Jeremy Gardais 2018-12-26 15:20:14 +01:00
parent 21c65cf32b
commit 2f01ebdce8
1 changed files with 12 additions and 6 deletions

View File

@ -17,7 +17,6 @@ TEMP_DIR_ISO=$(mktemp -d -t debian-iso-XXXXXX.tmp)
DEBIAN_DL_ISO_PATH="${TEMP_DIR_ISO}/debian.iso" DEBIAN_DL_ISO_PATH="${TEMP_DIR_ISO}/debian.iso"
DEBIAN_PRESEED_ISO_PATH="$(dirname ${TEMP_DIR_ISO})/preseed-debian-${DEBIAN_VERSION_NB}-amd64.iso" DEBIAN_PRESEED_ISO_PATH="$(dirname ${TEMP_DIR_ISO})/preseed-debian-${DEBIAN_VERSION_NB}-amd64.iso"
# }}} # }}}
#USE_DEBIAN_ISO="${DEBIAN_ISO_DVD_URL}" #USE_DEBIAN_ISO="${DEBIAN_ISO_DVD_URL}"
@ -33,8 +32,12 @@ if [ ! $(command -v gzip) ]; then
printf '%b\n' "ERROR: Please install 'gzip' bin:\\nsudo apt install gzip" printf '%b\n' "ERROR: Please install 'gzip' bin:\\nsudo apt install gzip"
exit 1 exit 1
fi fi
if [ ! $(command -v genisoimage) ]; then if [ ! $(command -v xorriso) ]; then
printf '%b\n' "ERROR: Please install 'genisoimage' bin:\\nsudo apt install genisoimage" printf '%b\n' "ERROR: Please install 'xorriso' bin:\\nsudo apt install xorriso"
exit 1
fi
if [ ! -f /usr/lib/ISOLINUX/isohdpfx.bin ]; then
printf '%b\n' "ERROR: Please install 'isolinux' package:\\nsudo apt install isolinux"
exit 1 exit 1
fi fi
# }}} # }}}
@ -105,11 +108,14 @@ find . -follow -type f -not \( -name "md5sum.txt" -o -name 'mkisofs' -o -name 'B
cd - || exit 2 cd - || exit 2
# }}} # }}}
# Generate new bootable iso {{{ # Generate new bootable iso {{{
genisoimage -r -J -b isolinux/isolinux.bin -c isolinux/boot.cat \ xorriso -as mkisofs -o "${DEBIAN_PRESEED_ISO_PATH}" \
-quiet -no-emul-boot -boot-load-size 4 -boot-info-table \ -quiet -isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin \
-o "${DEBIAN_PRESEED_ISO_PATH}" "${TEMP_DIR_ISO}" -c isolinux/boot.cat -b isolinux/isolinux.bin -no-emul-boot \
-boot-load-size 4 -boot-info-table "${TEMP_DIR_ISO}"
# }}} # }}}
printf '%b\n' "The new ISO image is available: ${DEBIAN_PRESEED_ISO_PATH}"
# If extract image # If extract image
#rm -rf -- "${TEMP_DIR_ISO} #rm -rf -- "${TEMP_DIR_ISO}