Fixing Disk Utility image restore

by Pat Skinner on 10/10/2009

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 }

Jeff Byrnes December 7, 2009 at 9:19 pm

DAMN useful. Thanks a ton!

Yannick February 10, 2010 at 6:47 am

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! :)

Pat Skinner February 10, 2010 at 9:47 am

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′

Jed April 14, 2010 at 7:47 pm

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

Hristo May 27, 2010 at 8:08 am

Great article. Help me a lot. Thank you Pat.

b July 10, 2010 at 4:01 am

brilliant! thank you!

Leave a Comment

{ 1 trackback }

Previous post:

Next post: