Wednesday, November 20, 2013

HOWTO: Create a bootable Mac OS X Mavericks DVD/.iso (Bonus: uses the command line)

Almost all of the instructions only cover USB thumb drives, figuring that DVDs are dead in the Mac world.. This one makes a bootable .iso from the downloaded installer using only command line utilities. This is aimed at virtualization environments, where an .iso file is often used to bootstrap a virtual machine.

I've tested this, burned to a dual layer DVD and successfully booted a (mid-2011) Mac mini.

Note: you need to have the Mavericks installer already downloaded from the app store. Ideally, you will snag a copy before you upgrade.  If you buy a machine that is already pre-loaded you won't be able to download it from the app store.

HOWTO: Create a bootable Mavericks ISO - http://forums.appleinsider.com/t/159955/howto-create-bootable-mavericks-iso,  by user CrEOF. 

This is pretty cool, I learned a few things, but I need to learn more about hdiutil and sparse bundles. I suspect that older tutorials for making bootable OS X Lion DVDs would probably work the same way for OS X Mavericks.


Steps
# Mount the installer image
hdiutil attach /Applications/Install\ OS\ X\ Mavericks.app/Contents/SharedSupport/InstallESD.dmg -noverify -nobrowse -mountpoint /Volumes/install_app

# Convert the boot image to a sparse bundle
hdiutil convert /Volumes/install_app/BaseSystem.dmg -format UDSP -o /tmp/Mavericks

# Increase the sparse bundle capacity to accommodate the packages
hdiutil resize -size 8g /tmp/Mavericks.sparseimage

# Mount the sparse bundle for package addition
hdiutil attach /tmp/Mavericks.sparseimage -noverify -nobrowse -mountpoint /Volumes/install_build

# Remove Package link and replace with actual files
rm /Volumes/install_build/System/Installation/Packages
cp -rp /Volumes/install_app/Packages /Volumes/install_build/System/Installation/

# Unmount the installer image
hdiutil detach /Volumes/install_app

# Unmount the sparse bundle
hdiutil detach /Volumes/install_build

# Resize the partition in the sparse bundle to remove any free space
hdiutil resize -size `hdiutil resize -limits /tmp/Mavericks.sparseimage | tail -n 1 | awk '{ print $1 }'`b /tmp/Mavericks.sparseimage

# Convert the sparse bundle to ISO/CD master
hdiutil convert /tmp/Mavericks.sparseimage -format UDTO -o /tmp/Mavericks

# Remove the sparse bundle
rm /tmp/Mavericks.sparseimage

# Rename the ISO and move it to the desktop
mv /tmp/Mavericks.cdr ~/Desktop/Mavericks.iso
 
Now copy the .iso file or burn it to DVD with Disk Utility 

3 comments:

iBantu said...

didn't works anymore man....

billythehamster said...

Worked like a charm. Now I can restore an old time machine backup into VMWare to off some files I needed. Thanks!

جمال محمد said...

thanks sedi.