Friday, January 15, 2010

imaging instructions

The first thing to do is to make what we are going to copy smaller.
The way to do this is to fill the disk with zeroes so that it will
compress well.

We'll do this by booting up the machine using a cd, any cd will work
we want to run off of the cd though and not the hard drive.

You'll need to set up the networking. How will depend a bit on which
cd you use. You'll want to use a static address
address: X.Y.Z.150
netmask: 255.255.255.0
network: X.Y.Z.0
gateway: X.Y.Z.254
nameserver: X.Y.0.1

After booting up, then mount each partition, and create an empty file.
Do this with something like:

dd if=/dev/zero of=/PATH/zero.txt
where PATH is a path to put the file on the right partition.
After the transfer we'll need to delete these files.

After the partitions are full of zeroes then we'll run
dd if=/dev/sda bs=4k | gzip -c | nc -q 1 X.Y.Z.ABC 3333

ABC is the machine number of where we are sending it. Wait though
to hit return on this until we set up the destination.

To set up the destination, boot it up with another CD, it doesn't
matter which, again the goal is to run it from the cd and not the
hard drive.

Again, you'll need to set up the networking. See above, the only
difference is to give it a different last number. Something like
X.Y.Z.151

Once you have a terminal run
nc -l -p 3333 | gunzip | dd of=/dev/sda bs=4k

Then hit return on the sending machines

Now check that the hard drive lights on both machines. This will probably
run for a while.

After it is done, then on the destination machine remove the zero.txt files,
and you are mostly done. It should be possible to boot the machine up and
test it.

We should do one transfer first and then test it.

No comments: