From 492b8f722a49494539038175d3479247949640b7 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Fri, 15 Nov 2024 14:48:35 +0100 Subject: [PATCH] v9.9 - DietPi-Imager | Do not compress ISO images, as flashing tools do not support it,without extraction, and the size reduction is minimal - DietPi-Build | Build VM ISO installer image as well, if all VM types are requested. --- .build/images/dietpi-build | 9 +++++++++ .build/images/dietpi-imager | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.build/images/dietpi-build b/.build/images/dietpi-build index 3b07e2c463..50269ea97b 100755 --- a/.build/images/dietpi-build +++ b/.build/images/dietpi-build @@ -722,6 +722,15 @@ fi # Since qemu-img does not support VMDK and VHDX resizing, we need to resize the raw .img. It is usually done as sparse file, hence the actual disk usage does not change. G_EXEC qemu-img resize "$OUTPUT_IMG_NAME.img" 8G +####### ISO ############################## +if [[ $VMTYPE == all ]] +then + CLONING_TOOL='Clonezilla' OUTPUT_IMG_NAME="${OUTPUT_IMG_NAME}_Installer" + G_DIETPI-NOTIFY 2 "Running DietPi-Imager for $G_GITOWNER/$G_GITBRANCH" + bash -c "$(curl -sSf "https://raw.githubusercontent.com/$G_GITOWNER/DietPi/$G_GITBRANCH/.build/images/dietpi-imager")" 'DietPi-Imager' "${IMAGER_ARGS[@]}" || exit 1 + CLONING_TOOL='dd' OUTPUT_IMG_NAME=${OUTPUT_IMG_NAME%_Installer} +fi + ####### VMX/VMware/Parallels ############# if [[ $VMTYPE =~ ^(vmx|all)$ ]] then diff --git a/.build/images/dietpi-imager b/.build/images/dietpi-imager index 8557a0fc97..af0885f60c 100755 --- a/.build/images/dietpi-imager +++ b/.build/images/dietpi-imager @@ -322,7 +322,7 @@ G_DIETPI-NOTIFY 0 "Mounted the image ($FP_SOURCE_IMG) as loopback device: $FP_SOURCE" FP_ROOT_DEV="${FP_SOURCE}p${FP_ROOT_DEV: -1}" fi - [[ $CLONING_TOOL == 'dd' ]] && OUTPUT_IMG_EXT='img' || OUTPUT_IMG_EXT='iso' + [[ $CLONING_TOOL == 'dd' ]] && OUTPUT_IMG_EXT='img' || OUTPUT_IMG_EXT='iso' SKIP_ARCHIVE=1 # Flashing tools do not support xz-compressed ISOs G_DIETPI-NOTIFY 0 "\e[0mCreating minified image from: - $SOURCE_TYPE: ${FP_SOURCE_IMG:-$FP_SOURCE} - Root device: $FP_ROOT_DEV