Macos – Restoring ASR/Disk Utility NTFS image on OS X

disk-managementmacosntfsntfs-3g

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

Best Answer

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.

Related Question