Apple released the latest upgrade of OS X some days back and it's always good to keep your system updated. There are so many guides out there to create a bootable USB installer for Mavericks and I think most of the Mac users already know about that.

The Mavericks upgrade can be downloaded from Apple App Store and it comes in .app format. It is a huge file and takes a lot of time to download, and so it is good to keep the 4.9GB file in a safe place. I came up with an idea to make a bootable DMG or ISO from the Mavericks App so that if I want to use the Installer again, I just need to use the DMG or ISO.

osx-mavericks

I personally find it easy to handle with Image files. You can quickly restore them on USB or a DVD.

So, to create a bootable ISO or DMG file from the Mavericks App you downloaded from the App Store, follow the steps below.


Hit the Terminal on your Mac and run the following Terminal commands. Also, make sure that the Mavericks App is in Applications folder. Also, you have to make sure that the name of the files and directories matches in the following commands, adjust the commands according to you if necessary.

# 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

Some steps will take some time to execute as it copies the data from the app to the sparse-image in the temporary folder. If everything goes fine, the end step will create a file on your Desktop named "Mavericks.iso". This image file is what you needed, you can use the Disk Utility to convert it to DMG file if needed.

Now, you can restore the DMG or ISO on your USB whenever you need the Installer.