Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Apr 1999 11:13:55 -0700 (PDT)
From:      Doug White <dwhite@resnet.uoregon.edu>
To:        cjclark@home.com
Cc:        Dale Anderson <danderso@crystalsugar.com>, freebsd-questions@FreeBSD.ORG
Subject:   Re: Using Raw wd
Message-ID:  <Pine.BSF.4.03.9904211110460.27954-100000@resnet.uoregon.edu>
In-Reply-To: <199904202007.QAA10390@cc942873-a.ewndsr1.nj.home.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 20 Apr 1999, Crist J. Clark wrote:

> Dale Anderson wrote,
> >      I can't imagine how you would be able to write to a raw
> > unformatted disk partition.  The only way would be to write your own
> > disk access utilities, which would mean that you would create a
> > proprietary disk format of your own, that only your access routines
> > could get to. 
> >      Sounds a bit scarry, in my opinion.
> 
> I don't understand why that would be true (althoug it may be). I can
> write to a raw tape just fine with tar. I can do the same thing and
> tar directly to a floppy, no filesystem or special utilities needed
> (not that tar is not very special to me). Why can't I do the
> same with a hard drive? Plus, I've seen more than one mention of
> people using 'dd' to clone disks (not _that_ scares _me_).

I've never seen it; the only time someone tried got a 'Read-only
filesystem' error.  I suggested tar|tar or dump|restore.

> If it is true that it does not work for a hard drive, what is the
> fundamental difference between writing a tar archive to a raw tape,
> a raw floppy disk, or a raw hard disk?

A tape is a sequential-access device.  One bit goes before the other,
always.  The sa tape driver does the fixups for you.

A floppy has a fixed geometry based on size.  The fd driver lets you get
away with raw file dumps since it takes care of the fixups.

A hard disk has variable geometry and partition information in the
disklabel that is specific to the disk & slice.  You'd have to regenerate
the disklabel as you were writing the chunk.  The ?d driver does not do
the fixups necessary for this access mode to work correctly.

In sum: don't do that :)

Doug White                               
Internet:  dwhite@resnet.uoregon.edu    | FreeBSD: The Power to Serve
http://gladstone.uoregon.edu/~dwhite    | www.freebsd.org



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.03.9904211110460.27954-100000>