Macos – do when I get a “Cannot Allocate Memory” error after restoring a disk image

disk-utilitymacososx-mountain-lion

I've downloaded Mac OS X Mountain Lion today and wanted to backup the installation image to a USB drive for later.

I've created a new empty partition of at least 8 GB size on the external drive using Disk Utility, and tried to restore the InstallESD.dmg image to this new partition, via the Restore menu.

However, doing that, I get the following error message, right after it finishes copying:

Cannot Allocate Memory

What can I do now?

Best Answer

This works:

 /Applications/Install\ OS\ X\ Yosemite.app/Contents/Resources/createinstallmedia --volume /Volumes/YOSEMITE/ --applicationpath /Applications/Install\ OS\ X\ Yosemite.app

Got it from Apple Support directly