Skip to main content

Raymii.org Raymii.org Logo

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

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


❗ This post is over eleven years old. It may no longer be up to date. Opinions may have changed.

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.

Recently I removed all Google Ads from this site due to their invasive tracking, as well as Google Analytics. Please, if you found this content useful, consider a small donation using any of the options below:

I'm developing an open source monitoring app called Leaf Node Monitoring, for windows, linux & android. Go check it out!

Consider sponsoring me on Github. It means the world to me if you show your appreciation and you'll help pay the server costs.

You can also sponsor me by getting a Digital Ocean VPS. With this referral link you'll get $200 credit for 60 days. Spend $25 after your credit expires and I'll get $25!

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: http://hints.macworld.com/article.php?story=20120727121953498. 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\ Lion.app/Contents/SharedSupport/InstallESD.dmg
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