Create an image of a partition using OpenSource tools

Introduction

This process will copy an entire partition to a file. It will not copy an entire disk to a file. The advantage is that you can change the size of the disk and it only copies the data, not the empty bits on the disk.

Prepare

  1. Download SystemRescueCd and burn it to a CD.
  2. Have a ssh server available on your network.
  3. If networking is not an option, consider connecting the disk to a system that can do the backup.
  4. On Windows machines, be sure to run JKDefrag.
  5. Especially for Windows, it seems to work best if the system shutdown was graceful. Do not try this from a hibernated system or immediately after a crash unless it’s the last resort.
  6. BE CAREFUL! Probably best not to use these tools for systems with critical data. In such cases, just buy something more advanced.

Make the image:

  1. Boot the source system with SystemRescueCd.
  2. Enable the network. (ifconfig eth0 x.y.z.1)
  3. Create a /mnt directory for the destination. (mkdir /mnt/ssh)
  4. Mount ssh. I used sshfs login@ssh.server.org:/path/to/dir /mnt/ssh
  5. Identify the partitions fsarchiver probe
  6. Use fsarchiver. I used fsarchiver savefs -s 680 /mnt/ssh/test.fsa /dev/sda1 for CD. I used a -s 4470 for DVD’s. Note the .fsa extension. Note: process may max out for a long time but only write 243 bytes to the output file, but it will work eventually.
  7. See also http://www.fsarchiver.org/QuickStart

Restore the image:

  1. Boot the target system with SystemRescueCd.
  2. Enable the network. ifconfig eth0 x.y.z.1
  3. Create a /mnt directory for the source. Maybe mkdir /mnt/ssh.
  4. Run startx to get into a UI. Then use gparted to edit partitions.
  5. Mount ssh I used sshfs login@ssh.server.org:/path/to/dir /mnt/ssh
  6. Identify the partitions fsarchiver probe.
  7. Use fsarchiver I used fsarchiver restfs /mnt/ssh/disk.fsa id=0,dest=/dev/sda1,mkfs=reiserfs Note: this will automatically span files.
  8. See also http://www.fsarchiver.org/QuickStart