Back/restore with dd
penglish at hydro.washington.edu
Thu May 8 16:27:16 PDT 2003
On Thu, 8 May 2003, Pietralla, Siegfried P wrote:
> i've noticed the same thing. i was trying to duplicate my installation from
> ad0s1 to ad0s2 by copying each partition and had the same problem. i worked
> around this by using 'of=/dev/ad0' and VERY careful use of the 'seek'
> parameter ( e.g. " dd if=/dev/ad0 count=10 skip=nnnnn | od -c > /tmp/001 "
> and match this with " dd if=/dev/ad0s1e count=10 | od -c > /tmp/002 " using
> " sdiff /tmp/001 /tmp/002 " to validate the value for seek ).
> is there someone out there who knows how we can do this? fwiw, i think it
> used to work previously ( v 2.2.8 ? ) but it fails at 4.6 ( ? ) . i'm
> running 4.8 now so i'll give it another go on the weekend.
Hmm.. I did now get it to work, and unfortunately I can't remember how I
did it exactly. I believe it was along the lines of taking the output from
the original disklabel (which I had printed out) and creating a disklabel
file from it, then using that to install a new disklabel. This created the
device with the exact same parameters, then dd if=ad1s2e of=/dev/ad1s2e
worked perfectly (ad1s2e was the flat file dd copy of the original device
using dd if=/dev/ad1s2e of=ad1s2e).
More information about the freebsd-questions