Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ PCFS(7) — SunOS 5.4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

eject(1)

mount(1M)

vfstab(4)

fdisk(1M)

pcfs(7)

NAME

pcfs, PCFS − DOS formatted file system

DESCRIPTION

PCFS is a file system type that allows users direct access to files on DOS formatted disks from within the SunOS operating system.  Once mounted, a PCFS file system provides standard SunOS file operations and semantics.  That is, users can create, delete, read, and write files on an DOS formatted disk.  They can also create and delete directories and list files in a directory. 

Mounting File Systems

PCFS file systems are mounted from diskette with the command:

mount −F pcfs  device-special directory-name

or you can use:

mount directory-name

if the following line is in your /etc/vfstab file:

device-special −  directory-name pcfs  −  no  rw

x86:  PCFS file systems are mounted from the hard disk with the command:

mount −F pcfs device-special:logical-drivedirectory-name

or you can use:

mount directory-name

if the following line is in your /etc/vfstab file:

device-special:logical_drive − directory-name pcfs  −  no  rw

device-special specifies the special block device file for the diskette (/dev/disketten) or the entire hard disk (/dev/dsk/cntndnp0). 

On x86 systems, logical-drive specifies either the DOS logical drive letter (c through z) or a drive number (1 through 24).  Drive letter c is equivalent to drive number 1 and represents the Primary DOS partition on the disk; drive letters d through z are equivalent to drive numbers 2 through 24, and represent DOS logical drives within the Extended DOS partition.  Note that device-special and logical-drive must be separated by a colon. 

directory-name specifies the location where the file system is mounted. 

For example, on x86, to mount the Primary DOS partition from a hard disk, use:

mount −F pcfs /dev/dsk/cntndnp0:c /pcfs/c

On x86, to mount the first logical drive in the Extended DOS partition from the hard disk, use:

mount −F pcfs /dev/dsk/cntndnp0:d /pcfs/d

To mount a DOS diskette in the first floppy drive, use:

mount −F pcfs /dev/diskette /pcfs/a

Conventions

Files and directories created through PCFS have to comply with the DOS file name convention, which is of the form filename[.ext], where filename consists of from one to eight upper-case characters, while the optional ext consists of from one to three upper-case characters.  PCFS converts all the lower-case characters in a file name to upper-case, and chops off any extra characters in filename or ext. When displaying file names, PCFS only shows them in lower-case. 

One can use either the DOS FORMAT command, or the command:

fdformat −d

in the SunOS system to format a diskette in DOS format. 

EXAMPLES

If you copy a file:

financial.data

from a UNIX file system to a PCFS file system, it will show up as:

FINANCIA.DAT

on the DOS disk. 

The following file names:

.login

test.sh.orig

data+

are considered illegal in DOS, and therefore cannot be created through PCFS. 

FILES

/usr/lib/fs/pcfs/mount

SEE ALSO

eject(1), mount(1M), vfstab(4)

x86 Only

fdisk(1M)

NOTES

The following are all the legal characters that are allowed in file names or extensions in PCFS:

0-9, a-z, A-Z, and $#&@!%()-{}<>‘_\^~|’

Since SunOS and DOS operating systems use different character sets, and have different requirements for the text file format, one can use

dos2unix

or

unix2dos

command to convert files between them. 

PCFS offers a convenient transportation vehicle for files between Sun Workstations and PC’s.  Since the DOS disk format was designed for use under DOS, it is quite inefficient to operate under the SunOS system.  Therefore, it should not be used as the format for a regular local storage.  You should use ufs for local storage within the SunOS system. 

WARNINGS

It is not recommended to physically eject an DOS floppy while the device is still mounted as a PCFS file system. 

x86:  When mounting a pcfs file system on a hard disk, the first block on that device must contain a valid fdisk partition table. 

Since PCFS truncates any extra characters in file names and extensions just as DOS, does, be careful when copying files from a UNIX file system to a PCFS file system.  For instance, the following two files:

test.data1 test.data2

in a UNIX file system will get copied to the same file:

TEST.DAT

in PCFS. 

BUGS

PCFS should handle the disk change condition in the same way that DOS, does, so that the user does not need to unmount the file system to change floppies.  PCFS is currently not NFS mountable.  Trying to mount a PCFS file system through NFS will fail with an EACCES error. 

SunOS 5.4  —  Last change: 8 Nov 1993

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026