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

migrated from serverfault.com May 7 '11 at 10:39

This question came from our site for professional system and network administrators.

3 Answers 3

up vote 0 down vote accepted

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.

share|improve this answer

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

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

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.

share|improve this answer
    
This worked for me trying to install the OCZ Toolbox on an USB stick from Mac OSX. Thanks! –  kasakka Apr 5 at 10:12

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.