pcfs(7)
NAME
pcfs, PCFS − MS-DOS formatted file system
AVAILABILITY
Available only on Sun-3/80, Desktop SPARC systems with internal floppy drives, and Solaris 2.1 for x86 systems.
DESCRIPTION
PCFS is a file system type that allows users direct access to files on MS-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 MS-DOS formatted disk. They can also create and delete directories and list files in a directory.
PCFS file systems are mounted from diskette either with the command:
mount −F pcfs device-special directory-name
or
mount directory-name
if the following line is in your /etc/vfstab file:
device-special − directory-name pcfs − no rw
PCFS file systems are mounted from the hard disk either with the command:
mount −F pcfs device-special:logical-drivedirectory-name
or
mount directory-name
if the following line is in your /etc/vfstab file:
device-special:logicaldrive − directory-name pcfs − no rw
device-special specifies the special block device file for the diskette (/dev/fdn) or the entire hard disk (/dev/dsk/cntndnp0). 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 locaton where the file system is mounted.
For example, to mount the Primary DOS partition from a hard disk, use:
mount −F pcfs /dev/dsk/cntndnp0:c /pcfs/c
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/fd0 /pcfs/a
Files and directories created through PCFS have to comply with the MS-DOS file name convention, which is of the form filename[.ext], where filename consists of one through eight upper-case characters, while the optional ext consists of one through 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 MS-DOS FORMAT command, or
fdformat −d
command in the SunOS system to format a diskette in MS-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 MS-DOS disk.
The following file names
.login
test.sh.orig
data+
are considered illegal in MS-DOS, and therefore cannot be created through PCFS.
FILES
/usr/lib/fs/pcfs/mount
SEE ALSO
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 MS-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.
DIAGNOSTICS
mount(1M) fails and produces the following message:
mount_pcfs: /dev/fd0 on /pcfs type pcfs: Invalid argument
if the floppy in the fd0 drive is not in MS-DOS format, for example, if you try to mount a ufs formatted floppy as a PCFS file system.
mount_pcfs: /dev/fd0 on /pcfs type pcfs: No such device
if configuration option options PCFS is missing from the kernel.
WARNINGS
It is not recommended to physically eject an MS-DOS floppy while the device is still mounted as a PCFS file system.
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 like MS-DOS, 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 like MS-DOS, 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.1 — Last change: 31 May 1993