dosd(4)


NAME
     dosd - DOS file as a virtual disk

DESCRIPTION
     The dosd* devices allow one to use a DOS file as a disk.  If for instance
     the Boot Environment contains one of these pairs of settings:

          dosd = file
          dosd0 = \minix\disk0.mnx

          dosd = fat
          dosd0 = hd1:\minix\disk0.mnx

     Then the device /dev/dosd0 addresses all  the  blocks  in  the  DOS  file
     \minix\disk0.mnx.

     The "file" and "FAT" versions of the driver differ radically on how  they
     access  the  DOS  file,  the  first will use actual DOS calls to read and
     write the file, the second interprets a  FAT  file  system  to  find  the
     blocks  of the file.  One understands that the "file" driver can only run
     if Minix has been started from DOS using the  DOS  version  of  the  Boot
     Monitor.    Note   that   the  DOS  Boot  Monitor  will  also  set  dosd0
     automatically to  the  file  it  is  to  boot,  so  no  configuration  is
     necessary.

     In either case the DOS file is seen as a disk under Minix.  The disk  can
     have  one  primary  partition table allowing one to create the partitions
     dosd1 through dosd4.

     One more virtual disk may be created for the FAT driver  by  setting  the
     dosd5  variable  to  enable  the devices dosd[5-9].  The file driver also
     supports dosd10 and dosd15 for four virtual disks total.  The FAT  driver
     allows  one to use any primary partition on a normal hard disk or even on
     a floppy drive (for testing purposes).

     The FAT driver has less then 20% performance  overhead  compared  with  a
     true  partition due to the DOS file decoding.  The file driver depends on
     how well DOS does file I/O, which isn't too  bad  for  simple  reads  and
     writes  to  one file.  Overhead can be minimized if I/O is aligned to DOS
     file clusters.  For Minix file system use you are advised  to  start  the
     virtual  partitions  on  even-numbered disk sectors, so that the 2-sector
     Minix blocks  do  not  span  clusters.   Minix-vmd  swap  partitions  are
     accessed  in  units  of  the  page size, i.e. 4096 bytes = 8 sectors.  To
     minimize overhead you could let partitions start on a  cluster  boundary.
     The  virtual  disk  will appear to have a track size equal to the cluster
     size, so a partition is cluster aligned if it starts on the first  sector
     in  a  track.  It is of course best to also defragment your DOS partition
     to eliminate any extra disk seeks due to gaps between clusters.


     Replacing the "file" driver by the "FAT" driver will help performance  if
     the  normal  disk driver used by the FAT driver is a native Minix driver.
     The FAT driver used together with the BIOS disk driver will not make much
     of a difference.

FILES
     /dev/dosd[0-9]

SEE ALSO
     hd(4), sd(4).

BUGS
     The file driver needs calls to read and  write  arbitrary  DOS  files  to
     allow file to be easily moved between DOS and Minix.

     The FAT driver doesn't understand long file names.

     More testing is needed on FAT-32 file systems.

AUTHORS

  FAT driver
     Philip Homburg (philip@cs.vu.nl)

  File driver and manual page
     Kees J. Bot (kjb@cs.vu.nl)