I've been testing clonezilla to clone XP boxes, and I've
encountered a bug related to restoring uncompressed
NTFS partitions.  I've provided a post-mortem and workaround
below.
 
Platform:
 
Fedora Core 6 + DRBL + Clonezilla
 
Here are some version numbers:
 
    # uname -a
    Linux clonezilla 2.6.18-1.2798.fc6 #1 SMP Mon Oct 16 14:54:20 EDT 2006 i686 i686 i386 GNU/Linux
    # rpm -qa | grep clone
    clonezilla-1.4.3-23
 
    # rpm -qa | grep drbl
    drbl-1.7.6-22
    freedos-1.0-11drbl
    etherboot-5.4.2-2drbl
    partimage-0.6.5_beta3-4drbl
    udpcast-20060921-1drbl
    lzop-1.02-0.6drbl
    drbl-chntpw-0.0.20040818-7
    drbl-ntfsprogs-1.13.1-4
   
The issue is that an NTFS partition backed up without
compression fails to restore.  The error message is
    Unknown format for sda1.ntfs-img!!! Program terminated!"
 
For anyone else trying to diagnose a problem, the method
I used to catch that error was:
  a) use the server-side setup to request that the client stop at the command line prompt,
  b) boot the client, (it tries to restore, fails, but clears the screen so you can't see the diagnostic)
  c) find the appropriate command line /etc/rc.d/rc1.d/S19ocs-run (in my case: /opt/drbl/sbin/drbl-ocs  --language 0 restoredisk herberton-test sda)
  d) re-run drbl-ocs
 
The error message (Unknown format for sda1.ntfs-img!!! Program terminated!")
is generated in this function:
/opt/drbl/sbin/ocs-functions:1712    get_image_cat_zip_cmd()
 
This function uses /usr/bin/file to determine the compression type
of the image and greps the result to determine which program
(cat, zcat, etc) should be used to cat the file.  For example:
 
 elif [ -n "$(file $imgf | grep -i "PartImage file .* not compressed")" ]; then
 
For a partition dumped with PartImage, /usr/bin/file prints something like:
    PartImage file version 0.6.1 volume 0 type fat32 device /dev/sda2, original filename sda2, not compressed
 
For an NTFS partition image dumped with ntfsclone, /usr/bin/file just prints:
    data
 
In that case, the if/then statement in get_image_cat_zip_cmd falls
through to the final error trap and exits with an error.
 
I was able to work around this problem by compressing the image
file with gzip, and renaming it to remove the .gz file extension
    cd /data/clonezilla/herberton-test   (note I use a non-standard path for the images)
    gzip sda1.ntfs-img
    mv sda1.ntfs-img.gz sda1.ntfs-img
 
Looks like it works now.  Until a fix is issued, I recommend
clonezilla users do not save NTFS partitions without compression.
 
And finally a bit thanks to the clonezilla authors - it looks like a very useful piece
of software.
 
Cheers,
Guy