Skip to main content Logo (IEC resistor symbol)logo

Quis custodiet ipsos custodes?
Home | About | All pages | RSS Feed | Gopher

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

Published: 11-12-2012 | Author: 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 tofit on a single layer DVD. The normal .dmg file will give an error that it is tobig for a single layer DVD. The install works fine afterwards, the .dmg filejust has a defined size of 4.75 GB. Resizing it via the Disk Utility will notwork because it is a read only dmg image.

If you like this article, consider sponsoring me by trying out a Digital OceanVPS. With this link you'll get $100 credit for 60 days). (referral link)

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

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

Copy and paste the following lines in a terminal, one by one. The first hdiutilcreate 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 SPUDsudo hdiutil attach -nobrowse /Applications/Install\ OS\ X\ Mountain\ hdiutil attach -nobrowse /private/tmp/Mountain\ Lion\ DVD\ Image\ read-write.dmgsudo cp -pRv /Volumes/Mac\ OS\ X\ Install\ ESD/* /Volumes/Mac\ OS\ X\ Install\ ESD\ 1/sudo hdiutil detach /Volumes/Mac\ OS\ X\ Install\ ESD\ 1sudo hdiutil detach /Volumes/Mac\ OS\ X\ Install\ ESDsudo 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