Restoring ASR/Disk Utility NTFS image on OS X

3

1

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

leegent

Posted 2011-05-07T10:35:43.303

Reputation: 133

Answers

1

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.

CSCSCS

Posted 2011-05-07T10:35:43.303

Reputation: 26

4

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.

jeff krueger

Posted 2011-05-07T10:35:43.303

Reputation: 41

This worked for me trying to install the OCZ Toolbox on an USB stick from Mac OSX. Thanks! – kasakka – 2014-04-05T10:12:45.767

2

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

Daniel Beck

Posted 2011-05-07T10:35:43.303

Reputation: 98 421

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 http://pastebin.com/ysJY5P31

– leegent – 2011-05-07T11:07:14.060

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 – 2011-05-07T11:18:47.160

Thanks and thanks! I'll bite the bullet and try the file-wise restore. – leegent – 2011-05-07T11:31:52.920

0

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.

Matthew Elvey

Posted 2011-05-07T10:35:43.303

Reputation: 419

Same error as with disk utility – John Smith – 2018-01-19T17:57:54.023