> > Thanks Ed for the tip ! While mulling this over I
> > wondered what would happen when one dd's to a larger
> > drive. Does the target have to have ext2fs already
>
> What is on the target is irrelevant if you dd to it.
> If you dd to a drive with a different geometry, at best
> it will act like the smaller drive and waste the space,
> and at worst it will corrupt and fail and such.
>
> It is much safer to do a cpio copy.  I usually use rsh/rshd,
> but with the nc example given, you would do:  (On a _mounted_
> filesystem, of course!)
>
>  nc -l -p 7001 | cpio -iuvmdb
>
>  find / | cpio -ob | nc -w 3 -n 192.168.0.240 7001
>
> You should only consider using dd if you really really understand the
> implications...
>
> The advantage of rsh/rshd is that you control it more easily from one
> side, you would't type a command on both machines as above...
>
> -Tom

While we're on the subject of using dd, a really useful application is
installation testing.  That is, you're testing how the installation part of
software you've written works.  Most of the time, it can take several hours
to build the environment from which you can do a clean install test.  Once
you do, it would be nice to use that environment over and over again.  To do
this, simply create two equal sized partitions on the drive and install your
OS of choice on the first partition (ok, ok, I use this to test Windows
application installs).  Next, boot tomsrtbt and dd the first partition to
the second.  Now do your test.  When you want to do the test again, dd the
second partition back to the first and voila, you're back in business in a
clean environment.

Some hints though.  Don't forget to give a block size for your dd.  bs=16384
works well for me, but you can probably go higher.  If you don't, the copy
can take a long time.  Also, it helps to make the second partition a weird
type, especially with Windows.  If you don't then the second partition will
appear as a second drive that you (or Windows) can easily corrupt.

HTH
John

Reply via email to