DOS under UNIX

James P. H. Fuller jim at crom2.uucp
Sat Jan 19 14:07:50 AEST 1991


dvb at emisle.uucp (David Van Beveren) writes:

>I have a related question. My primary HD has three partitions. Two are the DOS
>primary and secondary ones, 32MB each, and the third is a 140MB Unix partition.
>How can I get at the dos partitions from unix. I know this is possible, since
>I once used a system in that configuration, and it was set up before my eyes
>by an ISC salesman. I want to access the files from unix, not VPIX.

>I tried dossette, and it tells me (when I say c:)
>	'unable to open device /dev/rdsk/0p0'

>Accessing the dos hard disk from within unix has to do with the /etc/partitions
>file, as well as /etc/fstab, but I cannot find docs as to how to modify the
>files. Help is appreciated.

>David Van Beveren                           INTERNET: emisle!dvb at ism.isc.com
>EIS ltd. Professional Software Services     UUCP:   ..uunet!emisle!dvb
>voice: (818) 587-1247

   No doubt six other people will tell you this because it's not very deep,
but here's my $.02 worth.  An old Unix hand would say RTFM but since I'm a
relative beginner I'll even tell you *where* in the FM to R!  It's in ISC 
Sys.Vr3.2 Operating System Guide (the very first of your big fat books) in the
Ver.2.2 release notes, p.41 appendix c: USING DOS FIXED DISK PARTITIONS.
The thing to do is to mount those DOS partitions as part of your Unix file
system.  Extended DOS partitions are mountable just like the primary one, but
only if the primary DOS partition is first in the fdisk table (i.e. was
installed first.

   To mount a couple of DOS partitions on your Unix root directory, do this
(with the primary and extended DOS partitions already in place):
  
   1) log in as root

   2) in the root directory (/) do
   
         mkdir /dos1 /dos2

      This gives you a couple of mount points, just as the /mnt directory
      is a mount point for your floppies.

   3) enter

         echo /dev/dsk/0p1 /dos1 DOS >> /etc/fstab
         echo /dev/dsk/0p5 /dos2 DOS >> /etc/fstab

      or edit fstab directly with your editor, however you choose just get
      the stuff between "echo" and ">>" into fstab somehow.  You can have up
      to 11 ext-DOS partitions, named /dev/dsk/0p5 through /dev/dsk/0p15.

Then power down and reboot -- your DOS partitions should be mounted automatic-
ally when the boot sequence calls mountall.

   The outcome of the above is that everything on DOS partition #1 is visible
to unix as subdirectories under /dos1 and everything on partition #2 is avail-
able under /dos2.  You can copy back and forth using the ordinary Unix utili-
ties and if you run VP/ix do the same with DOS utilities (except of course
you'll be locked out of Unix directories which have names that don't conform to
DOS's 88888888.333 filename requirements.)  You can operate on DOS filesystem
data using Unix programs and vice versa, and nothing gets messed up.  For
instance you never need bother with wretched "more" or "pg" again, if you want
to look at text files in your Unix file system you can use LIST.EXE, the best
file browser Crom ever created. (If the file you want to browse happens to
be hidden on the wrong side of a weird.long.subdirectory.name just cp it
up to /tmp and LIST it there.)  



More information about the Comp.unix.sysv386 mailing list