Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
    
If you found this because you are trying to build a USB installer for Yosemite (or later), check out Christian Bongiorno's answer. –  quickthyme Dec 29 '14 at 23:09

3 Answers 3

It could be that there is a checksum mismatch for the disk image, or you experienced a bug in Disk Utility.

You can try to use the asr command-line utility to copy the image yourself. To do that, you need:

  • The InstallESD.dmg image
  • A large enough HFS+ partition on an external drive created through Disk Utility, let's call it Install
  • A running terminal

In your terminal, enter the following line, but replace the path to your OS X installer image and the target partition:

asr restore --source Desktop/InstallESD.dmg --target /Volumes/Install

Now, you should get output similar to the following:

Validating target...done
Validating source...done
Retrieving scan information...done
Validating sizes...done
Copying    ....10....20....30....40....50....60....70....80....90....asr: did not copy blessed information to target, which may have missing or out-of-date blessed folder information.
100
Ejecting the source image...done

Now, you can boot into the installer from your USB drive too. To verify if it worked, go to System Preferences » Startup Disk, and check if your installer appears:

enter image description here

share|improve this 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

share|improve this answer
    
Even though the original question came long before, now that Yosemite has pulled the rug out from under itself, a lot of people are going to run into this and will likely end up here, so thanks for sharing this answer! –  quickthyme Dec 29 '14 at 23:01

The asr command line suggested does not work under Mavericks, at least not in my case. (I get the error message File copy is not supported anymore. Use the --erase flag).

I was able to get around the Cannot allocate memory error by simply mounting the .dmg and having it mounted when I do the restore.

share|improve this answer
    
Got the same: bash-3.2# asr restore --source /Applications/Install\ OS\ X\ Yosemite.app/Contents/SharedSupport/InstallESD.dmg --target /Volumes/YOSEMITE/ File copy is not supported anymore. Use the --erase flag. bash-3.2# asr restore --erase --source /Applications/Install\ OS\ X\ Yosemite.app/Contents/SharedSupport/InstallESD.dmg --target /Volumes/YOSEMITE/ Validating target...done Validating source...done Could not find any scan information. The source image needs to be imagescanned before it can be restored. –  Christian Bongiorno Nov 29 '14 at 17:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.