For some reason, restoring a DMG image to a block device has been an atypically frustrating experience under Leopard and Snow Leopard. Apple Disk Utility comes back with user unfriendly errors citing an ‘invalid argument’. For some reason Disk Utility insists on doing some silly ‘image scan’ which never actually works, thereby blocking any successful image restore. Delving deeper I thought it was likely some other component utilized by Disk Utility was failing and I found what it was.
It turns out that Disk Utility employs Apple’s ASR utility, stored at
/usr/sbin/asr
To learn more you can run ‘asr’ by itself in Terminal. While
man asr
shows a lot more, I’ll save you from reading that (this man page has even got a History section).
Simply restore without an image scan:
$ sudo asr -noverify -source source -target target
{ 6 comments… read them below or add one }
DAMN useful. Thanks a ton!
Really useful! But with valid commands. U have to read man asr!
Example:
sudo asr –noverify –source /Volumes/xxx/osx_leopard_snow.dmg –target /Volumes/osxleopardsnow
Do not use the default name like UNTITLED 1 cause it read the spaces and give for “1″ an option meaning…
Thx the post anyway!
I’m glad this tip was helpful.
@Yannick: Most shells in UNIX & Windows use whitespace as a delimiter. You can still use the name UNTITLED I, but you would have to use quotes, i.e.
sudo asr –noverify –source /Volumes/xxx/osx_leopard_snow.dmg –target ‘/Volumes/UNTITLED 1′
Also this won’t work if you forget the $ before sudo (with no space) and don’t forget the spaces after -source and after -target. Here’s the complete right syntax.
$sudo asr –noverify –source /Volumes/xxx/osx_leopard_snow.dmg –target /Volumes/osxleopardsnow
Great article. Help me a lot. Thank you Pat.
brilliant! thank you!
{ 1 trackback }