File Allocation Table
File Allocation Table (FAT) is a file system developed for personal computers and was the default file system for the DOS and Windows 9x operating systems.[1] Originally developed in 1977 for use on floppy disks, it was adapted for use on hard disks and other devices.[src] The increase in disk drive capacity over time drove modifications to the design that resulted in new versions: FAT12, FAT16, FAT32, and exFAT.[src] FAT was replaced with NTFS as the default file system on Microsoft operating systems starting with Windows XP.[src] Nevertheless, FAT continues to be commonly used on relatively small capacity solid-state storage technologies such as USB flash drives, SD cards, MultiMediaCards (MMC) and eMMC because of its compatibility across operating systems and embedded systems, and ease of implementation.[src]
File Allocation Table (FAT) is a file system developed for personal computers and was the default file system for the DOS and Windows 9x operating systems.[1] Originally developed in 1977 for use on floppy disks, it was adapted for use on hard disks and other devices.[src] The increase in disk drive capacity over time drove modifications to the design that resulted in new versions: FAT12, FAT16, FAT32, and exFAT.[src] FAT was replaced with NTFS as the default file system on Microsoft operating systems starting with Windows XP.[src] Nevertheless, FAT continues to be commonly used on relatively small capacity solid-state storage technologies such as USB flash drives, SD cards, MultiMediaCards (MMC) and eMMC because of its compatibility across operating systems and embedded systems, and ease of implementation.[src] === Original 8-bit FAT === The original FAT file system (or FAT structure, as it was called initially) was designed and implemented by Marc McDonald, based on a series of discussions between McDonald and Bill Gates.[src] It was introduced with 8-bit table elements (and valid data cluster numbers up to 0xBF ) in a precursor to Microsoft's Standalone Disk BASIC-80 for an 8080-based successor of the NCR 7200 model VI data-entry terminal, equipped with 8-inch (200 mm) floppy disks, in 1977 or 1978.[src] In 1978, Standalone Disk BASIC-80 was ported to the 8086 using an emulator on a DEC PDP-10, since no real 8086 systems were available at this time.[src] The FAT file system was also used in Microsoft's MDOS/MIDAS, an operating system for 8080/Z80 platforms written by McDonald since 1979.[src] The Standalone Disk BASIC version supported three FATs, whereas this was a parameter for MIDAS.[src] Reportedly, MIDAS was also prepared to support 10-bit, 12-bit and 16-bit FAT variants.[src] While the size of directory entries was 16 bytes in Standalone Disk BASIC, MIDAS instead occupied 32 bytes per entry.[src] Tim Paterson of Seattle Computer Products (SCP) was first introduced to Microsoft's FAT structure when he helped Bob O'Rear adapting the Standalone Disk BASIC-86 emulator port onto SCP's S-100 bus 8086 CPU board prototype during a guest week at Microsoft in May 1979.[src] The final product was shown at Lifeboat Associates' booth stand at the National Computer Conference in New York on June 4–7, 1979, where Paterson learned about the more sophisticated FAT implementation in MDOS/MIDAS and McDonald talked to him about the design of the file system.[src] === Initial FAT16 === In 1984, IBM released the PC AT, which required PC DOS 3.0 to access its 20 MB hard disk.[src] Microsoft introduced MS-DOS 3.0 in parallel.[src] Cluster addresses were increased to 16-bit, allowing for up to 65,526 clusters per volume.[src] However, the maximum possible number of sectors and the maximum partition size of 32 MB did not change.[src] Although cluster addresses were 16 bits, this format was not what today is commonly understood as FAT16.[src] A partition type 0x04 indicates this form of FAT16 with less than 65,536 sectors (less than 32 MB for sector size 512).[src] The benefit of FAT16 was the use of smaller clusters, making disk usage more efficient, particularly for large numbers of files only a few hundred bytes in size.[src] As MS-DOS 3.0 formatted all 16 MB-32 MB partitions in the FAT16 format, a 20 MB hard disk formatted under MS-DOS 3.0 was not accessible by MS-DOS 2.0.[src] MS-DOS 3.0 to MS-DOS 3.30 could still access FAT12 partitions under 15 MB, but required all 16 MB-32 MB partitions to be FAT16, and so could not access MS-DOS 2.0 partitions in this size range.[src] MS-DOS 3.31 and higher could access 16 MB-32 MB FAT12 partitions again.[src] === Final FAT16 === In November 1987, Compaq Personal Computer DOS 3.31 (a modified OEM version of MS-DOS 3.3 released by Compaq with their machines) introduced what today is simply known as the FAT16 format, with the expansion of the 16-bit disk sector count to 32 bits in the BPB.[src] Although the on-disk changes were minor, the entire DOS disk driver had to be converted to use 32-bit sector numbers, a task complicated by the fact that it was written in 16-bit assembly language.[src] The result was initially called the DOS 3.31 Large File System.[src] Microsoft's DSKPROBE tool refers to type 0x06 as BigFAT, whereas some older versions of FDISK described it as BIGDOS.[src] Technically, it is known as FAT16B.[src] Since older versions of DOS were not designed to cope with more than 65,535 sectors, it was necessary to introduce a new partition type for this format in order to hide it from pre-3.31 issues of DOS.[src] The original form of FAT16 (with less than 65,536 sectors) had a partition type 0x04 .[src] To deal with disks larger than this, type 0x06 was introduced to indicate 65,536 or more sectors.[src] In addition to this, the disk driver was expanded to cope with more than 65,535 sectors as well.[src] The only other difference between the original FAT16 and the newer FAT16B format is the usage of a newer BPB format with 32-bit sector entry.[src] Therefore, newer operating systems supporting the FAT16B format can cope also with the original FAT16 format without any necessary changes.[src] If partitions to be used by pre-DOS 3.31 issues of DOS need to be created by modern tools, the only criteria theoretically necessary to meet are a sector count of less than 65536, and the usage of the old partition ID ( 0x04 ).[src] In practice however, type 0x01 and 0x04 primary partitions should not be physically located outside the first 32 MB of the disk, due to other restrictions in MS-DOS 2.x, which could not cope with them otherwise.[src] In 1988, the FAT16B improvement became more generally available through DR DOS 3.31, PC DOS 4.0, OS/2 1.1, and MS-DOS 4.0.[src] The limit on partition size was dictated by the 8-bit signed count of sectors per cluster, which originally had a maximum power-of-two value of 64.[src] With the standard hard disk sector size of 512 bytes, this gives a maximum of 32 KB cluster size, thereby fixing the "definitive" limit for the FAT16 partition size at 2 GB for sector size 512.[src] On magneto-optical media, which can have 1 or 2 KB sectors instead of 0.5 KB, this size limit is proportionally larger.[src] Much later, Windows NT increased the maximum cluster size to 64 KB, by considering the sectors-per-cluster count as unsigned.[src] However, the resulting format was not compatible with any other FAT implementation of the time, and it generated greater internal fragmentation.[src] Windows 98, SE and ME also supported reading and writing this variant, but its disk utilities did not work with it and some FCB services are not available for such volumes.[src] This contributes to a confusing compatibility situation.[src] Prior to 1995, versions of DOS accessed the disk via CHS addressing only.[src] When Windows 95 (MS-DOS 7.0) introduced LBA disk access, partitions could start being physically located outside the first c.[src] 8 GB of this disk and thereby out of the reach of the traditional CHS addressing scheme.[src] Partitions partially or fully located beyond the CHS barrier therefore had to be hidden from non-LBA-enabled operating systems by using the new partition type 0x0E in the partition table instead.[src] FAT16 partitions using this partition type are also named FAT16X.[src] The only difference, compared to previous FAT16 partitions, is the fact that some CHS-related geometry entries in the BPB record, namely the number of sectors per track and the number of heads, may contain no or misleading values and should not be used.[src] The number of root directory entries available for FAT12 and FAT16 is determined when the volume is formatted, and is stored in a 16-bit field.[src] For a given number RDE and sector size SS , the number RDS of root directory sectors is RDS=ceil((RDE × 32) / SS) , and RDE is normally chosen to fill these sectors, i.e., RDE × 32=RDS × SS .[src] FAT12 and FAT16 media typically use 512 root directory entries on non-floppy media.[src] Some third-party tools, like mkdosfs, allow the user to set this parameter.[src] ===FAT32=== In order to overcome the volume size limit of FAT16, while at the same time allowing DOS real-mode code to handle the format, Microsoft designed a new version of the file system, FAT32, which supported an increased number of possible clusters, but could reuse most of the existing code, so that the conventional memory footprint was increased by less than 5 KB under DOS.[src] Cluster values are represented by 32-bit numbers, of which 28 bits are used to hold the cluster number.[src] === Extended attributes === OS/2 heavily depends on extended attributes (EAs) and stores them in a hidden file called " EA␠DATA.␠SF " in the root directory of the FAT12 or FAT16 volume.[src] This file is indexed by two previously reserved bytes in the file's (or directory's) directory entry at offset 0x14 .[src] In the FAT32 format, these bytes hold the upper 16 bits of the starting cluster number of the file or directory, hence making it impossible to store OS/2 EAs on FAT32 using this method.[src] However, the third-party FAT32 installable file system (IFS) driver FAT32.IFS version 0.70 and higher by Henk Kelder & Netlabs for OS/2, eComStation and ArcaOS stores extended attributes in extra files with filenames having the string " ␠EA.␠SF " appended to the regular filename of the file to which they belong.[src] The driver also utilizes the byte at offset 0x0C in directory entries to store a special mark byte indicating the presence of extended attributes to help speed up things.[src] (This extension is critically incompatible with the FAT32+ method to store files larger than 4 GB minus 1 on FAT32 volumes.) Extended attributes are accessible via the Workplace Shell desktop, through REXX scripts, and many system GUI and command-line utilities (such as 4OS2).[src] To accommodate its OS/2 subsystem, Windows NT supports the handling of extended attributes in HPFS, NTFS, FAT12 and FAT16.[src] It stores EAs on FAT12, FAT16 and HPFS using exactly the same scheme as OS/2, but does not support any other kind of ADS as held on NTFS volumes.[src] Trying to copy a file with any ADS other than EAs from an NTFS volume to a FAT or HPFS volume gives a warning message with the names of the ADSs that will be lost.[src] It does not support the FAT32.IFS method to store EAs on FAT32 volumes.[src] Windows 2000 onward acts exactly as Windows NT, except that it ignores EAs when copying to FAT32 without any warning (but shows the warning for other ADSs, like "Macintosh Finder Info" and "Macintosh Resource Fork").[src] Cygwin uses " EA␠DATA.␠SF " files as well.[src] === Long file names === One of the user experience goals for the designers of Windows 95 was the ability to use long filenames (LFNs—up to 255 UCS-2 code units long), in addition to classic 8.3 filenames (SFNs).[src] For backward and forward compatibility, LFNs were implemented as an optional extension on top of the existing FAT file system structures using a workaround in the way directory entries are laid out.[src] This transparent method to store long file names in the existing FAT file systems without altering their data structures is usually known as VFAT (for "Virtual FAT") after the Windows 95 virtual device driver.[src] Non VFAT-enabled operating systems can still access the files under their short file name alias without restrictions; however, the associated long file names may be lost when files with long filenames are copied under non VFAT-aware operating systems.[src] In Windows NT, support for VFAT long filenames began with version 3.5.[src] Linux provides a VFAT filesystem driver to work with FAT volumes with VFAT long filenames.[src] For some time, a UVFAT driver was available to provide combined support for UMSDOS-style permissions with VFAT long filenames.[src] OS/2 added long filename support to FAT using extended attributes (EA) before the introduction of VFAT.[src] Thus, VFAT long filenames are invisible to OS/2, and EA long filenames are invisible to Windows; therefore, experienced users of both operating systems would have to manually rename the files.[src] Human68K supported up to 18.3 filenames and (Shift JIS) Kanji characters in a proprietary FAT file system variant.[src] In order to support Java applications, the FlexOS-based IBM 4690 OS version 2 introduced its own virtual file system (VFS) architecture to store long filenames in the FAT file system in a backwards-compatible fashion.[src] If enabled, the virtual filenames (VFN) are available under separate logical drive letters, whereas the real filenames (RFN) remain available under the original drive letters.[src] === UMSDOS permissions and filenames === Early Linux distributions also supported a format known as UMSDOS, a FAT variant with Unix file attributes (such as long file name and access permissions) stored in a separate file called " --linux-.--- ".[src] UMSDOS fell into disuse after VFAT was released and it is not enabled by default in Linux from version 2.5.7 onwards.[src] For some time, Linux also provided combined support for UMSDOS-style permissions and VFAT long filenames through UVFAT.[src] === FAT+ === In 2007 the open FAT+ draft proposed how to store larger files up to 256 GB minus 1 byte, or 274,877,906,943 (2 38 − 1) bytes, on slightly modified and otherwise backward-compatible FAT32 volumes, but imposes a risk that disk tools or FAT32 implementations not aware of this extension may truncate or delete files exceeding the normal FAT32 file size limit.[src] Support for FAT32+ and FAT16+ is limited to some versions of DR-DOS and not available in mainstream operating systems.[src] (This extension is critically incompatible with the /EAS option of the FAT32.IFS method to store OS/2 extended attributes on FAT32 volumes.) == Patents == Microsoft applied for, and was granted, a series of patents for key parts of the FAT file system in the mid-1990s.[src] All four pertain to long-filename extensions to FAT first seen in Windows 95: U.S.[src] patent 5,579,517, U.S.[src] patent 5,745,902, U.S.[src] patent 5,758,352, U.S.[src] patent 6,286,013 (all expired since 2013).[src] On December 3, 2003, Microsoft announced that it would be offering licenses for use of its FAT specification and "associated intellectual property", at the cost of a royalty per unit sold, with a maximum royalty per license agreement.[src] To this end, Microsoft cited four patents on the FAT file system as the basis of its intellectual property claims.[src] In the EFI FAT32 specification, Microsoft specifically grants a number of rights, which many readers have interpreted as permitting operating system vendors to implement FAT.[src] Non-Microsoft patents affecting FAT include: U.S.[src] patent 5,367,671, specific to the OS/2 extended object attributes (expired in 2011).[src] The file system uses an index table stored on the device to identify chains of data storage areas associated with a file, the File Allocation Table (FAT).[1] The FAT is statically allocated at the time of formatting.[src] The table is a linked list of entries for each cluster, a contiguous area of disk storage.[src] Each entry contains either the number of the next cluster in the file, or else a marker indicating the end of the file, unused disk space, or special reserved areas of the disk.[src] The root directory of the disk contains the number of the first cluster of each file in that directory.[src] The operating system can then traverse the FAT, looking up the cluster number of each successive part of the disk file as a cluster chain until the end of the file is reached.[src] Sub-directories are implemented as special files containing the directory entries of their respective files.[src] Each entry in the FAT linked list is a fixed number of bits: 12, 16 or 32.[src] The maximum size of a file or a disk drive that can be accessed is the product of the largest number that can be stored in the entries (less a few values reserved to indicate unallocated space or the end of a list) and the size of the disk cluster.[src] Even if only one byte of storage is needed to extend a file, an entire cluster must be allocated to it.[src] As a result, large numbers of small files can result in clusters being allocated that may contain mostly "empty" data to meet the minimum cluster size.[src] Originally designed as an 8-bit file system, the maximum number of clusters must increase as disk drive capacity increases, and so the number of bits used to identify each cluster has grown.[src] The successive major variants of the FAT format are named after the number of table element bits: 12 (FAT12), 16 (FAT16), and 32 (FAT32).[src] Determine (once) SSA = RSC + FN × SF +ceil((32× RDE )/ SS ) , where the reserved sector count RSC is stored at offset , the number of FATs FN at offset , the sectors per FAT SF at offset (FAT12/FAT16) or (FAT32), the root directory entries RDE at offset , the sector size SS at offset , and ceil(x) rounds up to a whole number.[src] Determine LSN = SSA +( CN −2)× SC , where the sectors per cluster SC are stored at offset .[src] On unpartitioned media the volume's number of hidden sectors is zero and therefore LSN and LBA addresses become the same for as long as a volume's logical sector size is identical to the underlying medium's physical sector size.[src] Under these conditions, it is also simple to translate between CHS addresses and LSNs as well: LSN = SPT ×( HN +( NOS × TN ))+ SN −1 , where the sectors per track SPT are stored at offset , and the number of sides NOS at offset .[src] Track number TN , head number HN , and sector number SN correspond to Cylinder-head-sector: the formula gives the known CHS to LBA translation.[src] Further structure used by FAT12 and FAT16 since OS/2 1.0 and DOS 4.0, also known as Extended BIOS Parameter Block (EBPB) (bytes below sector offset are the same as for the DOS 3.31 BPB): In essence FAT32 inserts 28 bytes into the EBPB, followed by the remaining 26 (or sometimes only 7) EBPB bytes as shown above for FAT12 and FAT16.[src] Microsoft and IBM operating systems determine the type of FAT file system used on a volume solely by the number of clusters, not by the used BPB format or the indicated file system type, that is, it is technically possible to use a "FAT32 EBPB" also for FAT12 and FAT16 volumes as well as a DOS 4.0 EBPB for small FAT32 volumes.[src] Since such volumes were found to be created by Windows operating systems under some odd conditions, operating systems should be prepared to cope with these hybrid forms.[src] Microsoft recommends to distinguish between the two 8-inch formats for FAT ID by trying to read of a single-density address mark.[src] If this results in an error, the medium must be double-density.[src] The table does not list a number of incompatible 8-inch and 5.25-inch FAT12 floppy formats supported by 86-DOS, which differ either in the size of the directory entries (16 bytes vs.[src] 32 bytes) or in the extent of the reserved sectors area (several whole tracks vs.[src] one logical sector only).[src] The implementation of a single-sided 315 KB FAT12 format used in MS-DOS for the Apricot PC and F1e had a different boot sector layout, to accommodate that computer's non-IBM compatible BIOS.[src] The jump instruction and OEM name were omitted, and the MS-DOS BPB parameters (offsets - in the standard boot sector) were located at offset .[src] The Portable, F1, PC duo and Xi FD supported a non-standard double-sided 720 KB FAT12 format instead.[src] The differences in the boot sector layout and media IDs made these formats incompatible with many other operating systems.[src] The geometry parameters for these formats are: 315 KB: Bytes per logical sector: 512 bytes, logical sectors per cluster: 1, reserved logical sectors: 1, number of FATs: 2, root directory entries: 128, total logical sectors: 630, FAT ID: , logical sectors per FAT: 2, physical sectors per track: 9, number of heads: 1.[src] 720 KB: Bytes per logical sector: 512 bytes, logical sectors per cluster: 2, reserved logical sectors: 1, number of FATs: 2, root directory entries: 176, total logical sectors: 1440, FAT ID: , logical sectors per FAT: 3, physical sectors per track: 9, number of heads: 2.[src] Later versions of Apricot MS-DOS gained the ability to read and write disks with the standard boot sector in addition to those with the Apricot one.[src] These formats were also supported by DOS Plus 2.1e/g for the Apricot ACT series.[src] The DOS Plus adaptation for the BBC Master 512 supported two FAT12 formats on 80-track, double-sided, double-density 5.25" drives, which did not use conventional boot sectors at all.[src] 800 KB data disks omitted a boot sector and began with a single copy of the FAT.[src] The first byte of the relocated FAT in logical sector 0 was used to determine the disk's capacity.[src] 640 KB boot disks began with a miniature ADFS file system containing the boot loader, followed by a single FAT.[src] Also, the 640 KB format differed by using physical CHS sector numbers starting with 0 (not 1, as common) and incrementing sectors in the order sector-track-head (not sector-head-track, as common).[src] The FAT started at the beginning of the next track.[src] These differences make these formats unrecognizable by other operating systems.[src] The geometry parameters for these formats are: 800 KB: Bytes per logical sector: 1024 bytes, logical sectors per cluster: 1, reserved logical sectors: 0, number of FATs: 1, root directory entries: 192 , total logical sectors: 800, FAT ID: , logical sectors per FAT: 2, physical sectors per track: 5, number of heads: 2.[src] 640 KB: Bytes per logical sector: 256 bytes, logical sectors per cluster: 8, reserved logical sectors: 16 , number of FATs: 1, root directory entries: 112, total logical sectors: 2560, FAT ID: , logical sectors per FAT: 2, physical sectors per track: 16, number of heads: 2.[src] DOS Plus for the Master 512 could also access standard PC disks formatted to or , using the first byte of the FAT in logical sector 1 to determine the capacity.[src] The DEC Rainbow 100 (all variations) supported one FAT12 format on 80-track, single-sided, quad-density 5.25" drives.[src] The first two tracks were reserved for the boot loader, but didn't contain an MBR nor a BPB (MS-DOS used a static in-memory BPB instead).[src] The boot sector (track 0, side 0, sector 1) was Z80 code beginning with DI .[src] The 8088 bootstrap was loaded by the Z80.[src] Track 1, side 0, sector 2 starts with the Media/FAT ID byte .[src] Unformatted disks use instead.[src] The file system starts on track 2, side 0, sector 1.[src] There are 2 copies of the FAT and 96 entries in the root directory.[src] In addition, there is a physical to logical track mapping to effect a 2:1 sector interleaving.[src] The disks were formatted with the physical sectors in order numbered 1 to 10 on each track after the reserved tracks, but the logical sectors from 1 to 10 were stored in physical sectors 1, 6, 2, 7, 3, 8, 4, 9, 5, 10.[src] + , .[src] ;=[ ] Allowed in long file names only Lower case letters a – z Stored as A – Z ; allowed in long file names Control characters 0–31 Character 127 (DEL) Character 229 ( ) was not allowed as first character in a filename in DOS 1 and 2 due to its use as free entry marker.[src] A special case was added to circumvent this limitation with DOS 3.0 and higher.[src] The following additional characters are allowed on Atari's GEMDOS, but should be avoided for compatibility with MS-DOS/PC DOS: " + , ; [ ] | The semicolon ( ; ) should be avoided in filenames under DR DOS 3.31 and higher, PalmDOS, Novell DOS, OpenDOS, Concurrent DOS , Multiuser DOS, System Manager and REAL/32 , because it may conflict with the syntax to specify file and directory passwords: " ...\DIRSPEC.EXT;DIRPWD\FILESPEC.EXT;FILEPWD ".[src] The operating system will strip off one (and also two—since DR-DOS 7.02) semicolons and pending passwords from the filenames before storing them on disk.[src] (The command processor 4DOS uses semicolons for include lists and requires the semicolon to be doubled for password protected files with any commands supporting wildcards.[src] ) The at-sign character ( @ ) is used for filelists by many DR-DOS, PalmDOS, Novell DOS, OpenDOS and Multiuser DOS, System Manager and REAL/32 commands, as well as by 4DOS and may therefore sometimes be difficult to use in filenames.[src] Under Multiuser DOS and REAL/32, the exclamation mark (!) is not a valid filename character since it is used to separate multiple commands in a single command line.[src] Under IBM 4680 OS and 4690 OS, the following characters are not allowed in filenames: ?[src] * : .[src] ; , [ ] ![src] += " - / \ | Additionally, the following special characters are not allowed in the first, fourth, fifth and eight character of a filename, as they conflict with the host command processor (HCP) and input sequence table build file names: @ # ( ) {} $ & The DOS file names are in the current OEM character set: this can have surprising effects if characters handled in one way for a given code page are interpreted differently for another code page (DOS command CHCP ) with respect to lower and upper case, sorting, or validity as file name character.[1] Before Microsoft added support for long filenames and creation/access time stamps, bytes – of the directory entry were used by other operating systems to store additional metadata, most notably the operating systems of the Digital Research family stored file passwords, access rights, owner IDs, and file deletion data there.[src] While Microsoft's newer extensions are not fully compatible with these extensions by default, most of them can coexist in third-party FAT implementations (at least on FAT12 and FAT16 volumes).[src] 32-byte directory entries, both in the Root Directory Region and in subdirectories, are of the following format (see also 8.3 filename): Versions of DOS prior to 5.0 start scanning directory tables from the top of the directory table to the bottom.[src] In order to increase chances for successful file undeletion, DOS 5.0 and higher will remember the position of the last written directory entry and use this as a starting point for directory table scans.[1] |- | style="text-align:right;vertical-align:top;"| 0x08 | style="text-align:right;vertical-align:top;"| 3 | Short file extension (padded with spaces) |- | style="text-align:right;vertical-align:top;"| 0x0B | style="text-align:right;vertical-align:top;"| 1 | File Attributes Under DR DOS 6.0 and higher, including PalmDOS, Novell DOS and OpenDOS, the volume attribute is set for pending delete files and directories under DELWATCH.[src] An attribute combination of is used to designate a VFAT long file name entry since MS-DOS 7.0.[src] Older versions of DOS can mistake this for a directory volume label, as they take the first entry with volume attribute set as volume label.[src] This problem can be avoided if a directory volume label is enforced as part of the format process; for this reason some disk tools explicitly write dummy " NO␠NAME␠␠␠␠ " directory volume labels when the user does not specify a volume label.[src] Since volume labels normally don't have the system attribute set at the same time, it is possible to distinguish between volume labels and VFAT LFN entries.[src] The attribute combination could occasionally also occur as part of a valid pending delete file under DELWATCH, however on FAT12 and FAT16 volumes, VFAT LFN entries always have the cluster value at set to and the length entry at is never , whereas the entry at is always non-zero for pending delete files under DELWATCH.[src] This check does not work on FAT32 volumes.[src] |- | style="text-align:right;vertical-align:top;"| 0x0C | style="text-align:right;vertical-align:top;"| 1 | CP/M-86 and DOS Plus store user attributes F1'—F4' here.[src] (DOS Plus 1.2 with BDOS 4.1 supports passwords only on CP/M media, not on FAT12 or FAT16 media.[src] While DOS Plus 2.1 supported logical sectored FATs with a partition type , FAT16B and FAT32 volumes were not supported by these operation systems.[src] Even if a partition would have been converted to FAT16B it would still not be larger than 32 MB.[src] Therefore, this usage does not conflict with FAT32.IFS, FAT16+ or FAT32+ as they can never occur on the same type of volume.): MSX-DOS 2: For a deleted file, the original first character of the filename.[src] For the same feature in various other operating systems, see offset if enabled in MSX boot sectors at sector offset .[src] MSX-DOS supported FAT12 volumes only, but third-party extensions for FAT16 volumes exist.[src] Therefore, this usage does not conflict with FAT32.IFS and FAT32+ below.[src] It does not conflict with the usage for user attributes under CP/M-86 and DOS Plus as well, since they are no longer important for deleted files.[src] Windows NT and later versions uses bits 3 and 4 to encode case information (see VFAT); otherwise 0.[src] DR-DOS 7.0x reserved bits other than 3 and 4 for internal purposes since 1997.[src] The value should be set to 0 by formatting tools and must not be changed by disk tools.[src] On FAT32 volumes under OS/2 and eComStation the third-party FAT32.IFS driver utilizes this entry as a mark byte to indicate the presence of extra " ␠EA.␠SF " files holding extended attributes with parameter /EAS .[src] Version 0.70 to 0.96 used the magic values (no EAs), (normal EAs) and (critical EAs), whereas version 0.97 and higher since 2003-09 use , (normal EAs) and (critical EAs) as bitflags for compatibility with Windows NT.[src] |- | style="text-align:right;vertical-align:top;"| 0x0D | style="text-align:right;vertical-align:top;"| 1 | First character of a deleted file under Novell DOS, OpenDOS and DR-DOS 7.02 and higher.[src] A value of (229), as set by DELPURGE, will prohibit undeletion by UNDELETE, a value of will allow conventional undeletion asking the user for the missing first filename character.[src] S/DOS 1 and PTS-DOS 6.51 and higher also support this feature if enabled with SAVENAME=ON in CONFIG.SYS.[src] For the same feature in MSX-DOS, see offset .[src] Create time, fine resolution: 10 ms units, values from 0 to 199 (since DOS 7.0 with VFAT).[src] Double usage for create time ms and file char does not create a conflict, since the creation time is no longer important for deleted files.[src] |- | style="text-align:right;vertical-align:top;"| 0x0E | style="text-align:right;vertical-align:top;"| 2 | Under DR DOS 3.31 and higher including PalmDOS, Novell DOS and OpenDOS as well as under Concurrent DOS , Multiuser DOS, System Manager, and REAL/32 and possibly also under FlexOS, 4680 OS, 4690 OS any non-zero value indicates the password hash of a protected file, directory or volume label.[src] The hash is calculated from the first eight characters of a password.[src] If the file operation to be carried out requires a password as per the access rights bitmap stored at offset , the system tries to match the hash against the hash code of the currently set global password (by PASSWORD /G ) or, if this fails, tries to extract a semicolon-appended password from the filespec passed to the operating system and checks it against the hash code stored here.[src] A set password will be preserved even if a file is deleted and later undeleted.[src] Create time (since DOS 7.0 with VFAT).[src] The hour, minute and second are encoded according to the following bitmap: The seconds is recorded only to a 2 second resolution.[src] Finer resolution for file creation is found at offset .[src] If bits 15-11 > 23 or bits 10-5 > 59 or bits 4-0 > 29 here, or when bits 12-0 at offset hold an access bitmap and this is not a FAT32 volume or a volume using OS/2 Extended Attributes , then this entry actually holds a password hash, otherwise it can be assumed to be a file creation time.[src] |- | style="text-align:right;vertical-align:top;"| 0x10 | style="text-align:right;vertical-align:top;"| 2 | FlexOS, 4680 OS and 4690 OS store a record size in the word at entry .[src] This is mainly used for their special database-like file types random file, direct file, keyed file, and sequential file.[src] If the record size is set to 0 (default) or 1, the operating systems assume a record granularity of 1 byte for the file, for which it will not perform record boundary checks in read/write operations.[src] With DELWATCH 2.00 and higher under Novell DOS 7, OpenDOS 7.01 and DR-DOS 7.02 and higher, this entry is used to store the last modified time stamp for pending delete files and directories.[src] Cleared when file is undeleted or purged.[src] See offset for a format description.[src] Create date (since DOS 7.0 with VFAT).[src] The year, month and day are encoded according to the following bitmap: The usage for creation date for existing files does not conflict with last modified time for deleted files because they are never used at the same time.[src] For the same reason, the usage for the record size of existing files and last modified time of deleted files does not conflict.[src] Creation dates and record sizes cannot be used at the same time, however, both are stored only on file creation and never changed later on, thereby limiting the conflict to FlexOS, 4680 OS and 4690 OS systems accessing files created under foreign operating systems as well as potential display or file sorting problems on systems trying to interpret a record size as creation time.[src] To avoid the conflict, the storage of creation dates should be an optional feature of operating systems supporting it.[src] |- | style="text-align:right;vertical-align:top;"| 0x12 | style="text-align:right;vertical-align:top;"| 2 | FlexOS , 4680 OS, 4690 OS, Multiuser DOS , System Manager, REAL/32 and DR DOS 6.0 and higher with multi-user security enabled use this field to store owner IDs.[src] Offset holds the user ID, the group ID of a file's creator.[src] In multi-user versions, system access requires a logon with account name and password, and the system assigns group and user IDs to running applications according to the previously set up and stored authorization info and inheritance rules.[src] For 4680 OS and 4690 OS, group ID 1 is reserved for the system, group ID 2 for vendor, group ID 3 for the default user group.[src] Background applications started by users have a group ID 2 and user ID 1, whereas operating system background tasks have group IDs 1 or 0 and user IDs 1 or 0.[src] IBM 4680 BASIC and applications started as primary or secondary always get group ID 2 and user ID 1.[src] When applications create files, the system will store their user ID and group ID and the required permissions with the file.[src] With DELWATCH 2.00 and higher under Novell DOS 7, OpenDOS 7.01 and DR-DOS 7.02 and higher, this entry is used to store the last modified date stamp for pending delete files and directories.[src] Cleared when file is undeleted or purged.[src] See offset for a format description.[src] Last access date (since DOS 7.0 if ACCDATE enabled in CONFIG.SYS for the corresponding drive); see offset for a format description.[src] The usage for the owner IDs of existing files does not conflict with last modified date stamp for deleted files because they are never used at the same time.[src] The usage of the last modified date stamp for deleted files does not conflict with access date since access dates are no longer important for deleted files.[src] However, owner IDs and access dates cannot be used at the same time.[src] |- | style="text-align:right;vertical-align:top;"| 0x14 | style="text-align:right;vertical-align:top;"| 2 | High two bytes of first cluster number in FAT32; with the low two bytes stored at offset .[src] Access rights bitmap for world/group/owner read/write/execute/delete protection for password protected files, directories (or volume labels) under DR DOS 3.31 and higher, including PalmDOS, Novell DOS and OpenDOS, and under FlexOS, 4680 OS, 4690 OS, Concurrent DOS , Multiuser DOS , System Manager, and REAL/32.[src] Typical values stored on a single-user system are ( PASSWORD /N for all access rights "RWED"), ( PASSWORD /D for access rights "RW?-"), ( PASSWORD /W for access rights "R-?-") and ( PASSWORD /R for files or PASSWORD /P for directories for access rights "--?-").[src] Bits 1, 5, 9, 12-15 will be preserved when changing access rights.[src] If execute bits are set on systems other than FlexOS, 4680 OS or 4690 OS, they will be treated similar to read bits.[src] (Some versions of PASSWORD allow to set passwords on volume labels ( PASSWORD /V ) as well.) Single-user systems calculate the most restrictive rights of the three sets (DR DOS up to 5.0 used bits 0-3 only) and check if any of the requested file access types requires a permission and if a file password is stored.[src] If not, file access is granted.[src] Otherwise the stored password is checked against an optional global password provided by the operating system and an optional file password provided as part of the filename separated by a semicolon (not under FlexOS, 4680 OS, 4690 OS).[src] If neither of them is provided, the request will fail.[src] If one of them matches, the system will grant access (within the limits of the normal file attributes, that is, a read-only file can still not be opened for write this way), otherwise fail the request.[src] Under FlexOS, 4680 OS and 4690 OS the system assigns group and user IDs to applications when launched.[src] When they request file access, their group and user IDs are compared with the group and user IDs of the file to be opened.[src] If both IDs match, the application will be treated as file owner.[src] If only the group ID matches, the operating system will grant group access to the application, and if the group ID does not match as well, it will grant world access.[src] If an application's group ID and user ID are both 0, the operating system will bypass security checking.[src] Once the permission class has been determined, the operating system will check if any of the access types of the requested file operation requires a permission according to the stored bitflags of the selected class owner, group or world in the file's directory entry.[src] Owner, group and world access rights are independent and do not need to have diminishing access levels.[src] Only, if none of the requested access types require a permission, the operating system will grant access, otherwise it fails.[src] If multiuser file / directory password security is enabled the system will not fail at this stage but perform the password checking mechanism for the selected permission class similar to the procedure described above.[src] With multi-user security loaded many utilities since DR DOS 6.0 will provide an additional /U:name parameter.[src] File access rights bitmap: File renames require either write or delete rights, IBM 4680 BASIC CHAIN requires execute rights.[src] Extended Attributes handle (used by OS/2 1.2 and higher as well as by Windows NT) in FAT12 and FAT16; first cluster of EA file or 0, if not used.[src] A different method to store extended attributes has been devised for FAT32 volumes, see FAT32.IFS under offset .[src] The storage of the high two bytes of the first cluster in a file on FAT32 partially conflicts with access rights bitmaps.[src] |- | style="text-align:right;vertical-align:top;"| 0x16 | style="text-align:right;vertical-align:top;"| 2 | Last modified time (since PC DOS 1.1/MS-DOS 1.20); see offset for a format description.[src] Under Novell DOS, OpenDOS and DR-DOS 7.02 and higher, this entry holds the deletion time of pending delete files or directories under DELWATCH 2.00 or higher.[src] The last modified time stamp is copied to for possible later restoration.[src] See offset for a format description.[src] |- | style="text-align:right;vertical-align:top;"| 0x18 | style="text-align:right;vertical-align:top;"| 2 | Last modified date; see offset for a format description.[src] Under Novell DOS, OpenDOS and DR-DOS 7.02 and higher, this entry holds the deletion date of pending delete files or directories under DELWATCH 2.00 or higher.[src] The last modified date stamp is copied to for possible later restoration.[src] See offset for a format description.[src] |- | style="text-align:right;"| 0x1A | style="text-align:right;"| 2 | Start of file in clusters in FAT12 and FAT16.[src] Low two bytes of first cluster in FAT32; with the high two bytes stored at offset .[src] Entries with the Volume Label flag, subdirectory ".." pointing to the FAT12 and FAT16 root, and empty files with size 0 should have first cluster 0.[src] VFAT LFN entries also have this entry set to 0; on FAT12 and FAT16 volumes this can be used as part of a detection mechanism to distinguish between pending delete files under DELWATCH and VFAT LFNs; see above.[src] |- | style="text-align:right;vertical-align:top;"| 0x1C | style="text-align:right;vertical-align:top;"| 4 | File size in bytes.[src] Entries with the Volume Label or Subdirectory flag set should have a size of 0.[src] VFAT LFN entries never store the value here.[src] This can be used as part of a detection mechanism to distinguish between pending delete files under DELWATCH and VFAT LFNs; see above.[src] |} The FlexOS-based operating systems IBM 4680 OS and IBM 4690 OS support unique distribution attributes stored in some bits of the previously reserved areas in the directory entries: Local: Don't distribute file but keep on local controller only.[src] Mirror file on update: Distribute file to server only when file is updated.[src] Mirror file on close: Distribute file to server only when file is closed.[src] Compound file on update: Distribute file to all controllers when file is updated.[src] Compound file on close: Distribute file to all controllers when file is closed.[src] Some incompatible extensions found in some operating systems include: FAT12 requirements : 3 sectors on each copy of FAT for every 1,024 clusters FAT16 requirements : 1 sector on each copy of FAT for every 256 clusters FAT32 requirements : 1 sector on each copy of FAT for every 128 clusters FAT12 range : 1 to 4,084 clusters : 1 to 12 sectors per copy of FAT FAT16 range : 4,085 to 65,524 clusters : 16 to 256 sectors per copy of FAT FAT32 range : 65,525 to 268,435,444 clusters : 512 to 2,097,152 sectors per copy of FAT FAT12 minimum : 1 sector per cluster × 1 clusters=512 bytes (0.5 KiB) FAT16 minimum : 1 sector per cluster × 4,085 clusters=2,091,520 bytes (2,042.5 KB) FAT32 minimum : 1 sector per cluster × 65,525 clusters=33,548,800 bytes (32,762.5 KB) FAT12 maximum : 64 sectors per cluster × 4,084 clusters=133,824,512 bytes (≈ 127 MB) [FAT12 maximum : 128 sectors per cluster × 4,084 clusters=267,694,024 bytes (≈ 255 MB)] FAT16 maximum : 64 sectors per cluster × 65,524 clusters=2,147,090,432 bytes (≈2,047 MB) [FAT16 maximum : 128 sectors per cluster × 65,524 clusters=4,294,180,864 bytes (≈4,095 MB)] FAT32 maximum : 8 sectors per cluster × 268,435,444 clusters=1,099,511,578,624 bytes (≈1,024 GB) FAT32 maximum : 16 sectors per cluster × 268,173,557 clusters=2,196,877,778,944 bytes (≈2,046 GB) [FAT32 maximum : 32 sectors per cluster × 134,152,181 clusters=2,197,949,333,504 bytes (≈2,047 GB)] [FAT32 maximum : 64 sectors per cluster × 67,092,469 clusters=2,198,486,024,192 bytes (≈2,047 GB)] [FAT32 maximum : 128 sectors per cluster × 33,550,325 clusters=2,198,754,099,200 bytes (≈2,047 GB)] Legend: 268435444+3 is , because FAT32 version 0 uses only 28 bits in the 32-bit cluster numbers, cluster numbers up to flag bad clusters or the end of a file, cluster number 0 flags a free cluster, and cluster number 1 is not used.[src] Likewise 65524+3 is for FAT16, and 4084+3 is for FAT12.[src] The number of sectors per cluster is a power of 2 fitting in a single byte, the smallest value is 1 ( ), the biggest value is 128 ( ).[src] Lines in square brackets indicate the unusual cluster size 128, and for FAT32 the bigger than necessary cluster sizes 32 or 64.[src] Because each FAT32 entry occupies 32 bits (4 bytes) the maximal number of clusters (268435444) requires 2097152 FAT sectors for a sector size of 512 bytes.[src] 2097152 is , and storing this value needs more than two bytes.[src] Therefore, FAT32 introduced a new 32-bit value in the FAT32 boot sector immediately following the 32-bit value for the total number of sectors introduced in the FAT16B variant.[src] The boot record extensions introduced with DOS 4.0 start with a magic 40 ( ) or 41 ( ).[src] Typically FAT drivers look only at the number of clusters to distinguish FAT12, FAT16, and FAT32: the human readable strings identifying the FAT variant in the boot record are ignored, because they exist only for media formatted with DOS 4.0 or later.[src] Determining the number of directory entries per cluster is straightforward.[src] Each entry occupies 32 bytes; this results in 16 entries per sector for a sector size of 512 bytes.[src] The DOS 5 RMDIR / RD command removes the initial " .[src] " (this directory) and " ..[src] " (parent directory) entries in subdirectories directly, therefore sector size 32 on a RAM disk is possible for FAT12, but requires 2 or more sectors per cluster.[src] A FAT12 boot sector without the DOS 4 extensions needs 29 bytes before the first unnecessary FAT16B 32-bit number of hidden sectors, this leaves three bytes for the (on a RAM disk unused) boot code and the magic at the end of all boot sectors.[src] On Windows NT the smallest supported sector size is 128.[src] On Windows NT operating systems the FORMAT command options /A:128K and /A:256K correspond to the maximal cluster size 0x80 (128) with a sector size 1024 and 2048, respectively.[src] For the common sector size 512 /A:64K yields 128 sectors per cluster.[src] Both editions of each ECMA-107 and ISO/IEC 9293 specify a Max Cluster Number MAX determined by the formula MAX=1+trunc(( TS - SSA )/ SC ) , and reserve cluster numbers MAX+1 up to 4086 ( , FAT12) and later 65526 ( , FAT16) for future standardization.[src] Microsoft's EFI FAT32 specification states that any FAT file system with less than 4085 clusters is FAT12, else any FAT file system with less than 65,525 clusters is FAT16, and otherwise it is FAT32.[src] The entry for cluster 0 at the beginning of the FAT must be identical to the media descriptor byte found in the BPB, whereas the entry for cluster 1 reflects the end-of-chain value used by the formatter for cluster chains ( , or ).[src] The entries for cluster numbers 0 and 1 end at a byte boundary even for FAT12, e.g., for media descriptor .[src] The first data cluster is 2, and consequently the last cluster MAX gets number MAX+1 .[src] This results in data cluster numbers 2...4085 ( ) for FAT12, 2...65525 ( ) for FAT16, and 2...268435445 ( ) for FAT32.[src] The only available values reserved for future standardization are therefore (FAT12) and (FAT16).[src] As noted below "less than 4085" is also used for Linux implementations, or as Microsoft's FAT specification puts it: ...when it says <, it does not mean <=.[src] Note also that the numbers are correct.[src] The first number for FAT12 is 4085; the second number for FAT16 is 65525.[src] These numbers and the "<" signs are not wrong." The FAT file system does not contain built-in mechanisms which prevent newly written files from becoming scattered across the partition.[src] On volumes where files are created and deleted frequently or their lengths often changed, the medium will become increasingly fragmented over time.[src] While the design of the FAT file system does not cause any organizational overhead in disk structures or reduce the amount of free storage space with increased amounts of fragmentation, as it occurs with external fragmentation, the time required to read and write fragmented files will increase as the operating system will have to follow the cluster chains in the FAT (with parts having to be loaded into memory first in particular on large volumes) and read the corresponding data physically scattered over the whole medium reducing chances for the low-level block device driver to perform multi-sector disk I/O or initiate larger DMA transfers, thereby effectively increasing I/O protocol overhead as well as arm movement and head settle times inside the disk drive.[src] Also, file operations will become slower with growing fragmentation as it takes increasingly longer for the operating system to find files or free clusters.[src] Other file systems, e.g., HPFS or exFAT, use free space bitmaps that indicate used and available clusters, which could then be quickly looked up in order to find free contiguous areas.[src] Another solution is the linkage of all free clusters into one or more lists (as is done in Unix file systems).[src] Instead, the FAT has to be scanned as an array to find free clusters, which can lead to performance penalties with large disks.[src] In fact, seeking for files in large subdirectories or computing the free disk space on FAT volumes is one of the most resource intensive operations, as it requires reading the directory tables or even the entire FAT linearly.[src] Since the total amount of clusters and the size of their entries in the FAT was still small on FAT12 and FAT16 volumes, this could still be tolerated on FAT12 and FAT16 volumes most of the time, considering that the introduction of more sophisticated disk structures would have also increased the complexity and memory footprint of real-mode operating systems with their minimum total memory requirements of 128 KB or less (such as with DOS) for which FAT has been designed and optimized originally.[src] With the introduction of FAT32, long seek and scan times became more apparent, particularly on very large volumes.[src] A possible justification suggested by Microsoft's Raymond Chen for limiting the maximum size of FAT32 partitions created on Windows was the time required to perform a " DIR " operation, which always displays the free disk space as the last line.[src] Displaying this line took longer and longer as the number of clusters increased.[src] FAT32 therefore introduced a special file system information sector where the previously computed amount of free space is preserved over power cycles, so that the free space counter needs to be recalculated only when a removable FAT32 formatted medium gets ejected without first unmounting it or if the system is switched off without properly shutting down the operating system, a problem mostly visible with pre-ATX-style PCs , on plain DOS systems and some battery-powered consumer products.[src] With the huge cluster sizes (16 KB, 32 KB, 64 KB) forced by larger FAT partitions, internal fragmentation in form of disk space waste by file slack due to cluster overhang (as files are rarely exact multiples of cluster size) starts to be a problem as well, especially when there are a great many small files.[src] Various optimizations and tweaks to the implementation of FAT file system drivers, block device drivers and disk tools have been devised to overcome most of the performance bottlenecks in the file system's inherent design without having to change the layout of the on-disk structures.[src] They can be divided into on-line and off-line methods and work by trying to avoid fragmentation in the file system in the first place, deploying methods to better cope with existing fragmentation, and by reordering and optimizing the on-disk structures.[src] With optimizations in place, the performance on FAT volumes can often reach that of more sophisticated file systems in practical scenarios, while at the same time retaining the advantage of being accessible even on very small or old systems.[src] DOS 3.0 and higher will not immediately reuse disk space of deleted files for new allocations but instead seek for previously unused space before starting to use disk space of previously deleted files as well.[src] This not only helps to maintain the integrity of deleted files for as long as possible but also speeds up file allocations and avoids fragmentation, since never before allocated disk space is always unfragmented.[src] DOS accomplishes this by keeping a pointer to the last allocated cluster on each mounted volume in memory and starts searching for free space from this location upwards instead of at the beginning of the FAT, as it was still done by DOS 2.x.[src] If the end of the FAT is reached, it would wrap around to continue the search at the beginning of the FAT until either free space has been found or the original position has been reached again without having found free space.[src] These pointers are initialized to point to the start of the FATs after bootup, but on FAT32 volumes, DOS 7.1 and higher will attempt to retrieve the last position from the FS Information Sector.[src] This mechanism is defeated, however, if an application often deletes and recreates temporary files as the operating system would then try to maintain the integrity of void data effectively causing more fragmentation in the end.[src] In some DOS versions, the usage of a special API function to create temporary files can be used to avoid this problem.[src] Additionally, directory entries of deleted files will be marked since DOS 3.0.[src] DOS 5.0 and higher will start to reuse these entries only when previously unused directory entries have been used up in the table and the system would otherwise have to expand the table itself.[src] Since DOS 3.3 the operating system provides means to improve the performance of file operations with FASTOPEN by keeping track of the position of recently opened files or directories in various forms of lists (MS-DOS/PC DOS) or hash tables (DR-DOS) , which can reduce file seek and open times significantly.[src] Before DOS 5.0 special care must be taken when using such mechanisms in conjunction with disk defragmentation software bypassing the file system or disk drivers.[src] Windows NT will allocate disk space to files on FAT in advance, selecting large contiguous areas, but in case of a failure, files which were being appended will appear larger than they were ever written into, with a lot of random data at the end.[src] Other high-level mechanisms may read in and process larger parts or the complete FAT on startup or on demand when needed and dynamically build up in-memory tree representations of the volume's file structures different from the on-disk structures.[src] This may, on volumes with many free clusters, occupy even less memory than an image of the FAT itself.[src] In particular on highly fragmented or filled volumes, seeks become much faster than with linear scans over the actual FAT, even if an image of the FAT would be stored in memory.[src] Also, operating on the logically high level of files and cluster-chains instead of on sector or track level, it becomes possible to avoid some degree of file fragmentation in the first place or to carry out local file defragmentation and reordering of directory entries based on their names or access patterns in the background.[src] Some of the perceived problems with fragmentation of FAT file systems also result from performance limitations of the underlying block device drivers, which becomes more visible the lesser memory is available for sector buffering and track blocking/deblocking: While the single-tasking DOS had provisions for multi-sector reads and track blocking/deblocking, the operating system and the traditional PC hard disk architecture (only one outstanding input/output request at a time and no DMA transfers) originally did not contain mechanisms which could alleviate fragmentation by asynchronously prefetching next data while the application was processing the previous chunks.[src] Such features became available later.[src] Later DOS versions also provided built-in support for look-ahead sector buffering and came with dynamically loadable disk caching programs working on physical or logical sector level, often utilizing EMS or XMS memory and sometimes providing adaptive caching strategies or even run in protected mode through DPMS or Cloaking to increase performance by gaining direct access to the cached data in linear memory rather than through conventional DOS APIs.[src] Write-behind caching was often not enabled by default with Microsoft software (if present) given the problem of data loss in case of a power failure or crash, made easier by the lack of hardware protection between applications and the system.[src] VFAT Long File Names (LFNs) are stored on a FAT file system using a trick: adding additional entries into the directory before the normal file entry.[src] The additional entries are marked with the Volume Label, System, Hidden, and Read Only attributes (yielding ), which is a combination that is not expected in the MS-DOS environment, and therefore ignored by MS-DOS programs and third-party utilities.[src] Notably, a directory containing only volume labels is considered as empty and is allowed to be deleted; such a situation appears if files created with long names are deleted from plain DOS.[src] This method is very similar to the DELWATCH method to utilize the volume attribute to hide pending delete files for possible future undeletion since DR DOS 6.0 (1991) and higher.[src] It is also similar to a method publicly discussed to store long filenames on Ataris and under Linux in 1992.[src] Because older versions of DOS could mistake LFN names in the root directory for the volume label, VFAT was designed to create a blank volume label in the root directory before adding any LFN name entries (if a volume label did not already exist).[src] Each phony entry can contain up to 13 UCS-2 characters (26 bytes) by using fields in the record which contain file size or time stamps (but not the starting cluster field, for compatibility with disk utilities, the starting cluster field is set to a value of 0.[src] See 8.3 filename for additional explanations).[src] Up to 20 of these 13-character entries may be chained, supporting a maximum length of 255 UCS-2 characters.[src] If the position of the LFN's last character is not at a directory entry boundary (13, 26, 39, ...), then a terminator is added in the next character position.[src] Then, if that terminator is also not at the boundary, remaining character positions are filled with .[src] No directory entry containing a lone terminator will exist.[src] LFN entries use the following format: If there are multiple LFN entries required to represent a file name, the entry representing the end of the filename comes first.[src] The sequence number of this entry has bit 6 ( ) set to represent that it is the last logical LFN entry, and it has the highest sequence number.[src] The sequence number decreases in the following entries.[src] The entry representing the start of the filename has sequence number 1.[src] A value of is used to indicate that the entry is deleted.[src] On FAT12 and FAT16 volumes, testing for the values at to be zero and at to be non-zero can be used to distinguish between VFAT LFNs and pending delete files under DELWATCH.[src] For example, a filename like "File with very long filename.ext" would be formatted like this: A checksum also allows verification of whether a long file name matches the 8.3 name; such a mismatch could occur if a file was deleted and re-created using DOS in the same directory position.[src] The checksum is calculated using the algorithm below.[src] (pFCBName is a pointer to the name as it appears in a regular directory entry, i.e.[src] the first eight characters are the filename, and the last three are the extension.[src] The dot is implicit.[src] Any unused space in the filename is padded with space characters (ASCII ).[src] For example, "Readme.txt" would be " README␠␠TXT ".) unsigned char lfn_checksum(const unsigned char *pFCBName) { unsigned char sum=0; for (int i = 0; i > 1) + pFCBName[i]; return sum; } If a filename contains only lowercase letters, or is a combination of a lowercase basename with an uppercase extension, or vice versa; and has no special characters, and fits within the 8.3 limits, a VFAT entry is not created on Windows NT and later versions of Windows such as XP.[src] Instead, two bits in byte of the directory entry are used to indicate that the filename should be considered as entirely or partially lowercase.[src] Specifically, bit 4 means lowercase extension and bit 3 lowercase basename, which allows for combinations such as " example.TXT " or " HELLO.txt " but not " Mixed.txt ".[src] Few other operating systems support it.[src] This creates a backwards-compatibility problem with older Windows versions (Windows 95 / 98 / 98 SE / ME) that see all-uppercase filenames if this extension has been used, and therefore can change the name of a file when it is transported between operating systems, such as on a USB flash drive.[src] Current 2.6.x versions of Linux will recognize this extension when reading (source: kernel 2.6.18 /fs/fat/dir.c and fs/vfat/namei.c ); the mount option shortname determines whether this feature is used when writing.[src] Microsoft TechNet: A Brief and Incomplete History of FAT32 by Raymond Chen FAT32 Formatter : allows formatting volumes larger than with FAT32 under Windows 2000, Windows XP and Windows Vista Fdisk does not recognize full size of hard disks larger than : Microsoft Knowledge Base Article 263044, copy made by Internet Archive Wayback Machine.[src] Explains inability to work with extremely large volumes under Windows 95/98.[src] Microsoft Windows XP: FAT32 File System.[src] Copy made by Internet Archive Wayback Machine of an article with summary of limits in FAT32 which is no longer available on Microsoft website.[src] Visual Layout of a FAT16 drive[src]
377 sentences · 377 cited inline · 1 references stored
References
- File Allocation Table · retrieved 2026-11-23 · rev 1378829871
Cite this reference
MLA "File Allocation Table." 2026-11-23. https://en.wikipedia.org/w/index.php?oldid=1378829871. Accessed 25 November 2026.
Chicago "File Allocation Table." 2026-11-23. https://en.wikipedia.org/w/index.php?oldid=1378829871.
APA encyclopegia.org. (2026). File Allocation Table. Retrieved November 25, 2026, from https://en.wikipedia.org/w/index.php?oldid=1378829871
Cite this article
MLA
"File Allocation Table." encyclopegia.org, 2026, https://encyclopegia.org/wiki/file-allocation-table. Accessed 25 November 2026.
Chicago
"File Allocation Table." encyclopegia.org. Accessed November 25, 2026. https://encyclopegia.org/wiki/file-allocation-table.
APA
encyclopegia.org. (2026). File Allocation Table. Retrieved November 25, 2026, from https://encyclopegia.org/wiki/file-allocation-table
Accessed November 25, 2026 · CC BY-SA 4.0 · citation page · JSON
Claims
| Predicate | Value | Source |
|---|---|---|
| definition | a file system developed for personal computers and was the default file system for the DOS and Windows 9x operating systems. | article body |
| year mentioned | 1977 | article body |
| year mentioned | 1978 | article body |
| year mentioned | 1979 | article body |
| release date | 1984 | article body |
| release date | 1987 | article body |
| year mentioned | 1988 | article body |
| year mentioned | 1995 | article body |