*BSD News Article 21141


Return to BSD News archive

Newsgroups: comp.os.386bsd.questions
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!elroy.jpl.nasa.gov!swrinde!cs.utexas.edu!uunet!mcsun!ieunet!ieunet!dec4ie.ieunet.ie!jkh
From: jkh@whisker.lotus.ie (Jordan K. Hubbard)
Subject: How to mount your DOS partition from FreeBSD [was Re: mount_msdos]
In-Reply-To: alambert@bsu-cs.bsu.edu's message of 17 Sep 93 06: 55:28 GMT
Message-ID: <JKH.93Sep17220415@whisker.lotus.ie>
Sender: usenet@ieunet.ie (USENET News System)
Nntp-Posting-Host: whisker.lotus.ie
Organization: Lotus Development Ireland
References: <5019@bsu-cs.bsu.edu>
Date: Fri, 17 Sep 1993 22:04:15 GMT
Lines: 65

		How to mount your DOS partition from FreeBSD

1. First, be root.  The following won't work as an ordinary user.

2. Second, use 'fdisk' to see where your DOS partition starts.  It will
   be labeled as type DOS.  On my system, 'fdisk /dev/sd0d' produces
   the following:

... (extraneous output, not of interest) ...
The data for partition 0 is:
sysid 6,(Primary 'big' DOS (> 32MB))
    start 32, size 306400 (149 Meg), flag 0
        beg: cyl 0/ sector 1/ head 1;
        end: cyl 149/ sector 32/ head 39

    This shows me that my DOS partition starts at sector 32, and is 306400
    (512 byte) sectors long.

3. Next, using this information, you craft a new disk entry in your
   /etc/disktab file that assigns one of your unused "UNIX" partitions
   to this DOS region.  Again, using my system as a default, you see
   I've created:

disk0|DEC 5501:\
	:ty=winchester:dt=SCSI:se#512:nt#8:ns#256:nc#1001:rm#3600:\
	:pa#956416:oa#307200:ba#8192:fa#1024:ta=4.2BSD:\
	:pb#131072:ob#1263616:tb=swap:\
	:pc#1087488:oc#307200:tc=UNUSED:\
	:pe#306400:oe#32:te=MSDOS:

   As you can see, partition 'e' now points to the DOS partition as
   pointed out by fdisk.

4. Now we have to actually stick the label on the disk, which is done
   with disklabel.  Using my example, this would be:

	disklabel -r -w sd0 disk0 SCSI /usr/mdec/sdboot /usr/mdec/bootsd

5. Reboot your system to see the new disk label.

6. Mount the DOS partition.  I do:

		mount -t pcfs /dev/sd0e /dos_c

   Where /dos_c is just a convenient directory to mount it.

7. You're set!

-----------
     From:  Mark Monninger <markm@bigfoot.sps.mot.com>
     Subject:  msdosfs?
     Greetings...
     
     In a recent posting, Andrew Moore mentioned msdosfs being available  
     in the newer (?) kernels. Will this allow me to mount my MS-DOS  
     partition from FreeBSD? Is it documented anywhere? The kernel I'm  
     using is from the Sept 1 release. Is there a newer one?
     
     Thanks.
     
     Mark
     

--
Jordan Hubbard  jkh@violet.berkeley.edu, jkh@al.org, jkh@whisker.lotus.ie