Skip to main content

Resize OS X Mountain Lion installer to fit on a single layer 4.7 GB DVD

11-12-2012 | Remy van Elst | Text only version of this article

Table of Contents

This script will help you resize the OS X Mountain Lion InstallESD.dmg file to fit on a single layer DVD. The normal .dmg file will give an error that it is to big for a single layer DVD. The install works fine afterwards, the .dmg file just has a defined size of 4.75 GB. Resizing it via the Disk Utility will not work because it is a read only dmg image.

You need to download OS X Mountain Lion via the App Store. This script assumes that file path.

This is an adapted version of this script: It has the file remove lines removed, and a few other things changed.

Copy and paste the following lines in a terminal, one by one. The first hdiutil create line, the cp and the last hdiutil convert line might take a while.

sudo hdiutil create -size 4.2g -volname "Mac OS X Install ESD" /private/tmp/Mountain\ Lion\ DVD\ Image\ read-write.dmg -fs HFS+ -layout SPUD
sudo hdiutil attach -nobrowse /Applications/Install\ OS\ X\ Mountain\
sudo hdiutil attach -nobrowse /private/tmp/Mountain\ Lion\ DVD\ Image\ read-write.dmg

sudo cp -pRv /Volumes/Mac\ OS\ X\ Install\ ESD/* /Volumes/Mac\ OS\ X\ Install\ ESD\ 1/

sudo hdiutil detach /Volumes/Mac\ OS\ X\ Install\ ESD\ 1
sudo hdiutil detach /Volumes/Mac\ OS\ X\ Install\ ESD

sudo hdiutil convert /private/tmp/Mountain\ Lion\ DVD\ Image\ read-write.dmg -format UDZO -o ~/Desktop/Mountain\ Lion\ DVD\ Image.dmg

Tags: 10.8  apple  dvd  mac  mountain-lion  os-x  tutorials