Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Apr 1999 14:52:12 -0500
From:      "Dale Anderson" <danderso@crystalsugar.com>
To:        <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Using Raw wd
Message-ID:  <s71c94a3.093@mail>

next in thread | raw e-mail | index | archive | help
     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.

>>> "Crist J. Clark" <cjc@cc942873-a.ewndsr1.nj.home.com> 04/20/99 02:34PM =
>>>
I'm having some trouble using a slice on a hard drive as a raw
device. A co-worker would like some space always available to write CD
images. He has a DOS slice on his hard drive (IDE) that he does not
mind taking a ~650 MB chunk out of. He had three slices, one where NT
lived (wd0s1), the DOS partition (wd0s2), and FreeBSD (wd0s3). I took
a chunk out of the DOS parition[0], and made a fourth slice (wd0s4).

Now, my personal preference would be _not_ to put a filesystem on this
slice. It's only ever going to be used to store a CD image, and it
would be cool to just have to,

# mount -t cd9660 /dev/wd0s4 /cdrom

To test your image[1][2].

However, I have been unable to write to the slice as a raw
device. After some troubles learning the intricacies of MSDOS style
partitions, I do now have a partition table that the BIOS is happy
with. But attempts to test write to the slice by using mkisofs, or
just 'tar cvf /dev/wd0s4 something', cause Very Bad Things[3] to
happen. Writing to /dev/rwd0s4 gives the resonse that the filesystem
is read-only. BTW, /dev/wd0s4 and /dev/rwd0s4 do exist.

How can I treat a slice like a raw device? I didn't think I needed to
give it a disklablel or filesystem. Am I wrong? Thanks for any help.

[0] Learning the hard way about MSDOS partition's odd predilection for
    'track boundaries.' For this hard drive, this meant that
    partitions needed to consist of an integer multiple of 16065
    blocks, 63x255 (and not 64x256... whatever, live and learn).

[1] No need to go through vnconfig, or to teach the user of the=09
    machine how to go through vconfig.

[2] Add the apropriate fstab entry and just 'mount /testcd' or the
    like.

[3] Complete freeze ups and kernel panics.=20
--=20
Crist J. Clark                           cjclark@home.com=20


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



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?s71c94a3.093>