Why am I seeing “Unable to scan (resource busy)” in Disk Utility when I try to restore a disk image?

Why do I keep seeing “Unable to scan “disk image.dmg” (Resource busy)” and “Restore Failure – Could not validate source – Operation not supported” in Disk Utility in MacOS 10.9 when trying to restore a disk image (.dmg) to a USB drive?

Answer:

A “feature” of recent versions of MacOS “Disk Utility” requires that a source disk-image (.dmg) be “scanned” before it can be restored to a blank disk/partition:

 

DiskUtility-MustScanItFirst

A bug in Disk Utility causes the scan to fail with an error, even when it’s a good disk image:

 

DiskUtility-CouldNotValidateSource

DiskUtility-UnableToScan

The workaround:

1) Open up Terminal. Use the “diskutil” command-line utility to figure out (be careful!) which disk you want to restore onto:

eric@mac:~$ diskutil list
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                  Apple_HFS Macintosh HD            999.3 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     Apple_partition_scheme                        *2.0 TB     disk1
   1:        Apple_partition_map                         32.3 KB    disk1s1
   2:                 Apple_HFSX 2TB Disk                2.0 TB     disk1s3
/dev/disk2
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *2.0 TB     disk2
   1:                  Apple_HFS 2TB Disk B              2.0 TB     disk2s1
/dev/disk3
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *128.0 GB   disk3
   1:                        EFI EFI                     209.7 MB   disk3s1
eric@mac:~$ 

2) Use “asr” (Apple Software Restore) to restore the image, instead of Disk Utility.

eric@mac:~$ sudo asr -noverify -source ~/Desktop/MyAmazingImage.dmg -target /dev/disk3 --erase
	Validating target...done
	Validating source...done
	Erase contents of /dev/disk3 ()? [ny]: y
	Retrieving scan information...done
	Validating sizes...done
	Restoring  ....10....20....30....40....50....60....70....80....90....100
eric@mac:~$ 

3) Eject the USB disk and plug it back in. The correctly-restored drive should now appear.

 

Further reading:
http://www.onpaws.com/2009/10/fixing-disk-utility-image-restore/

Share: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Twitter
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Reddit
  • StumbleUpon

3 Comments

  1. Thanks, this worked, with one exception, latest MAC OS requires the –erase option on the command line. Also if you want to preserve the bootable partition you will also need to specify the subvolume (partition) name – aka disk3s1

    Jon

    • –erase is in the sample, but chopped off. Buggy wordpress or WPplugin or something. Can scroll to it. And people are going to specify the partition by the Identifier, yeah.

      Was able to get a lab machine to shut up and take a reimage without having to repartition, thanks.

Leave a Reply

Your email address will not be published. Required fields are marked *