Can't execute hdiutil create from remote machine

0

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.

ChrisP

Posted 2010-12-14T20:45:00.243

Reputation: 101

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 – 2010-12-14T21:10:33.823

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 – 2010-12-14T21:49:33.620

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 – 2010-12-15T02:41:51.440

Answers

0

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

ChrisP

Posted 2010-12-14T20:45:00.243

Reputation: 101