I used the OS X (10.6.7) Disk Utility to make an image of an NTFS partition/volume. The resulting DMG file was imagescanned.

Now, when I come to try to restore the image to a new partition on the same machine (whose size is larger than the original, just to be sure), I am informed that 'Source image volume size is not an exact multiple of 1 MiB'.

I have read some solutions which suggested shrinking/compacting the NTFS volume before taking the image but it's a little too late for me now!

Is it possible to tweak the DMG file so that ASR doesn't complain? I'd prefer to avoid doing the in-place restore on a new, empty NTFS volume (since it's less efficient).

NTFS-3g is installed and available.

Many thanks.

marley:~ root# asr restore --source windows.dmg --target /dev/disk0s3 --erase
    Validating target...done
    Validating source...done
    Erase contents of /dev/disk0s3 ()? [ny]: y
    Repartitioning target device...
Source image volume size is not an exact multiple of 1 MiB

There is a bug in 10.6.x (at least up to 10.6.7, which I just tested...) Disk Utility and the command line both make the partition the wrong size. Shrinking the disk image won't help, OSX will just make it that critical few hundred bytes wrong for whatever the new slimmer image is. I just re-confirmed testing from last. flipping. year. for the same issue. If you have a Leopard (that is 10.5.x) boot cd you can use that to restore it I think. NTFS tools uses a different file format, so if you use that you can't directly restore them with Disk Utility.

For an extra kick in the pants, OSX destroys the existing windows partition before it errors out, so if there actually IS something wrong with the source image, it would be nice if would check BEFORE it wipes the existing partition.

It's the sort of thing I expect from Vista or Windows Millennium edition, not Apple.

  • See the other answer about partition map scheme MBR. That fixes the problem.
    – meelash
    Aug 15 '20 at 1:05

Make sure your destination disk uses a partition map scheme of MBR instead of GUID and Disk Utility should be able to successfully restore the image. That did the trick for me.

  • This worked for me trying to install the OCZ Toolbox on an USB stick from Mac OSX. Thanks!
    – kasakka
    Apr 5 '14 at 10:12
  • This is the right answer!
    – meelash
    Aug 15 '20 at 1:03

Try running hdiutil resize on a copy of your disk image. man hdiutil and hdiutil resize -help explain additional options.

  • Anyway, no luck I'm afraid: marley:~ root# hdiutil resize -size 65660780544 windows.dmg hdiutil: resize: failed. Operation not permitted (1) I suspect it's because NTFS volumes aren't resizable? Edit: When getting information about the image the following is output: Resize limits (per hdiutil resize -limits): min cur max 287321834 287321834 287321834 Full text is at pastebin.com/ysJY5P31
    – leegent
    May 7 '11 at 11:07
  • Regarding the additional information, I don't know any other options, as I don't need to handle NTFS anymore -- except maybe copying instead of restoring and not caring about the meta data that might get lost...
    – Daniel Beck
    May 7 '11 at 11:18
  • Thanks and thanks! I'll bite the bullet and try the file-wise restore.
    – leegent
    May 7 '11 at 11:31

Try this:

asr restoreexact  --source windows.dmg --target /dev/disk0s3 --erase

restoreexact is a relatively new option in asr. It tries to make the target partition the exact same size - and if it can - starts restoring.

  • Same error as with disk utility
    – John Smith
    Jan 19 '18 at 17:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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