*BSD News Article 89778


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.cs.su.oz.au!inferno.mpx.com.au!news.unimelb.EDU.AU!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!howland.erols.net!worldnet.att.net!europa.clark.net!news.msfc.nasa.gov!sol.ctr.columbia.edu!news.ess.harris.com!usenet
From: Gregory James Cusick <gcusick@harris.com>
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Notes on a Win95/FreeBSD, 2 drive installation.
Date: Tue, 18 Feb 1997 22:28:54 -0800
Organization: Harris Corporation
Lines: 95
Message-ID: <330A9DA6.6691@harris.com>
References: <5e7g8i$14i@news1.panix.com>
Reply-To: gcusick@harris.com
NNTP-Posting-Host: pcw21450.hisd.harris.com
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 3.01Gold (Win16; I)
CC: awnbreel@panix.com
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:35865

Michael R Weholt wrote:
[deleted introduction]
> 
>         The reason this is important is because (as I discovered when
> I attempted to designate my Drive H: as FreeBSD's swap space), FreeBSD
> cannot see these logical drives.

This is only a facade.  FreeBSD CAN see your logical drives.  Please be
patient.  This is the installation utility, and this doesn't completely
set things up perfectly for everyone ... read on.

>  All you get in the Partition Editor
> Screen (during FreeBSD installation) is the Primary Dos Partition and
> the large Extended Dos Partition.  In order to "give a space" to
> FreeBSD, that space has to be marked "unused" in FreeBSD's Partition
> Editor.  Obviously, I am not going to mark my Primary Dos Partition,
> Drive C:, unused.  Nor am I interested in using the entire Dos
> Extended Partition as a data space shared by Dos and FreeBSD.  If I
> did, I'd get into the whole Dos mess of 200-byte batch files taking up
> 32K worth of disk space.  I'm not into it.
> 
>         In the handbook under "MS-DOS user's Questions and Answers"
> (handbook19.html#21), one of the questions is "Can I mount my MS-DOS
> extended partitions?"  The handbook answers the question "Yes" and
> says "the DOS extended partitions are mapped in at the end of the
> other 'slices' in FreeBSD, e.g., your D: drive might be /dev/sd0s5,
> your E: drive /dev/sd0s6, and so on."  (For EIDE drives, you
> substitute 'wd' for 'sd'.)

And this is true!

> 
>         This was encouraging, I thought, but it turns out the parts
> about "your D: drive" and "your E: drive" (and so on) are true only if
> they are separate Extended Partitions.

No, this is not true.  You can't have separate Extended Partitions!  You
are only allowed one if you want compatability with a fat16.  AND,
FreeBSD works just fine in "seeing" several extended partitions that
reside within one logical dos partition.

>  As I pointed out above, with
> my version of FDISK.EXE, the best I can manage is *one* extended
> partition, and so these other drives, in my case, are logical drives
> and therefore apparently *not* separately mappable by FreeBSD.  I can
> mount the Primary Dos partition on both Drive 1 and Drive 2, but I
> cannot get to the logical drives in the extended partition.  I found
> this out after much fussing with the mount command in FreeBSD, though
> there may be a trick I missed.

The trick (kinda documented on p.21-26, and p.162-163):

Here's an example scenario of mounting some extended partitions that
exist in one logical partition on an IDE drive (partition sizes don't
matter so I have left them out):

  drive 0:  primary dos partition                       c:
            logical partition |- extended partition 1   d:
                              |- extended partition 2   e:
            FreeBSD partition

1) the generic kernel probably doesn't have the device nodes already
built in, so we will have to create those:

    cd /dev
    ./MAKEDEV wd0s5             (use sd instead of wd for scsi)
    ./MAKEDEV wd0s6             (use sd instead of wd for scsi)

2) make directories to which you will mount the extended partitions
   Just as you probably created /dos_c for your first primary dos
partition, we will create /dos_d and /dos_e for our extended partitions.
You can name them anything you want and place them anywhere you want in
the FreeBSD file structure.  As I hope you can see, I have chosen to
place these in the root directory.

    mkdir /dos_d
    mkdir /dos_e

3) mount the extended partitions

    mount -t msdos /dev/wd0s5 /dos_d
    mount -t msdos /dev/wd0s6 /dos_e

It's as easy as 1, 2, 3!  :)

[deleted Michael's horror story and band-aid solution]

Hope this helps.  I know the documentation can be confusing and hard to
find exactly what you want at times.  I hope this clears up some
misconceptions, too.

Please let me know if I can help anyone along these lines.  Been there
and done that!

Greg Cusick