home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / unix / bsd / 11684 < prev    next >
Encoding:
Internet Message Format  |  1993-01-21  |  4.9 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!rpi!uwm.edu!miller.cs.uwm.edu!jimj
  2. From: jimj@miller.cs.uwm.edu (James Jegers)
  3. Newsgroups: comp.unix.bsd
  4. Subject: MS-DOS mounting DOCS
  5. Date: 22 Jan 1993 00:05:28 GMT
  6. Organization: University of Wisconsin - Milwaukee
  7. Lines: 126
  8. Distribution: world
  9. Message-ID: <1jndo8INNma9@uwm.edu>
  10. NNTP-Posting-Host: 129.89.9.13
  11.  
  12.      Hope you enjoy the DOC..
  13.  
  14.  
  15.   386BSD now support DOS filesystems.  There are two
  16.   ways in which you may read a DOS filesystem.
  17.  
  18.    1.  Via the mtools commands which simulate the DOS commands
  19.        such as mdir, mcopy, mcd, mmkdir, etc.
  20.  
  21.    2.  Or you can mount the DOS filesystem just like a UNIX
  22.        filesystem.
  23.  
  24. -------------------------------------------------------------------------
  25.    Be careful with the PCFS part in your kernel.  It's not the
  26.    smartest of things it doesn't do that much error checking.
  27.    For instance:
  28.       If I try to mount certain ISO CD's as PCFS, my machine locks 
  29.     up shortly after.
  30.       If I try to mount a partion as PCFS which isn't MSDOS, (or is
  31.       random sectors on the disks) the magic nicely panics and reboots.
  32. -------------------------------------------------------------------------
  33.  
  34.   To read and write DOS floppies,  You must, 
  35.  
  36.    1.  Make the floppy minor devices in /dev by running the MAKEDEV script.
  37.        cd /dev; sh MAKEDEV fd0 fd1
  38.  
  39.    2.  If you wants to use the mtools,
  40.  
  41.           Then compile the mtools package which came with 386bsd. The 
  42.       devices.c file should already be setup for use with 386bsd.
  43.  
  44.       Insert the floppy and run  mdir a: or mdir b:
  45.       to get a directory..  
  46.       Use the other m?? commands for the other functions.
  47.  
  48.    3.  If you wish to mount the DOS floppy,
  49.  
  50.       Install the PCFS filestems type into your kernel and
  51.       recompile your kernel via the instructions given with
  52.       PCFS.
  53.  
  54.       mount the DOS floppy to a directory,
  55.       mount -t pcfs /dev/fd0d /mnt 
  56.  
  57.       fd0d for the floppy #1, fd1d for floppy #2.
  58.  
  59.  
  60.   To read and write to you DOS partition on your Hard Drive, you must,
  61.  
  62.    1.  Set up a DOS partition on your hard drive following the instruction
  63.        from the 386BSD installation manual.
  64.  
  65.    2.  Get the fdisk command(ref.tfs.com, and elsewhere) and run it to
  66.        find the starting sector/size of your DOS partition, 
  67.  
  68.        fdisk /dev/rsd0d     or   fdisk /dev/rwd0d
  69.  
  70.        The data for partition 0 is:
  71.        sysid 6,(Primary 'big' DOS (> 32MB))
  72.        start 32, size 819168 (399 Meg), flag 80
  73.        beg: cyl 0/ sector 1/ head 1;
  74.        end: cyl 399/ sector 32/ head 63
  75.        The data for partition 3 is:
  76.        sysid 165,(386BSD)
  77.            start 819200, size 1259520 (615 Meg), flag 0
  78.            beg: cyl 400/ sector 1/ head 0;
  79.            end: cyl 1014/ sector 32/ head 63
  80.  
  81.        Looking at above the DOS partition starts at sector 32 and 
  82.        is 819168 sectors big.
  83.  
  84.   3.  Edit your disklabel to have a partition which is the same as
  85.       your dos partition. 
  86.  
  87.       disklabel -e /dev/rsd0d
  88.  
  89.       Make the partition name E or F, etc.
  90.  
  91.     WARNING:  Do not make the DOS partition the C or D partition unless
  92.     the DOS partition covers the entire drive!  Partition C is
  93.     the whole UNIX partition and partition D is the whole drive.
  94.  
  95.       c: 1259520   819200    unused        0     0         # (Cyl.  642*- 1630*)
  96.       d: 2113950        0    unused        0     0         # (Cyl.    0 - 1657)
  97.       f:  819168       32     MSDOS                        # (Cyl.    0*- 642*)
  98.  
  99.    4.  If you are using mtools, 
  100.  
  101.     modify the devices.c file to include a drive letter which uses
  102.     this new partition.
  103.  
  104.        {'C', "/dev/rsd0f", 0L, 16, 0, (int (*) ()) 0, 0, 0, 0},
  105.  
  106.         Someone did post a patch to make mtools automatically find the
  107.     DOS partition, but I couldn't get it to work, so I do it this way.
  108.  
  109.         You can then run the mtools commands to read/write from the hard
  110.     drive.  ie.. mdir c:   mcopy c:autoexec.bat .
  111.  
  112.    5.  If you wish to mount the filesystem under UNIX.
  113.         
  114.       Install the PCFS filesystem type into your kernel and
  115.       recompile your kernel via the instructions given with
  116.       PCFS.
  117.       There has also been some patches to PCFS to support
  118.       the DOS hard drive better.
  119.  
  120.       mount the DOS hard drive partition just like the floppy,
  121.  
  122.       mount -t pcfs /dev/sd0f /mnt
  123.  
  124.             ^^^^^^^^^  use the partition letter which you created
  125.                    above.
  126. ------------------------------------------------------------------------------
  127.  
  128.   I hope this helps.  PS. I'm not responsible for anything that you do,
  129.   I just wrote this to try to help out.
  130.  
  131.      ______________________________________________________________
  132.     /\               University of Wisconsin -- Milwaukee          \
  133.     \_| Computing Services Division     Computer Science Department |
  134.       |   jimj@csd4.csd.uwm.edu           jimj@miller.cs.uwm.edu    |
  135.       |   jimj@convex.csd.uwm.edu                                   |
  136.       |   __________________________________________________________|___
  137.        \_/_____________________________________________________________/
  138.