Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Burn OS X Mountain Lion installer -revised script' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Burn OS X Mountain Lion installer -revised script
Authored by: prwiding on Aug 07, '12 12:32:37PM
The shell script does require some modification. I have copied my version of the script below.

I had the install app in a Downloads folder. You will need to change that reference to where your copy of the app is located.


#! /bin/bash
#  2012-08-07  01  prw  from Mac OS X Hints web site...
#                       added backslash before spaces in image names...
#                       Should be run on /Volumes/Scar not on the SSD
#  2012-08-07  02  prw  References are all relative, not absolute. So SSD it is.

# Remove any old copies of the DVD image before we begin.
rm -f /private/tmp/Mountain Lion DVD Image read-write.dmg

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

hdiutil attach -nobrowse \
/Volumes/Scar/Users/prw/Downloads/Install\ OS\ X\ Mountain\ Lion.app/Contents/SharedSupport/InstallESD.dmg
hdiutil attach -nobrowse /private/tmp/Mountain\ Lion\ DVD\ Image\ read-write.dmg

echo "Copying Mountain Lion to new image..."
cp -pRv /Volumes/Mac\ OS\ X\ Install\ ESD/* /Volumes/Mac\ OS\ X\ Install\ ESD\ 1/

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

echo "Converting to read-only..."
hdiutil convert /private/tmp/Mountain\ Lion\ DVD\ Image\ read-write.dmg \
-format UDZO -o ~/Mountain\ Lion\ DVD\ Image.dmg

rm -f /private/tmp/Mountain\ Lion\ DVD\ Image\ read-write.dmg

echo "Image Creation Complete. Please burn '~/Mountain Lion DVD Image.dmg' to a DVD using Disk Utility."
open ~/
#-----------------------------------------------------------------------------------------------------------
This ran in Terminal, after I saved the text as "MLresize.sh", using nano, and ran
    chmod 755 MLresize.sh   
on the file.

(I've got a lot of blank DVDs. And they won't get zapped by lightning like my Base Station did.)

The script ran in a few minutes, much less time than actually burning the DVD.
I just dropped the created .dmg file into Disk Utility, selected it, and clicked on burn.
After burning, the disc shows in System Preferences->Startup Disk as bootable.
Although I haven't tried it out yet.

[ Reply to This | # ]