[1329] in RedHat Linux List
Re: dd to copy
daemon@ATHENA.MIT.EDU (Mike Sangrey)
Sun Oct 27 19:37:46 1996
To: redhat-list@redhat.com
In-reply-to: Your message of "Sun, 27 Oct 1996 18:49:41 EST."
<Pine.LNX.3.95.961027182545.745A-100000@benatar.res.cmu.edu>
Date: Sun, 27 Oct 1996 19:35:44 -0500
From: Mike Sangrey <mike@sojurn.lns.pa.us>
Resent-From: redhat-list@redhat.com
Reply-To: redhat-list@redhat.com
William T Wilson wrote:
> > This statement is inaccurate. The drives do not need to be the same
> > size and have the exact same geometry. dd is a copy at the bit level
>
> Okay, perhaps they do not need the same geometry. They do however have to
> be the same size. Suppose the destination drive is SMALLER than the
> source drive. Then when dd tries to write out the data, it will write
> past the end of the device. If the destination drive is LARGER, then the
> filesystem which is created will think it is smaller than it is, which
> will drive everything nuts.
Yep! For amusement, try
dd if=/dev/fd0 of=/dev/hda1
where /dev/fd0 has a filesystem on it. You now have a 1.4M filesystem (less
overhead) on /dev/hda1. This extreme example makes the problem obvious. Hard
drives that are nearly the same could easily produce disastrous results; the
problem not being obvious till it's too late.
Using dd in this way is just too dangerous -- there is just too much
non-intuitive affects that could cause something to go wrong when using this
as a general purpose solution. Best to just stick with tar or cpio. dd
should be thought of as making a physical image copy. Not for copying files
or even a filesystem.
It might be useful after a mkisofs. Has anyone tried using dd to copy the
CDROM image to a CDROM writer? This is a case of physical image copy and this
is where dd shines.
--
Mike Sangrey <mike@sojurn.lns.pa.us> (Home)
<Mike.Sangrey@specmarkmet.com>(Work)
"I've trademarked `William Della Croce, Jr.(tm)'.
Anyone using this name owes me $1,000,000."
--
PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
________________________________________________________________________
http://www.redhat.com/RedHat-FAQ http://www.redhat.com/RedHat-Errata
http://www.redhat.com/RedHat-Tips http://www.redhat.com/mailing-lists
------------------------------------------------------------------------
To unsubscribe: mail -s unsubscribe redhat-list-request@redhat.com < /dev/null