*BSD News Article 2332


Return to BSD News archive

Path: sserve!manuel!munnari.oz.au!mips!decwrl!deccrl!news.crl.dec.com!news!nntpd.lkg.dec.com!sousa.ltn.dec.com!paradis
From: paradis@sousa.ltn.dec.com (Jim Paradis)
Newsgroups: comp.unix.bsd
Subject: Re: using mtools to access dos partitions
Message-ID: <1373@sousa.ltn.dec.com>
Date: 23 Jul 92 17:03:14 GMT
References: <BrtHvn.Is6@usenet.ucs.indiana.edu>
Organization: Digital Equipment Corporation, Littleton, MA
Lines: 36

mitchemt@silver.ucs.indiana.edu (Terrence Mitchem) writes:
: 
: 	Can anyone tell me how to set up the devices.c file that comes with
: mtools in order to access dos partitions on  hard drive? Which devices in /dev
: correspond to the partitions on the disk?  Does it make any difference if I am
: using a scsi controller (adaptec 1542b)?  All help is appreciated.

With the new "wd" driver that uses the "a5" partition for the BSD partition...
none of the devices in "/dev" correspond to the DOS partition.

HOWEVER:  the escape hatch is via /dev/wd0d.  The "d" partition covers the
*WHOLE* hard disk, whereas the "c" partition covers only the *whole*
386bsd area.

To build a devices.c file that lets you access the DOS partition, you
need to know the byte offset of the DOS partition from the start of
the hard disk.  You would then add an entry to the devices[] array
as follows:

	{'C', "/dev/wd0d", <byteoffset>L, 16, 0, (int (*) ()) 0, 0, 0, 0},

So, f'rinstance, if your DOS partition starts at the beginning of the disk,
you'd have:

	{'C', "/dev/wd0d", 0L, 16, 0, (int (*) ()) 0, 0, 0, 0},

On the other hand, if your DOS partition starts 32Mb into the disk, you'd
say something like:

	{'C', "/dev/wd0d", (32768L * 1024L), 16, 0, (int (*) ()) 0, 0, 0, 0},

Make sense?

-- 
Jim Paradis (paradis@tallis.enet.dec.com) 
Working for DEC, speaking for myself.