NAME
dossrv, 9660srv, a:, b:, c:, d:, 9fat:, dosmnt, eject – DOS and ISO9660 file systems

SYNOPSIS
dossrv [ –rsv ] [ –f file ] [ service ]

9660srv [ –9Jsv ] [ –c clusters ] [ –f file ] [ service ]

a:

b:

c:

9fat:

dosmnt n mtpt

eject [ n ]

DESCRIPTION
Dossrv is a file server that interprets DOS file systems. A single instance of dossrv can provide access to multiple DOS disks simultaneously.

Dossrv posts a file descriptor named service (default dos) in the /srv directory. To access the DOS file system on a device, use mount with the spec argument (see bind(1)) the name of the file holding raw DOS file system, typically the disk. If spec is undefined in the mount, dossrv will use file as the default name for the device holding the DOS system.

Normally dossrv creates a pipe to act as the communications channel between itself and its clients. The –s flag instructs dossrv to use its standard input and output instead. The kernels use this option if they are booting from a DOS disk. This flag also prevents the creation of an explicit service file in /srv.

The –v flag causes verbose output for debugging, while the –r flag makes the file system read–only.

The shell script a: contains
unmount /n/a: >[2] /dev/null
mount –c /srv/dos /n/a: /dev/fd0disk

and is therefore a shorthand for mounting a floppy disk in drive A. The scripts b: and dosmnt are similar, mounting the second floppy disk and the nth non–floppy DOS partition, respectively. C: and d: call dosmnt in an attempt to name the drives in the same order that Microsoft operating systems do. 9fat: provides access to the FAT component of the Plan 9 partition (see prep(8)).

The file attribute flags used by the DOS file system do not map directly to those used by Plan 9. Since there is no concept of user or group, permission changes via wstat (see stat(2)) will fail unless the same (read, write, execute) permissions are specified for user, group, and other. For example, removing write permission in Plan 9 corresponds to setting the read–only attribute in the DOS file system. Most of the other DOS attributes are not accessible.

Setting the exclusive use flag (DMEXCL) in Plan 9 corresponds to setting the system use attribute in the DOS file system. Such files are not actually restricted to exclusive use, but do merit special treatment that helps in the creation of boot disks: when dossrv allocates a new block for such a file (caused, say, by a write that fills the file's last allocated block), it succeeds only if it can arrange for the file to be stored contiguously on disk.

Since other operating systems do not guarantee that system files are laid out contiguously, the DMAPPEND mode bit is set in file stat information only when the file is currently contiguous. Attempts to set the DMAPPEND mode bit explicitly will cause dossrv to try to make the file contiguous, succeeding only if this is possible.

9660srv is similar to dossrv in specification, except that it interprets ISO9660 CD–ROM file systems instead of DOS file systems. Some CDs contain multiple directory trees describing the same set of files. 9660srv's first choice in such a case is a standard ISO9660 tree with Plan 9 system use fields; the second choice is a Microsoft ``Joliet'' tree, which allows long file names and Unicode characters; the third choice is a standard ISO9660 or High Sierra tree. The –9 flag causes 9660srv to ignore the Plan 9 system use fields, while the –J flag causes it to ignore the Joliet tree. The –c option sets the size of the RAM cache to clusters clusters of 128KB. The default clusters is 16, but a value of 5600 will cache an entire CD incrementally.

If the floppy drive has an ejection motor, eject will spit out the floppy from drive n, default 0.

EXAMPLE
Mount a floppy disk with a DOS file system on it.
a:

SEE ALSO
kfs(4)

SOURCE
/sys/src/cmd/dossrv
/sys/src/cmd/9660srv
/rc/bin/eject

BUGS
The overloading of the semantics of the DMEXCL and DMAPPEND bits can be confusing.
Copyright © 2024 Plan 9 Foundation. All rights reserved.