Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an iMac with the HD split into two equal size partitions. Both partitions are bootable with Snow Leopard. I then start-up partition 1 with an admin user account.

I want to create a disk image of partition 2 and save the .dmg file on partition 1. I have to do this remotely from a box running Linux.

The shell command I'm using is

ssh <username>@<ipaddress> "echo password | sudo -S hdiutil create -puppetstrings -srcfolder /Volumes/Part2 /Users/Shared/image.dmg"

When I run the command from the remote shell it consistently dies around 98%, but when I run the hdiutil from / of partition 1 on the box hosting partition 2, everything works as expected.

I've been able to run other hdiutil commands from the remote shell. I'm only having a problem with the create verb.

I don't believe it's a network issue because it always dies in the same place. I'm puzzled why the same command would behave differently when executed from a remote shell.

share|improve this question
    
Now I just had it die on the local box. I'm now thinking it has something to do with the puppetstrings option or the path provided before the image name. When I successfully ran the command I didn't have puppetstrings or a path. I suspect puppetstrings because the numbers are off. The command dies with the console showing 78.651413 four times before going to -1.000000. Plus 78% isn't an accurate reflection of the new image file size compared to the expected image file size. – ChrisP Dec 14 '10 at 21:10
    
There is something strange with puppetstrings. Normally I would kill the script when I see the console display percent: -1.000000 because the man doc says that is an error code. This time I was doing a different task and didn't kill the script and when I came back I saw the image had been successfully created. So I was getting thrown off by the feedback from puppetstrings because when I don't have that feedback I just wait for the shell to come back without killing the script. Anyone else use the puppetstrings option with the create verb? – ChrisP Dec 14 '10 at 21:49
    
As per here, a value of -1 means it's performing an operation "that will take an indeterminate amount of time to complete". Sounds about right, as I remember seeing the indeterminate progress bar indicator when I started a similar action from Disk Utility. – Daniel Beck Dec 15 '10 at 2:41
up vote 0 down vote accepted

Thanks to Daniel Beck for pointing out my error. I don't know how I misread that in my reading of the man doc.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .