1 PCFS(7FS)                        File Systems                        PCFS(7FS)
   2 
   3 
   4 
   5 NAME
   6        pcfs - FAT formatted file system
   7 
   8 SYNOPSIS
   9        #include <sys/param.h>
  10        #include <sys/mount.h>
  11        #include <sys/fs/pc_fs.h>
  12 
  13        int mount(const char *spec,
  14             const char * dir, int  mflag,
  15             "pcfs", NULL, 0, char *optptr,
  16             int optlen);
  17 
  18 
  19 DESCRIPTION
  20        pcfs is a file system type that enables direct access to files on FAT
  21        formatted disks from within the SunOS operating system.
  22 
  23 
  24        Once mounted, pcfs provides standard SunOS file operations and
  25        semantics.  Using pcfs, you can create, delete, read, and write files
  26        on a FAT formatted disk. You can also create and delete directories and
  27        list files in a directory.
  28 
  29 
  30        pcfs supports FAT12 (floppies) and FAT16 and FAT32 file systems.
  31 
  32 
  33        pcfs file systems can be force umounted using the -f argument to
  34        umount(1M).
  35 
  36 
  37        The pcfs file system contained on the block special file identified by
  38        spec is mounted on the directory identified by dir. spec and dir are
  39        pointers to pathnames. mflag specifies the mount options. The MS_DATA
  40        bit in mflag must be set. Mount options can be passed to pcfs  using
  41        the  optptr and optlen  arguments.  See mount_pcfs(1M) for a list of
  42        mount options supported by pcfs.
  43 
  44 
  45        Because FAT formatted media can record file timestamps between January
  46        1st 1980 and December 31st 2127, it's not possible to fully represent
  47        UNIX time_t in pcfs for 32 bit or 64 bit programs. In particular, if
  48        post-2038 timestamps are present on a FAT formatted medium and pcfs
  49        returns these, 32bit applications may unexpectedly fail with EOVERFLOW
  50        errors. To prevent this, the default behaviour of pcfs has been
  51        modified to clamp post-2038 timestamps to the latest possible value for
  52        a 32bit time_t, which is January 19th 2038, 03:14:06 UTC when setting
  53        and retrieving file timestamps. You can override this behavior using
  54        the noclamptime mount option, as described in mount_pcfs(1M).
  55 
  56 
  57        Timestamps on FAT formatted media are recorded in local time. If the
  58        recording and  receiving systems use different timezones, the
  59        representation of timestamps shown on the two systems for the same
  60        medium might vary. To correct this,  pcfs  provides a  timezone mount
  61        option to force  interpretation of timestamps as read from a FAT
  62        formatted medium in a given  timezone (that of the recorder). By
  63        default, the local timezone of the  receiver is used. See
  64        mount_pcfs(1M) for details.
  65 
  66 
  67        The root directory of a FAT formatted medium has no timestamps and pcfs
  68        returns the time when the mount was done as timestamp  for the root of
  69        the filesystem.
  70 
  71 
  72        The FAT filesystem doesn't support multiple links. As a result, the
  73        link count for all files and directories in pcfs is hard-coded as "1."
  74 
  75    Mounting File Systems
  76        Use the following command to mount pcfs from diskette:
  77 
  78          mount -F pcfs device-special directory-name
  79 
  80 
  81 
  82 
  83        You can use:
  84 
  85          mount directory-name
  86 
  87 
  88 
  89 
  90        if the following line is in your /etc/vfstab file:
  91 
  92          device-special - directory-namepcfs - no rw
  93 
  94 
  95 
  96        Use the following command to mount pcfs from non-diskette media:
  97 
  98          mount -F pcfs device-special:logical-drive directory-name
  99 
 100 
 101 
 102 
 103        You can use:
 104 
 105          mount directory-name
 106 
 107 
 108 
 109 
 110        if the following line is in your /etc/vfstab file:
 111 
 112          device-special:logical_drive - directory-name pcfs - no rw
 113 
 114 
 115 
 116        device-special specifies the special block device file for the diskette
 117        (/dev/disketteN) or the entire hard disk (/dev/dsk/cNtNdNp0 for a SCSI
 118        disk, and /dev/dsk/cNdNp0 for IDE disks) or the PCMCIA pseudo-floppy
 119        memory card (/dev/dsk/cNtNdNsN).
 120 
 121 
 122        logical-drive specifies either the DOS logical drive letter (c through
 123        z) or a drive number (1 through 24). Drive letter c is equivalent to
 124        drive number 1 and represents the Primary DOS partition on the disk;
 125        drive letters d through z are equivalent to drive numbers 2 through 24,
 126        and represent DOS drives within the Extended FAT partition. Note that
 127        device-special and logical-drive must be separated by a colon.
 128 
 129 
 130        directory-name specifies the location where the file system is mounted.
 131 
 132 
 133        For example, to mount the Primary DOS partition from a SCSI hard disk,
 134        use:
 135 
 136          mount -F pcfs /dev/dsk/cNtNdNp0:c /pcfs/c
 137 
 138 
 139 
 140 
 141        To mount the first logical drive in the Extended DOS partition from an
 142        IDE hard disk, use:
 143 
 144          mount -F pcfs /dev/dsk/cNdNp0:d /pcfs/d
 145 
 146 
 147 
 148 
 149        To mount a DOS diskette in the first floppy drive when volume
 150        management is not running use:
 151 
 152          mount -F pcfs /dev/diskette /pcfs/a
 153 
 154 
 155 
 156 
 157        If Volume Management is running, run volcheck(1) to automatically mount
 158        the floppy and some removable disks.
 159 
 160 
 161        To mount a PCMCIA pseudo-floppy memory card, with Volume Management not
 162        running (or not managing the PCMCIA media), use:
 163 
 164          mount -F pcfs /dev/dsk/cNtNdNsN /pcfs
 165 
 166 
 167 
 168    Conventions
 169        Files and directories created through pcfs must comply with either the
 170        FAT short file name convention or the long file name convention
 171        introduced with Windows 95. The FAT short file name convention is of
 172        the form filename[.ext], where filename generally consists of from one
 173        to eight upper-case characters, while the optional ext consists of from
 174        one to three upper-case characters.
 175 
 176 
 177        The long file name convention is much closer to Solaris file names. A
 178        long file name can consist of any characters valid in a short file
 179        name, lowercase letters, non-leading spaces, the characters +,;=[], any
 180        number of periods, and can be up to 255 characters long. Long file
 181        names have an associated short file name for systems that do not
 182        support long file names (including earlier releases of Solaris). The
 183        short file name is not visible if the system recognizes long file
 184        names. pcfs generates a unique short name automatically when creating a
 185        long file name.
 186 
 187 
 188        Given a long file name such as This is a really long filename.TXT, the
 189        short file name will generally be of the form THISIS~N.TXT, where N is
 190        a number. The long file name will probably get the short name
 191        THISIS~1.TXT, or THISIS~2.TXT if THISIS~1.TXT already exits (or
 192        THISIS~3.TXT if both exist, and so forth). If you use pcfs file systems
 193        on systems that do not support long file names, you may want to
 194        continue following the short file name conventions. See EXAMPLES.
 195 
 196 
 197        When creating a file name, pcfs creates a short file name if it fits
 198        the FAT short file name format, otherwise it creates a long file name.
 199        This is because long file names take more directory space. Because the
 200        root directory of a pcfs file system is fixed size, long file names in
 201        the root directory should be avoided if possible.
 202 
 203 
 204        When displaying file names, pcfs shows them exactly as they are on the
 205        media. This means that short names are displayed as uppercase and long
 206        file names retain their case. Earlier versions of pcfs folded all names
 207        to lowercase, which can be forced with the PCFS_MNT_FOLDCASE mount
 208        option.  All file name searches within pcfs, however, are treated as if
 209        they were uppercase, so readme.txt and ReAdMe.TxT refer to the same
 210        file.
 211 
 212 
 213        To format a diskette or a PCMCIA pseudo-floppy memory card in FAT
 214        format in the SunOS system, use either the fdformat -d or the DOS
 215        FORMAT command.
 216 
 217    Boot Partitions
 218        On x86 systems, hard drives may contain an fdisk partition reserved for
 219        the Solaris boot utilities. These partitions are special instances of
 220        pcfs. You can mount an x86 boot partition with the command:
 221 
 222          mount -F pcfs device-special:boot directory-name
 223 
 224 
 225 
 226 
 227        or you can use:
 228 
 229          mount directory-name
 230 
 231 
 232 
 233 
 234        if the following line is in your /etc/vfstab file:
 235 
 236          device-special:boot - directory-name pcfs - no rw
 237 
 238 
 239 
 240 
 241        device-special specifies the special block device file for the entire
 242        hard disk (/dev/dsk/cNtNdNp0)
 243 
 244 
 245        directory-name specifies the location where the file system is mounted.
 246 
 247 
 248        All files on a boot partition are owned by super-user. Only the super-
 249        user may create, delete, or modify files on a boot partition.
 250 
 251 EXAMPLES
 252        Example 1 Sample Displays of File Names
 253 
 254 
 255        If you copy a file financial.data from a UNIX file system to pcfs, it
 256        displays as financial.data in pcfs, but may show up as FINANC~1.DAT in
 257        systems that do not support long file names.
 258 
 259 
 260 
 261        The following are legal long file names. They are also illegal short
 262        file names:
 263 
 264          test.sh.orig
 265          data+
 266          .login
 267 
 268 
 269        Other systems that do not support long file names may see:
 270 
 271          TESTSH~1.ORI
 272          DATA~1
 273          LOGIN~1
 274 
 275 
 276        The short file name is generated from the initial characters of the
 277        long file name, so differentiate names in the first few characters. For
 278        example, these names:
 279 
 280          WorkReport.January.Data
 281          WorkReport.February.Data
 282          WorkReport.March.Data
 283 
 284 
 285        result in these short names, which are not distinguishable:
 286 
 287          WORKRE~1.DAT
 288          WORKRE~2.DAT
 289          WORKRE~13.DAT
 290 
 291 
 292        These names, however:
 293 
 294          January.WorkReport.Data
 295          February.WorkReport.Data
 296          March.WorkReport.Data
 297 
 298 
 299        result in the more descriptive short names:
 300 
 301          JANUAR~1.DAT
 302          FEBRUA~1.DAT
 303          MARCHW~1.DAT
 304 
 305 FILES
 306        /usr/lib/fs/pcfs/mount
 307                                  pcfs mount command
 308 
 309 
 310        /usr/kernel/fs/pcfs
 311                                  32-bit kernel module
 312 
 313 
 314 ENVIRONMENT VARIABLES
 315        See environ(5) for descriptions of the following environment variables
 316        for the current locale setting: LANG, LC_ALL, LC_CTYPE, and LC_COLLATE.
 317 
 318 SEE ALSO
 319        chgrp(1), chown(1), dos2unix(1), eject(1), fdformat(1), unix2dos(1),
 320        volcheck(1), mount(1M), mount_pcfs(1M), umount(1M), ctime(3C),
 321        vfstab(4), environ(5), pcmem(7D)
 322 
 323 WARNINGS
 324        Do not physically eject a FAT floppy while the device is mounted as
 325        pcfs. If Volume Management is managing a device, use the eject(1)
 326        command before physically removing media.
 327 
 328 
 329        When mounting pcfs on a hard disk, make sure the first block on that
 330        device contains a valid fdisk partition table.
 331 
 332 
 333        Because pcfs has no provision for handling owner-IDs or group-IDs on
 334        files, chown(1) or chgrp(1) may generate various errors. This is a
 335        limitation of pcfs, but it should not cause problems other than error
 336        messages.
 337 
 338 NOTES
 339        Only the following characters are allowed in pcfs short file names and
 340        extensions:
 341          0-9
 342          A-Z
 343          $#&@!%()-{}<>`_^~|'
 344 
 345 
 346        SunOS and FAT use different character sets and have different
 347        requirements for the text file format. Use the dos2unix(1) and
 348        unix2dos(1) commands to convert files between them.
 349 
 350 
 351        pcfs offers a convenient transportation vehicle for files between Sun
 352        workstations and PCs. Because the FAT disk format was designed for use
 353        under DOS, it does not operate efficiently under the SunOS system and
 354        should not be used as the format for a regular local storage. Instead,
 355        use ufs for local storage within the SunOS system.
 356 
 357 
 358        Although long file names can contain spaces (just as in UNIX file
 359        names), some utilities may be confused by them.
 360 
 361 
 362        This implementation of pcfs conforms to the behavior exhibited by
 363        Windows 95 version 4.00.950.
 364 
 365 
 366        When pcfs encounters long file names with non-ASCII characters, it
 367        converts such long file names in Unicode scalar values into UTF-8
 368        encoded filenames so that they are legible and usable with any of
 369        Solaris UTF-8 locales. In the same context, when new file names with
 370        non-ASCII characters are created, pcfs expects that such file names are
 371        in UTF-8. This feature increases the interoperability of pcfs on
 372        Solaris with other operating systems.
 373 
 374 BUGS
 375        pcfs should handle the disk change condition in the same way that DOS
 376        does, so you do not need to unmount the file system to change floppies.
 377 
 378 
 379 
 380                                November 6, 2007                      PCFS(7FS)