Martin and I took a look at using dd to "ghost" a partition on a Mac. On Radish, we ran the command:
dd bs=5120 if=/dev/rdisk1s3 of=/Volumes/Storage/testing/radish.img
The command ran successfully, and 20 minutes later we had a 20GB image. When I tried to mount it, however, it turned in to a 0kb file. Oops! Not sure why; I probably screwed something up.
Next we tried a simpler command:
dd if=/dev/rdisk1s3 | gzip -c5 > /Volumes/Storage/testing/radish.gz
The syntax is pretty simple. "if" is the input, in this case the 3rd partition on disk 1. "| gzip -c5 > " sends the input to the gzip command, using a modest compression level and then writes it, using ">", to "of", which is the output file.
The point here is to try to create a simple, automatable system for building *nix-based machines (like in a lab). Our hope is that we can create a master machine, run a "dd" like command to create an image of the OS partition, rsync it to a server and then rsync it back to lab machines for rebuild. rsync is our weapon of choice because it does its thing by only replacing the bits in a file that have changed. Ostensibly, this means that we can make a simple change to the master machine, re-image it using "dd", rsync it to the server (which will only replace the pertinent bits) and then have lab machines rsync against the updated image (again, only changing the important bits) and then run "dd" again to build the local machine.