MountDOS v1.20 Technical Guide
Midnight Technologies Corp.

(C) Midnight Technologies Corp. 1994,1995
NetWare, NetWare Loadable Module, NLM, NCP, and IPX are protected
by Novell, Inc.

Table of Contents
^^^^^^^^^^^^^^^^^
 Product Overview
 What's New in This Release
 MountDOS Installation
 MountDOS Usage
 Support & Warranty
 Registration
 Contacting Midnight Technologies Corp.

Product Overview
^^^^^^^^^^^^^^^^
MountDOS is an NLM that allows the mounting of DOS partitions as netware 
volume. It is meant to be used as an administrative tool for the DOS 
partitions on the server.

MountDOS has several uses which include the following:
	1. Remote updating of software residing on the DOS partition,
	2. Viewing of software dates and times on the DOS partition,
	3. Use of otherwise inaccessible disk space,
	4. Ability to edit local configuration files,
	5. Backup of DOS partition with popular NetWare backup solutions.

MountDOS supports all standard DOS client functions on files/directories.
	1. dir - list file date and times in current directory
	2. write - programs may open files and write 
	3. read - reading of any files 
	4. mkdir - make a directory on the DOS partition
	5. rmdir - remove directory on the DOS partition
	6. cd  - change current working directory
	7. copy- files may be copied to and from the DOS partition
		NDIR, NCOPY, VOLINFO, FILER, are supported

MountDOS loads as an NLM and scans the media manager partitions that are
available.  It then retains the paritions that are valid DOS type
partitions and allows them to be mounted as Netware volumes.

DOS versions supported:
	This version will support any DOS partition block less than or equal
	to 4K.  Most DOS partitions under 500Meg will have a smaller than 4K
	block size.  If MountDOS loads and reports that it cannot mount a
	Partition because of the block size, the partition can be reduced in
	size to mount it with MountDOS.
	Although this version does not support these larger block
	sizes future versions will.  The NLM will scan and automatically 
	report that the block size exceeds the supported size.  Only DOS 
	partitions larger than 100Meg will have these larger block sizes.  
	If the DOS partition is reduced in size the block size will also 
	reduce in size.  Current MountDOS does not support mounting 
	compressed DOS partitions.  Current MountDOS will not mount 
	floppy drives in this release.

NetWare versions supported:
	MountDOS uses the NetWare 4.10 media manager interface to directly
	access the partition.  This improves speed and allows for better 
	caching algorithms and write behind enhancements.  Unfortunately 
	it's depedence on the media manager makes it impossible to run on 
	other versions of NetWare.  MountDOS supports other NLMs that read 
	and write the DOS partition.  If an NLM writes to the DOS parition 
	MountDOS will rescan and reload critical information maintaining a 
	current and correct representation of the files/directories on the 
	mounted partition.

Features:
	- Uses Netware cache.  Reads are first accessed in cache. Writes are
	  written to cache and then cache is synchronized with the DOS 
	  partition.
	- Compatible with other NLMs that modify / read the DOS partition.
	- Supports 12/16 bit fats and block sizes up to 4K
	- Mount multiple DOS partitions each with its own netware volume 
	  name.
	- File locking to prevent simultaneous updating
	- Tight security restricting access to only names given by admin.
	- Ability to create delete directories/files.  read/write files in
	  any directory on disk.

Future enhancements:
	- Tested support for large DOS volume sizes
	- Mount floppy drives as netware volumes
	- Mount compressed partitions as netware volumes
	- NWSNUT managment interface for statistics/ open files/
	  managing partitions

What's New in This Release
^^^^^^^^^^^^^^^^^^^^^^^^^^
Midnight Technologies is committed to shipping products to make 
administration of a network easier and more efficient, therefore saving 
you money.

Much work has been done to the product since it's earlier release to 
add value and functionality.  The following is the list of features added
since the 1.12 release on June 1, 1995:

	-Number of evaluation days increased to 30 days.  
	-DHELP is displayed at load time.
	-DDISMOUNT <MOUNTDOS volume> to allow dismount by volume name
		instead of just drive letter.
	-DACCESS saves names for future reboots in sys:system\mountdos.acs.  
		It is an ASCII file and can be edited.
	-DACCESS supports security equivalences allowing access to 
		anyone in the DACCESS list AND their security equivalents.
	-Now Supports NETX and VLM clients including:
		-clients mapping drives to the MountDOS partition
		-clients can read and run .EXEs
	-Tested support for NDIR, FILER, FLAG, RIGHTS, and DOS Attrib. 
	-Details/Diagnostic option to get partition information before 
	 mounting.  Useful for unknown partition types or for mounting 
	 difficult partition types.
	-Debugging option to track client requests to the partition
	-Type identifier option to allow mounting of unknown partitions

In addition to the many new features, our customers have also helped us
resolve inconsistencies which have arised between NetWare, CLIB, 
client software, various DOS versions, and various shell versions.

MountDOS Installation
^^^^^^^^^^^^^^^^^^^^^
Install MountDOS only on NetWare 4.1 servers.  The NetWare 4.1 media manager 
is prerequisite to the function of MOUNTDOS.NLM.  The amount of memory used
on the NetWare server is dependent on the size of the DOS partition.  
However, the memory used is minimal.  For example, for a 100MB DOS partition
MountDOS only uses 225K of memory.

Each copy of MOUNTDOS.NLM is licensed to one server and should be copied to 
the SYS:SYSTEM directory of that server for easiest loading.  If you desire,
you can create a subdirectory for the NLM and copy the file to that 
directory.  For ease of loading it is then recommended to add that directory
to the search path of the server.  For example, if the file were copied into
the SYS:SYSTEM\MOUNTDOS directory, add the statement 
SEARCH ADD SYS:SYSTEM\MOUNTDOS to the AUTOEXEC.NCF file for that server.

MountDOS is distributed in a shareware model.  When you load the NLM 
unregistered you will have 30 days to evaluate whether it meets your needs.
The following message will confirm you have NOT registered:

	MOUNTDOS: This is an unregistered copy.  Software life is limited.
        	  Contact '76451.1572@CompuServe.com' to register software.

After the evaluation time has expired, MountDOS will not load until you
enter the registration information.  When you receive official confirmation of your registration you will 
receive instructions on how to register your copy.  No reinstallation is
necessary.

Files included in the download set are:
	MOUNTDOS NLM    MountDOS Loadable Module
	DISCLAIM TXT    Legal Disclaimer
	FORM     TXT    Registration/Order Form
	LEGAL    TXT    Rules for distribution
	CHANGES  TXT    Changes since 1.12
	MD_DESC  TXT    Upload Description
	MOUNTDOS TXT    Manual/Documentation

MountDOS Usage
^^^^^^^^^^^^^^^^^^^^
After MountDOS loads its commands can be accessed via the Netware colon
prompt.  The commands for MountDOS are:

	1. DHELP:  show list of all available commands and functions
	2. DMOUNT <drive> <volume name> : mount DOS drive letter as a netware partition
	3. DLIST: list all drives that are available for mounting
	4. DALIST: list all users allowed access to the DOS mounted drive.
	5. DACCESS : prompts for usernname to add to list allowed to mount.
	6. DAREMOVE : prompts for username to remove from list.
	6. DSPEC <drive> : list drive specifications
	7. DSTAT <drive> : 

Upon loading MountDOS will scan the partition table for valid partition 
types.  MountDOS has been pre-programmed with many of the standard DOS 
partition types.  If MountDOS failes to recognize a particular type, a
new command line option has been included in this release.  The -d option 
documents the partition type and other information.  The output line 
"unknown partition type X" will reveal the partition type.  Then using 
the -t option type :load mountdos /t=X and it will allow that type to mount.
Support for both 12 and 16 bit DOS fats

After loading and scanning the available eligible DOS partitions MountDOS 
will allow any of these partitions to be mounted.  To get a list of these
partitions type "DLIST" at the colon prompt as illustrated:

	SERVER1:DLIST
	Drive  Size (K)   Free (K)   Mounted As Vol  Disk description
	------ ---------- ---------- --------------- ------------------------
	C          102566          0                 Hard Disk (any capacity)

The list of drives will appear.  Initially the free blocks will be 0 but
after the partition is mounted the free blocks will be calculated.

To Mount a drive as a netware volume type "DMOUNT <drive> <volume name>"
a checking of the drive will be done and if all there are no problems with
the internal data structures on the DOS partition the volume will be 
mounted.  The result is illustrated below.

	SERVER1:DMOUNT C HDVOL
	MOUNTDOS: mounted dos drive C as Netware volume HDVOL.

	SERVER1:DLIST
	Drive Size (K)   Free (K)   Mounted As Vol  Disk description
	----- ---------- ---------- --------------- ------------------------
	C         102566      49594           HDVOL Hard Disk (any capacity)

MountDOS will print an error message if there is any problem with the DOS
partition.  The best thing to do if there is a problem is to down the
server and run "chkdsk /f" or "scandisk".

While MountDOS is scanning for partitions it may print an error message. 
This is due to netware partition having the same identifiers as a DOS 
partition except the internal structures differ from a DOS partition.

Access to these DOS partitions that have been mounted is controlled by the
DACCESS command.  Initially ADMIN and SUPERVISOR have access granted to them
and other people have access given to them explicitly by this command:
"DACCESS <username>".  	DACCESS saves usernames for automatic access 
when MountDOS is reloaded.  The access list file is stored in 
sys:system\mountdos.acs which is an ascii file and can be edited manually.
DAREMOVE revokes the access privaleges and removes them from the list.
An example of how these commands can be used is listed below:

	SERVER1:DALIST
	MOUNTDOS: "Admin" allowed access.
	MOUNTDOS: "Supervisor" allowed access.

	SERVER1:DACCESS
	User Id: CBailey
	MOUNTDOS: added access for user CBailey.

	SERVER1:DALIST
	MOUNTDOS: "Admin" allowed access.
	MOUNTDOS: "Supervisor" allowed access.
	MOUNTDOS: "CBailey" allowed access.

	SERVER1:DACCESS
	User Id: JSmith
	MOUNTDOS: added access for user JSmith.

	SERVER1:DALIST
	MOUNTDOS: "Admin" allowed access.
	MOUNTDOS: "Supervisor" allowed access.
	MOUNTDOS: "CBailey" allowed access.
	MOUNTDOS: "JSmith" allowed access.

	SERVER1:DAREMOVE
	User Id: JSmith
	MOUNTDOS: removed access for user JSmith.

	SERVER1:DALIST
	MOUNTDOS: "Admin" allowed access.
	MOUNTDOS: "Supervisor" allowed access.
	MOUNTDOS: "CBailey" allowed access.

While mounted, if any real mode operations are done to the DOS partition 
by any other NetWare Loadable Modules (INSTALL.NLM for example) via the 
INWDos calls the cache will be invalidated for that corresponding MountDOS 
volume.  MountDOS will then rebuild the cache from the new information 
about the DOS volume. This means that any new files/directories will be 
available through MountDOS.

DDISMOUNT can be used to dismount the MountDOS volumes.  It's syntax allows
you to dismount by volume name or driver identifier.

	SERVER1:unload mountdos
	8-01-95   3:37:05 pm:    MOUNTDOS-1.20-0
	     MOUNTDOS: Volume HDVOL no longer available.

The DSPEC command is used to get the drive specifications. Usage and
output of the command are displayed below.

	SERVER1:dspec c
	: oem name NWDOS7.0             : bytes per sector 512
	: sectors per cluster 4         : reserved sectors 1
	: FAT count 2                   : root dir entries 512
	: total sectors 0               : media descriptor F8
	: sectors per FAT 201           : sectors per track 63
	: number of heads 16            : hiddenSectors 63
	: huge sectors 205569           : drive number 128
	: reserved 0                    : boot signature 29
	: volume ID FF23921             : volume label NO NAME
	: sectors occupied by FAT 201   : sectors occupied by root dir 32
	MOUNTDOS: first data sector 435
	MOUNTDOS: volume size 105027584 fat size 16
	MOUNTDOS: directory entries per cluster 64
	MOUNTDOS: bits per FAT entry 16
	MOUNTDOS: media type description Hard Disk (any capacity)
	MOUNTDOS: file system type  46  41  54  31  36  20  20  20
	MOUNTDOS: cluster to block shift 1 mask 1
	MOUNTDOS: directory shift 6 mask 3F
	MOUNTDOS: bytes to block shift 11 mask 7FF
	MOUNTDOS: sectortocluster shift 2 mask 3 per clus mask F
	MOUNTDOS: number of clusters 51285
	MOUNTDOS: first data 110 first block 55

The DSTAT command will display statistics tracked since the DOS partition
was mounted.  Similar to the NetWare Monitor screens, this information
can be helpful in reviewing how successful NetWare/MountDOS caching
has been in improving access to the hard drive.  It can also assist in
detecting possible corruptions and errors DOS may have caused earlier.
Although the entries are currently undocumented, they are similar to
the statistics of NetWare and can be interpreted in the same way.
Future manuals will expose more details of this command.  An example
is provided below for your information.

	SERVER1:dstat c
	syncReads 0     		syncReadCacheHitData 51283
	syncGetCacheFailure 8503264     asyncReads 0
	asyncReadCacheHitData 0         asyncReadGetCacheFailures 0
	async read cache misses 0       alloc failures 0
	async read cluster failures 0   sync read cache misses 51257
	sync read cluster failures 0    clusterAllocDiskFull 26
	alloc fat loop count 0  	rootDirFullAlloc 0
	rootDirNeverAlloc 0     	rootDirDeletedAlloc 0
	regularDirFullAlloc 0   	regularDirFullAllocBad 0
	regularDirNeverAlloc 0  	firstDirCharacterUnknown 0
	regularDirDeletedAlloc 0        FATUpdateWriteFailures 0
	errorGettingCacheBlock 0        writeCallBackFails 0
	FlushErrorWritingBlock 0        FATWriteErrors 0
	readingMoreThanOneCluster 0     fileHandleAllocFailed 0
	numberOfFatLoops 0      	writeRequestCount 0
	returnFileHandleFailures 0      CacheWriteCallBackBlock0 0
	dismountCloseFileFailures 0     realModeInvalidateCache 0
	AlreadyDirtyFAT 0       	FATUpdateGotSectorErrors 0
	fatWriteAllocFailed 0   	wierdFATEntryHit 0
	invalidateOnExit 0      	waitedForOtherRead 0
	cacheReleaseFailure 0   	waitedForWriteLock 0

LOCKing:
	each file is locked upon opening and noone else is allowed to open the
	file until the lock is released.  The lock is released when the file
	is closed.

Drive Letters:
	MountDOS will scan in physicall sequential order the DOS partitions on
	the hard disk and assign letters to each of these partitions starting 
	with C: and moving up each letter.  These may or may not be the same 
	as if the machine was booted with just DOS ( due to various drivers,
	compression support etc. that switches drive letters ).

Command line options can be used at load time and are as follows:

-d      Details/Diagnostic
		Documents the partition type and other information
		about the partitions.  Useful for unknown partition
		types or for mounting difficult partition types.

-t      Type identifier for unknown partitions
		There is a chance of a unknown partition type that MountDOS
		hasn't been pre-configured for.  If mountdos cannot 
		Immediately mount a partition, first do a -d and it prints 
		"unknown partition type X" then you can 
		type :load mountdos /t=X and it will allow that 
		type to mount.

	SERVER1:load mountdos -d
	Loading module MOUNTDOS.NLM
	  Mount DOS partitions as NetWare Volumes. (95080201)
	  Version 1.20    August 3, 1995
	  Copyright (C) '95, MidNight Technologies. All rights reserved.
	MOUNTDOS: scanning for DOS partitions.
	MOUNTDOS: unmountable partition type Bh.

	SERVER1:load mountdos -t=B

Note:  The shareware version of MountDOS will has a limited use policy.
The software will be disabled after an initial period of time.  It will then
be necessary to register with Midnight Technologies Corp. to purchase the 
software.  We hope this inconvenience will encourage you to register your 
software.

Support & Warranty
^^^^^^^^^^^^^^^^^^^^^
Midnight Technologies prides itself on the quality of our software.  We take 
great strides to develop, test, and support our products.  If you have a suggestion
on how we may improve our software, please contact us by mail or e-mail.  We will
make every effort to ensure your satisfaction.

If you are not completely satisfied with our products and services, we offer a 
full refund within 30 days of your purchase.

Registration
^^^^^^^^^^^^^^
The software life is limited; register as soon as possible.  To license 
our software, fill out the accompanying form, FORM.TXT, and Mail or 
E-Mail it to Midnight Technologies.

Pricing for the NLM is US$69.95 per Server. Payment can be made by 
check or money order.  For corporate customers with accounting restrictions,
a bill or invoice can be requested prior to payment.  International 
customers may acquire the software via the CompuServe SWREG service and 
can get more information by GO SWREG at the CIS prompt.  Site licenses and 
volume discounts for more than 50 copies are available.  For more 
information contact Midnight Technologies at the address below.

Contacting Midnight Technologies Corp.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Our electronic mail addresses are:
	CompuServe:     76451,1527
	Internet:       76451.1572@Compuserve.COM

You may also contact us using our address:
      Midnight Technologies Corp.
      1158 East 11740 South
      Sandy, UT  84094-7437

