On Sunday 06 June 2010 11:19:57 Andrea Conti wrote:
> > 1. boot up knoppix
> > 2. create a partition: mkdir /work
> > 3. mount /work to the root partition: mount /dev/sdc /work
> > 4. cd /work/usr/bin
> > 5. run dcfldd: ./dcfldd
> 
> This is fine, provided that
> 
> 1- if the root partition is [part of] what you're copying, you *must*
> mount it read-only (mount -o ro /dev/sdc /work)
> 
> 2- the dcfldd executable is linked statically. If it uses dynamic
> linking, your "live" system -- knoppix in this case -- must have exactly
> the same library versions (especially glibc) as the gentoo system.
> 
> >> Or is there a way to do such copies from a one disk to another while
> >>  one disk is booted???
> 
> The point is not with being "booted" (i.e., part of the running system)
> or not: you *cannot* reliably perform a sector-by-sector copy of any
> write-mounted partition without special support either at the FS or
> block device level (i.e. snapshots).
> 
> > Sure, but the running disk/sector would have temporary files that would
> > not consistently hash when you did the hash check.
> 
> That is only a minor part of the problem. The real issue is that if
> *anything* writes to the source partition while you are halfway through
> copy, you risk ending up with inconsistencies in the filesystem
> metadata. Doing a fsck on the copy will probably fix that, but you risk
> losing or corrupting data.
> 
> And no, hashing as described in the previous post will *not* catch any
> differences in this case, as the "source" hash is computed from what is
> read during the copy (which, barring hardware problems, is what gets
> written on the target disk) and not from the whole contents of the
> source partition after the copy (or at any single point in time).
> 
> > If you do this, try it in linux without bringing up X.
> 
> That's definitely not enough: at the very least, boot up in single-user
> mode and remount all your partitions read-only (mount -o remount,ro).
> This will break things on a running system (e.g anything that writes to
> /var and /tmp will throw errors or stop working), but it will allow you
> to produce consistent partition images.

It may be worth trying 'apt-get install dcfldd' after you su to root with 
Knoppix.  As long as Knoppix does not need a lorry load of dependencies you 
may be able to quickly install the .deb binary you need and move on with the 
task in hand.
-- 
Regards,
Mick

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to