Hi Terry,

> So (at long last) here is the question.  Why does PartImage need a
> bigger partition to store its image into than the one it came from,
> even though I am using compression?

Compression, as I'm sure you know, can make things larger sometimes.
Otherwise I'd just compress the compressed output.  And then compress
that some more.  And...  Profit!

I'd expect a recovery partition would already have compressed contents
with high entropy so your compression is probably just burning CPU time
and coming up with a slightly larger result;  "Here's a large number of
bytes that aren't compressed" followed by the original data.  The
exception to that may be the filesystem's data, but it's probably a
small amount of the partition.

Also, it sounds like you've made a filesystem in the destination
partition and want the copy to appear there as a file or two.  That
filesystem will use up some of the partition's space for its own data,
e.g. what you see with `ls -l', so to image a 1GiB partition to a file
in a filesystem needs at least 1GiB of free space in that filesystem, as
reported by `df'.

> Secondary question; is it creating temporary files in the target
> directory?  If so, how much bigger does the target partition need to
> be?

You'd hope not, wouldn't you, but it may be.

Let me get this right, you want to an image of a partition split across
two files so each can be burned to a DVD?  Ensure the source partition
is unmounted, we don't want it changing during the copy, then

    src=/dev/sda1
    n=7000
    cd /destination/partition/with/space/for/images
    sudo dd if=$src of=win7.1_of_2.img bs=1M count=$n
    sudo dd if=$src of=win7.2_of_2.img bs=1M skip=$n

The block size, `bs', is 1MiB, i.e. 2^20 not 10^6;  that's how much dd
will read(2) and write(2) at a time.  `count' is how many of those
blocks to copy;  you may want to change n from 7000 so you're happy both
parts will fit on a DVD each.

Once you've got the two image files on disk you can see if they match
the source.  Either

    sudo sha1sum $src
    cat win7.?_of_2.img | sha1sum

to see both give the same digest or

    sudo cmp $src <(cat win7.?_of_2.img)

The former will allow the hard disk to read all the data sequentially,
the latter will have it keep seeking between the two partitions, and
seeks and settle time are slow.

You can do similar checks once the files are on DVDs.

dd can be used to copy back the image files into a partition.  One word
of caution, is everything need for recovery definitely in the one
partition?  No hidden bits around the disk anywhere?  That would catch
out PartedMagic as well, of course.

Cheers, Ralph.

--
Next meeting:  Bournemouth, Tuesday 2012-03-06 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread on mailing list:  mailto:dorset@mailman.lug.org.uk
How to Report Bugs Effectively:  http://goo.gl/4Xue

Reply via email to