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


Click here to return to the 'Burn OS X Mountain Lion installer to single-layer DVD ' 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 to single-layer DVD
Authored by: JFOC on Sep 13, '12 08:58:35AM

for somehow I need to add 'sleep' before detach to avoid resource busy

#! /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/yourhddvolumename not on the SSD
# 2012-08-07 02 prw References are all relative, not absolute. So SSD it is.
# 2012-09-13 03 JFOC adding some sleep to avoid resource busy on detach

# 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/Macintosh\ HD/Users/admin/Downloads/Mountain\ Lion\ 10.8/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/

sleep 10
hdiutil detach /Volumes/Mac\ OS\ X\ Install\ ESD\ 1
sleep 10
hdiutil detach /Volumes/Mac\ OS\ X\ Install\ ESD
sleep 10
echo "Converting to read-only..."
hdiutil convert /private/tmp/Mountain\ Lion\ DVD\ Image\ read-write.dmg -format UDZO -o ~/Mountain\ Lion\ DVD\ ImageLion.dmg
sleep 10
rm -f /private/tmp/Mountain\ Lion\ DVD\ Image\ read-write.dmg

echo "Image Creation Complete. Please burn '~/Mountain Lion DVD ImageLion.dmg' to a DVD using Disk Utility."
open ~/
#-----------------------------------------------------------------------------------------------------------



[ Reply to This | # ]