[1275] in RedHat Linux List

home help back first fref pref prev next nref lref last post

Re: [Fwd: Re: moving contents of hard drive]

daemon@ATHENA.MIT.EDU (Mike Sangrey)
Sun Oct 27 12:05:31 1996

To: redhat-list@redhat.com
In-reply-to: Your message of "Sun, 27 Oct 1996 08:24:57 EST."
             <327362A9.740D9105@agapesystems.com> 
Date: Sun, 27 Oct 1996 12:02:50 -0500
From: Mike Sangrey <mike@sojurn.lns.pa.us>
Resent-From: redhat-list@redhat.com
Reply-To: redhat-list@redhat.com

Paul Anderson wrote:
> Mark Shacklette wrote:
> > 
> > The thread that dealt with this issue last summer mentioned cpio as a good
> > tool to use, and there was an article in the Linux Journal (March 1996, pp.
> > 44ff.) which explained how to do this using cpio.
> > 
> > Essentially, the command would be (assuming the target partition is mounted as
> > /mnt/export):
> > 
> > find / -depth -xdev | cpio --pass-through --preserve-modification-times
> > --make-directories --verbose /mnt/export
> > 

> > 
> In comparision to "dd if=/dev/XXX of=/dev/XXX" the command structure you
> propose seems very complex.  dd also gets all files with permissions
> down to the bit level and will not cross mount points.  The beauty of
> Unix is that you can dream up ever more complex ways of doing what is
> easily accomplished.  However, the orginal mindset of Unix, other than
> for playing games, was to make small tools that were easy to use and be
> compiled into larger tools when that was necessary.  And just in case
> you want dd to be a more complex command, there are many switches which
> can be set.
> 

Hmmmmmm...

Lets say /dev/XX1 is different in size from /dev/XX2 (your "if=" and "of=", 
above).  The dd command you propose will copy over things like the superblock, 
which, correct me if I'm wrong, will need to be different.

``dd'' does an image copy.  For example, if you create a file system on a 3.5" 
floppy and do a ``dd if=/dev/fd0 of=/tmp/foobar'', /tmp/foobar will be 1.4M in 
size.  If you put 1M of files on that floppy's filesystem and issue the 
command again, foobar will be 1.4M in size.  If you trash the filesystem 
altogether and do a ``tar -cf /dev/fd0 /etc'', and then issue the dd command 
again, foobar will be 1.4M in size.  Lastly, if you create a filesystem on 
that floppy again and do ``dd if=/dev/fd0 of=/dev/hda1'' (as you suggested 
above), you'll have a hard drive (partition actually -- /dev/hda1, in this 
case) with a 1.4M filesystem on it minus the overhead.  Really neat, but not 
really useful here.  It IS really useful if you want to create N identical 
images.  Say you're a Linux Hard Drive supplier and you're going to ship hard 
drives with linux already installed.  Bingo, ``dd'' is perfect.

Just trying to nip some misinformation in the bud before it goes to far.

-- 
  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


home help back first fref pref prev next nref lref last post