From f1592b92a6324d13f1e94ec992d0a4ebadd5f579 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Thu, 15 Apr 2021 01:30:56 -0600 Subject: [PATCH] Reduce macOS image size Having a DMG also allows us to use dmg2img to convert into a raw HFS+ image. That image can be applied to a partition using dd under Linux. --- setup/macos/update-base-image | 1 + 1 file changed, 1 insertion(+) diff --git a/setup/macos/update-base-image b/setup/macos/update-base-image index 2ad34a53..abfc00ed 100755 --- a/setup/macos/update-base-image +++ b/setup/macos/update-base-image @@ -125,4 +125,5 @@ hdiutil detach "${WK_IMAGE_DEV}" # Convert to compressed read-only image echo "Converting to read-only image..." +hdiutil resize -sectors min "${OUT_NAME}.sparsebundle" hdiutil convert -format UDZO -o "${OUT_NAME}.dmg" "${OUT_NAME}.sparsebundle"