Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
File Allocation Table
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Variants == There are several variants of the FAT file system (e.g. [[#FAT12|FAT12]], [[#FAT16|FAT16]] and [[#FAT32|FAT32]]). FAT16 refers to both the original group of FAT file systems with 16-bit wide cluster entries and also to later variants. "[[#VFAT|VFAT]]" is an optional extension for long file names, which can work on top of any FAT file system. Volumes using VFAT long-filenames can be read also by operating systems not supporting the VFAT extension. === <span id="FAT8"></span><span id="FAT10"></span>Original 8-bit FAT === <!-- NB. "FAT8" and "FAT10" are used as handy invisible anchors, but they never were the official names for these FAT variants, and therefore must not be used in the visible text. --> {{infobox file system | name = 8-bit FAT | full_name = 8-bit File Allocation Table | developer = [[Microsoft]], [[NCR Corporation|NCR]], [[Seattle Computer Products|SCP]] | variants = | introduction_date = {{ubli | 1977/1978: [[NCR Basic +6]] for NCR | 1978: [[Standalone Disk BASIC-80]] (16-byte directory entries)<ref name="Microsoft_1979_BASIC80-50" /><ref name="Microsoft_1979_BASIC80-51" /> | (1978: [[Standalone Disk BASIC-86]] internal only) | 1979-06-04: [[Standalone Disk BASIC-86]] for SCP (16-byte directory entries) | 1979: [[MIDAS (operating system)|MIDAS]] (32-byte directory entries) }} | partition_id = | directory_struct = | file_struct = | bad_blocks_struct = | max_volume_size = <!-- TBD --> | max_file_size = 8 MB | max_files_no = <!-- TBD --> | max_filename_size = [[6.3 filename]]<!-- displayed with decimal dot as "123456.789" --> (binary files), 9 characters<!-- displayed with space as "123456 789" --> (ASCII files)<ref name="Microsoft_1979_BASIC80-50" /><ref name="Microsoft_1979_BASIC80-51" /> | max_directory_depth = No sub-directories | dates_recorded = No | forks_streams = | attributes = Write protected, [[EBCDIC]] conversion, read after write, binary (random rather than sequential file)<ref name="Microsoft_1979_BASIC80-50" /><ref name="Microsoft_1979_BASIC80-51" /> | file_system_permissions = | compression = | encryption = | data_deduplication = | OS = | filename_character_set = [[ASCII]] (<code>0x00</code> and <code>0xFF</code> not allowed in first character)<ref name="Microsoft_1979_BASIC80-50" /><ref name="Microsoft_1979_BASIC80-51" /><!-- In reality, character set is most probably more limited due to BASIC language restrictions. --> | file_size_granularity = record-granularity (128 bytes<!-- 256 bytes for mini-disks? -->)<ref name="Microsoft_1979_BASIC80-50" /><ref name="Microsoft_1979_BASIC80-51" /> }} The original FAT file system (or ''FAT structure'', as it was called initially) was designed and implemented by [[Marc McDonald]],<ref name="Duncan_1988_MS-DOS_Encyclopedia" /> based on a series of discussions between McDonald and [[Bill Gates]].<ref name="Duncan_1988_MS-DOS_Encyclopedia" /> It was introduced with [[8-bit]] table elements<ref name="Microsoft_1979_BASIC80-50" /><ref name="Microsoft_1979_BASIC80-51" /><ref name="Duncan_1988_MS-DOS_Encyclopedia" /> (and valid data cluster numbers up to <code>0xBF</code><ref name="Microsoft_1979_BASIC80-50" /><ref name="Microsoft_1979_BASIC80-51" />) in a precursor to [[Microsoft]]'s ''[[Standalone Disk BASIC-80]]'' for an [[Intel 8080|8080]]-based successor<ref group="nb" name="NB_NCR_FAT" /> of the [[NCR 7200 model VI]]<!-- model I and IV did not came with BASIC, whereas the still cassette-based model VI did in Q1/1977 --> data-entry terminal, equipped with 8-inch (200 mm) floppy disks, in 1977<ref name="Manes_1993_Gates" /> or 1978.<ref group="nb" name="NB_NCR_FAT" /> In 1978, ''Standalone Disk BASIC-80'' was ported to the [[Intel 8086|8086]] using an emulator on a DEC [[PDP-10]],<ref name="Hunter_1983_Softalk" /> since no real 8086 systems were available at this time. The FAT file system was also used in Microsoft's [[MIDAS (operating system)|MDOS/MIDAS]],<ref name="Duncan_1988_MS-DOS_Encyclopedia" /> an [[operating system]] for 8080/Z80 platforms written by McDonald since 1979. The ''Standalone Disk BASIC'' version supported three FATs,<ref name="Microsoft_1979_BASIC80-50" /><ref name="Microsoft_1979_BASIC80-51" /><ref name="Schulman_1994_Undocumented-DOS" /> whereas this was a parameter for MIDAS. Reportedly, MIDAS was also prepared to support 10-bit, 12-bit and 16-bit FAT variants. While the size of directory entries was 16 bytes in ''Standalone Disk BASIC'',<ref name="Microsoft_1979_BASIC80-50" /><ref name="Microsoft_1979_BASIC80-51" /> MIDAS instead occupied 32 bytes per entry. [[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 [[Central processing unit|CPU]] board prototype during a guest week at Microsoft in May 1979.<ref name="Hunter_1983_Softalk" /> The final product was shown at [[Lifeboat Associates]]' booth stand at the [[National Computer Conference]] in New York<ref name="Hunter_1983_Softalk" /> on June 4β7, 1979, where Paterson learned about the more sophisticated FAT implementation in MDOS/MIDAS<ref name="Duncan_1988_MS-DOS_Encyclopedia" /> and McDonald talked to him about the design of the file system.<ref name="Manes_1993_Gates" /> === FAT12 === <!-- NB. The header "FAT12" is used in redirects to this page. --> {{infobox file system | name = FAT12 | developer = [[Seattle Computer Products|SCP]], [[Microsoft]], [[IBM]], [[Digital Research]], [[Novell]] | full_name = [[Design of the FAT file system#FAT12|12-bit File Allocation Table]] | introduction_date = {{ubli | 1980-07 ([[QDOS 0.10]], 16-byte directory entries) | 1981-02-25 ([[86-DOS 0.42]], 32-byte [[FAT directory entry|directory entries]], several reserved sectors) | c. 1981β08/10 ([[PC DOS 1.0]], 32-byte directory entries, 1 reserved sector) | 1982-03-03 ([[MS-DOS 1.25]], 32-byte directory entries, 1 reserved sector) }} | partition_id = [[Master Boot Record|MBR]]/[[Extended Boot Record|EBR]]:{{ubli | [[#FAT12|FAT12]]: <code>{{abbr|0x|Values in C-notation for hexadecimal numbers}}[[Partition type#PID 01h|01]]</code> e.a. | [[Basic data partition|BDP]]: <code>EBD0A0A2-B9E5-4433-87C0-68B6B72699C7</code> }} | max_volume_size = {{ubli | 16 MB (with 4 KB clusters) | 32 MB (with 8 KB clusters)<!-- larger volumes should use logical sectored FAT partition IDs or FAT16 partition IDs --> }} | max_file_size = Limited by volume size | file_size_granularity = 1 byte | max_files_no = 4,068 for 8 KB clusters<!-- 2^12 - 12 (reserved clusters) - 16 (number of 8 KB clusters for directory entries) --> | max_filename_size = [[8.3 filename]] with [[OEM character set|OEM]] characters, <br />255 [[UCS-2]] characters<ref group="nb" name="NB_LFN_UNI"/> when using [[Long filename|LFN]] | max_directory_depth = 32 levels or 66 characters (with [[Current Directory Structure|CDS]]), <br />60 levels or more (without CDS) | dates_recorded = {{ubli | Modified date (not with 86-DOS before 0.42), | modified time (not with PC DOS 1.0 and 86-DOS), creation date/time (DOS 7.0 and higher only), | access date (only available with [[ACCDATE (CONFIG.SYS directive)|ACCDATE]] enabled),<ref name="Microsoft_2006_ACCDATE" /> | deletion date/time (only with DELWATCH 2<!-- with Novell DOS 7, Caldera OpenDOS 7.01, DR-DOS 7.02 and higher -->) }} | date_range = [[Epoch of 1980-01-01|1980-01-01]] to [[Year 2100 problem|2099-12-31]] ([[Year 2108 problem|2107-12-31]]) | date_resolution = {{ubli | 2 seconds for last modified time, | 10 ms for creation time, | 1 day for access date, | 2 seconds for deletion time }} | attributes = [[FAT file attributes|Read-only]] (since DOS 2.0), [[FAT file attributes|hidden]], [[FAT file attributes|system]], [[FAT file attributes|volume]] (since [[MS-DOS 1.28]] and [[PC DOS 2.0]]), [[FAT file attributes|directory]] (since [[MS-DOS 1.40]] and PC DOS 2.0), [[FAT file attributes|archive]] (since DOS 2.0) | file_system_permissions = {{ubli | File, directory and volume access rights for [[FAT file access rights|read]], [[FAT file access rights|write]], [[FAT file access rights|execute]], [[FAT file access rights|delete]] only with [[DR-DOS]], [[PalmDOS]], [[Novell DOS]], [[OpenDOS]], [[FlexOS]], [[IBM 4680 OS|4680 OS]], [[IBM 4690 OS|4690 OS]], [[Concurrent DOS]], [[Multiuser DOS]], [[Datapac System Manager|System Manager]], [[REAL/32]]:{{ubli | execute right only with FlexOS, 4680 OS, 4690 OS; individual file / directory passwords not with FlexOS, 4680 OS, 4690 OS<!-- at least I could not find any user or programmer's documentation for it so far -->; | [[FAT file access rights|world]]/[[FAT file access rights|group]]/[[FAT file access rights|owner]] permission classes only with multiuser security loaded }} }} | compression = Per-volume, [[SuperStor]], [[Stacker (disk compression)|Stacker]], [[DoubleSpace]], [[DriveSpace]] | encryption = Per-volume only with [[DR-DOS]] }} Between April and August 1980, while borrowing the FAT concept for SCP's own 8086 operating system [[QDOS 0.10]],<ref name="Hunter_1983_Softalk" /> Tim Paterson extended the table elements to '''12 bits''',<ref name="Paterson_2007_Design-DOS" /> reduced the number of FATs to two, redefined the semantics of some of the reserved cluster values, and modified the disk layout, so that the root directory was now located between the FAT and the data area for his implementation of '''FAT12'''. Paterson also increased the nine-character (6.3) filename<ref name="Microsoft_1979_BASIC80-50" /><ref name="Microsoft_1979_BASIC80-51" /> length limit to eleven characters to support [[CP/M]]-style [[8.3 filename]]s and [[File Control Block]]s. The format used in Microsoft ''Standalone Disk BASIC's'' 8-bit file system precursor was not supported by QDOS. By August 1980, QDOS had been renamed to [[86-DOS]].<ref name="BYTE_1980_86-DOS" /> Starting with [[86-DOS 0.42]], the size and layout of directory entries was changed from 16 bytes to 32 bytes<ref name="SCP_1981_86-DOS_1.0_Addendum" /> in order to add a file date stamp<ref name="SCP_1981_86-DOS_1.0_Addendum" /> and increase the theoretical file size limit beyond the previous limit of 16 MB.<ref name="SCP_1981_86-DOS_1.0_Addendum" /> [[86-DOS 1.00]] became available in early 1981. Later in 1981, 86-DOS evolved into Microsoft's [[MS-DOS]] and [[IBM]] [[PC DOS]].<ref name="Duncan_1988_MS-DOS_Encyclopedia" /><ref name="Paterson_2007_Design-DOS" /><ref name="Wallace_1992_Harddrive" /> The capability to read previously formatted volumes with 16-byte directory entries<ref name="SCP_1981_86-DOS_1.0_Addendum" /> was dropped with [[MS-DOS 1.20]]. FAT12 used 12-bit entries for the cluster addresses; some values were reserved to mark the end of a chain of clusters, to mark unusable areas of the disk, or for other purposes, so the maximum number of clusters was limited to 4078.<ref name="Norton2" /><ref name="Jenkinson_2000_Forensic" /> To conserve disk space, two 12-bit FAT entries used three consecutive 8-bit bytes on disk, requiring manipulation to unpack the 12-bit values. This was sufficient for the original floppy disk drives, and small hard disks up to 32 megabytes. The [[#FAT16B|FAT16B]] version available with DOS 3.31 supported [[32-bit]] sector numbers, and so increased the volume size limit. All the control structures fit inside the first track, to avoid head movement during read and write operations. Any bad sector in the control structures area would make the disk unusable. The DOS formatting tool rejected such disks completely. Bad sectors were allowed only in the file data area. Clusters containing bad sectors were marked unusable with the reserved value <code>0xFF7</code> in the FAT. While 86-DOS supported three disk formats (250.25 KB, 616 KB and 1232 KB, with [[FAT ID]]s <code>0xFF</code> and <code>0xFE</code>) on 8-inch (200 mm) floppy drives, IBM [[PC DOS 1.0]], released with the original [[IBM Personal Computer]] in 1981, supported only an 8-sector floppy format with a formatted capacity of 160 KB (FAT ID <code>0xFE</code>) for single-sided 5.25-inch floppy drives, and [[PC DOS 1.1]] added support for a [[double-sided disk|double-sided]] format with 320 KB (FAT ID <code>0xFF</code>). [[PC DOS 2.0]] introduced support for 9-sector floppy formats with 180 KB (FAT ID <code>0xFC</code>) and 360 KB (FAT ID <code>0xFD</code>). 86-DOS 1.00 and PC DOS 1.0 directory entries included only one date, the last modified date. PC DOS 1.1 added the last modified time. PC DOS 1.x [[file attribute]]s included a hidden bit and system bit, with the remaining six bits undefined. At this time, DOS did not support sub-directories, but typically there were only a few dozen files on a [[floppy disk|diskette]]. The [[PC XT]] was the first PC with an IBM-supplied hard drive, and PC DOS 2.0 supported that hard drive with FAT12 ([[FAT ID]] <code>0xF8</code>). The fixed assumption of 8 sectors per clusters on hard disks practically limited the maximum partition size to 16 MB for 512 byte sectors and 4 KB clusters. The ''[[BIOS Parameter Block]]'' (''BPB'') was introduced with PC DOS 2.0 as well, and this version also added read-only, [[archive bit|archive]], [[volume (computing)|volume label]], and [[Directory (file systems)|directory]] attribute bits for hierarchical sub-directories.<ref name="two" /> [[MS-DOS 3.0]] introduced support for high-density 1.2 MB 5.25-inch diskettes (media descriptor <code>0xF9</code>), which notably had 15 sectors per track, hence more space for the FATs. FAT12 remains in use on all common [[floppy disks]], including 1.44 MB and later 2.88 MB disks (media descriptor byte <code>0xF0</code>). === <span id="FAT16"></span>Initial FAT16 === {{infobox file system | name = FAT16 | developer = [[Microsoft]], [[IBM]], [[Digital Research]], [[Novell]] | full_name = [[Design of the FAT file system#FAT16|16-bit File Allocation Table]]<br />(with 16-bit sector entries) | introduction_date = 1984-08-14 (PC DOS 3.0)<br />1984-08 (MS-DOS 3.0) | partition_id = [[Master Boot Record|MBR]]/[[Extended Boot Record|EBR]]:{{ubli | [[#FAT16|FAT16]]: <code>{{abbr|0x|Values in C-notation for hexadecimal numbers}}[[Partition type#PID_04h|04]]</code> e.a. | [[Basic data partition|BDP]]: <code>EBD0A0A2-B9E5-4433-87C0-68B6B72699C7</code> }} <!-- needs more refinement as this is version dependent: | max_volume_size = 16 [[megabyte|MB]] (with 2 KB clusters) --><!-- larger volumes should use logical sectored FAT partition IDs or FAT16B partition ID --> | max_file_size = 4,294,967,295 bytes (4 GB β 1)<!-- Not "limited by volume size" if volumes larger than 4 GB are possible. --> | file_size_granularity = 1 byte | max_files_no = 65,536 for 32 KB clusters<!-- 2^16 β 12 (reserved clusters) β 64 (number of 32 KB clusters for directory entries) --> | max_filename_size = [[8.3 filename]] with [[OEM character set|OEM]] characters, 255 [[UCS-2]] characters<ref group="nb" name="NB_LFN_UNI"/> when using [[Long filename|LFN]] | max_directory_depth = 32 levels or 66 characters (with [[Current Directory Structure|CDS]]), <br />60 levels or more (without CDS) | dates_recorded = {{ubli | Modified date/time, creation date/time (DOS 7.0 and higher only), | access date (only available with [[ACCDATE (CONFIG.SYS directive)|ACCDATE]] enabled),<ref name="Microsoft_2006_ACCDATE" /> | deletion date/time (only with DELWATCH 2<!-- with Novell DOS 7, Caldera OpenDOS 7.01, DR-DOS 7.02 and higher -->) }} | date_range = [[Epoch of 1980-01-01|1980-01-01]] to [[Year 2100 problem|2099-12-31]] ([[Year 2108 problem|2107-12-31]]) | date_resolution = {{ubli | 2 seconds for last modified time, | 10 ms for creation time, | 1 day for access date, | 2 seconds for deletion time }} | attributes = [[FAT file attributes|Read-only]], [[FAT file attributes|hidden]], [[FAT file attributes|system]], [[FAT file attributes|volume]], [[FAT file attributes|directory]], [[FAT file attributes|archive]] | file_system_permissions = {{ubli | File, directory and volume access rights for [[FAT file access rights|read]], [[FAT file access rights|write]], [[FAT file access rights|execute]], [[FAT file access rights|delete]] only with [[DR-DOS]], [[PalmDOS]], [[Novell DOS]], [[OpenDOS]], [[FlexOS]], [[IBM 4680 OS|4680 OS]], [[IBM 4690 OS|4690 OS]], [[Concurrent DOS]], [[Multiuser DOS]], [[Datapac System Manager|System Manager]], [[REAL/32]]:{{ubli | execute right only with FlexOS, 4680 OS, 4690 OS; | individual file / directory passwords not with FlexOS, 4680 OS, 4690 OS<!-- at least I could not find any user or programmer's documentation for it so far -->; | [[FAT file access rights|world]]/[[FAT file access rights|group]]/[[FAT file access rights|owner]] permission classes only with multiuser security loaded }} }} | compression = Per-volume, [[SuperStor]], [[Stacker (disk compression)|Stacker]], [[DoubleSpace]], [[DriveSpace]] | encryption = Per-volume only with [[DR-DOS]] }} In 1984, IBM released the [[PC AT]], which required PC DOS 3.0 to access its 20 MB hard disk.<ref name="IBM_1984_PCDOS30" /><ref name="IBM_1985_Reference" /> Microsoft introduced MS-DOS 3.0 in parallel. Cluster addresses were increased to 16-bit, allowing for up to 65,526 clusters per volume. However, the maximum possible number of sectors and the maximum [[Disk partitioning|partition]] size of 32 MB did not change. Although cluster addresses were 16 bits, this format was not what today is commonly understood as '''FAT16'''. A [[partition type]] <code>[[Partition type#PID_04h|0x04]]</code> indicates this form of FAT16 with less than 65,536 sectors (less than 32 MB for sector size 512). 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. 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.<ref name="Microsoft_69912">{{Cite web |url=http://c-bit.org/kb/69912/EN-US/ |title=Microsoft Knowledge Base article: "MS-DOS Partitioning Summary" |access-date=2018-06-02 |archive-date=2018-06-12 |archive-url=https://web.archive.org/web/20180612143554/http://c-bit.org/kb/69912/EN-US/ |url-status=live }}</ref> 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. MS-DOS 3.31 and higher could access 16 MB-32 MB FAT12 partitions again. === Logical sectored FAT === {{See also|Extended boot record}} <!-- NB. The header "Logical sectored FAT" is used in redirects to this page. --> MS-DOS and PC DOS implementations of FAT12 and FAT16 could not access disk partitions larger than 32 megabytes. Several manufacturers developed their own FAT variants within their OEM versions of MS-DOS.<ref name="Novell_1993_FYI.M.1101"/> Some vendors ([[AST Research|AST]] and [[NEC]]<ref name="Novell_1993_FYI.M.1101"/>) supported [[AST MBR<!-- NEC MBR -->|eight]], instead of the standard [[Partition table (master boot record)|four]], primary partition entries in their custom extended ''[[Master Boot Record]]'' (''MBR''), and they adapted MS-DOS to use more than a single primary partition. Other vendors worked around the volume size limits imposed by the 16-bit sector entries by increasing the apparent ''size'' of the sectors the file system operated on. These ''logical sectors'' were larger (up to 8192 bytes) than the ''physical sector'' size (still 512 bytes) on the disk. The DOS-BIOS or System BIOS would then combine multiple physical sectors into logical sectors for the file system to work with. These changes were transparent to the file system implementation in the DOS kernel. The underlying DOS-BIOS translated these logical sectors into physical sectors according to partitioning information and the drive's physical geometry. The drawback of this approach was increased memory used for sector buffering and deblocking. Since older DOS versions could not use large logical sectors, the OEMs introduced new partition IDs for their FAT variants in order to hide them from off-the-shelf issues of MS-DOS and PC DOS. Known partition IDs for logical sectored FATs include: <code>[[Partition type#PID_08h|0x08]]</code> ([[Commodore International|Commodore]] MS-DOS 3.x), <code>[[Partition type#PID_11h|0x11]]</code> ([[Leading Edge Hardware Products|Leading Edge]] MS-DOS 3.x), <code>[[Partition type#PID_14h|0x14]]</code> (AST MS-DOS 3.x), <code>[[Partition type#PID_24h|0x24]]</code> (NEC MS-DOS 3.30<ref name="Novell_1993_FYI.M.1101"/>), <code>[[Partition type#PID_56h|0x56]]</code> ([[AT&T Corporation|AT&T]] MS-DOS 3.x), <code>[[Partition type#PID_E5h|0xE5]]</code> ([[Tandy Computers|Tandy]] MS-DOS), <code>[[Partition type#PID_F2h|0xF2]]</code> ([[Sperry Corporation|Sperry IT]] MS-DOS 3.x, [[Unisys]] MS-DOS 3.3 β also used by [[Digital Research]] [[DOS Plus]] 2.1).<ref name="Brouwer_2002_Partition-IDs" /> OEM versions like Toshiba MS-DOS, Wyse MS-DOS 3.2<!-- with 1024 bytes/sector --> and 3.3,<ref name="Microsoft_2000_Wyse-DOS" /> as well as Zenith MS-DOS are also known to have utilized logical sectoring.<ref name="Microsoft_2000_Logical-sectoring" /><!-- but partition IDs and other specifics of these formats are not known --> While non-standard and sub-optimal, these FAT variants are perfectly valid according to the specifications of the file system itself.{{citation needed|date=June 2022}} Therefore, even if default issues of MS-DOS and PC DOS were not able to cope with them, most of these vendor-specific FAT12 and FAT16 variants can be mounted by more flexible file system implementations in operating systems such as DR-DOS, simply by changing the partition ID to one of the recognized types.<ref group="nb" name="NB_DRDOS_Logical-Sectoring">DR-DOS is able to boot off FAT12/FAT16 logical sectored media with [[BPB logical sector size|logical sector size]]s up to 1024 bytes.</ref> Also, if they no longer need to be recognized by their original operating systems, existing partitions can be "converted" into FAT12 and FAT16 volumes more compliant with versions of MS-DOS/PC DOS 4.0β6.3, which do not support sector sizes different from 512 bytes,<ref name="Brouwer_2002_Logical_FAT" /> by switching to a [[DOS 3.31 BPB|BPB with 32-bit entry]] for the number of sectors, as introduced since DOS 3.31 (see [[#FAT16B|FAT16B]] below), keeping the cluster size and reducing the [[BPB logical sector size|logical sector size in the BPB]] down to 512 bytes, while at the same time increasing the counts of logical sectors per cluster, reserved logical sectors, total logical sectors, and logical sectors per FAT by the same factor. A parallel development in MS-DOS / PC DOS which allowed an increase in the maximum possible FAT size was the introduction of multiple FAT partitions on a hard disk. To allow the use of more FAT partitions in a compatible way, a new partition type was introduced in PC DOS 3.2 (1986), the ''[[Extended boot record|extended partition]]'' (EBR),<ref name="Duncan_1988_MS-DOS_Encyclopedia" /> which is a container for an additional partition called ''logical drive''. Since PC DOS 3.3 (April 1987), there is another, optional extended partition containing the next ''logical drive'', and so on. The [[Master Boot Record|MBR]] of a hard disk can either define up to four primary partitions, or an extended partition in addition to up to three primary partitions. === <span id="FAT16B"></span><span id="FAT16X"></span>Final FAT16 === {{infobox file system | name = FAT16B | developer = [[Compaq]], [[Digital Research]], [[IBM]], [[Microsoft]], [[Novell]] | full_name = [[Design of the FAT file system#FAT16|16-bit File Allocation Table]]<br />(with 32-bit sector entries) | introduction_date = {{ubli | 1987-11 ([[Compaq MS-DOS 3.31]]) | 1988-06-28 ([[DR DOS 3.31]]) | 1988 ([[IBM DOS 4.0]]) | 1988 ([[OS/2 1.1]]) | 1988 ([[MS-DOS 4.0 (IBM-developed)|MS-DOS 4.0]]) }} | partition_id = [[Master Boot Record|MBR]]/[[Extended Boot Record|EBR]]:{{ubli | [[#FAT16B|FAT16B]]: <code>{{abbr|0x|Values in C-notation for hexadecimal numbers}}[[Partition type#PID_06h|06]]</code><code>[[Partition type#PID_0Eh|0x0E]]</code> ([[Logical block addressing|LBA]]), e.a. | [[Basic data partition|BDP]]: <code>EBD0A0A2-B9E5-4433-87C0-68B6B72699C7</code> }} | min_volume_size = {{ubli | 8 [[megabyte|MB]] (with 128 byte sectors) | 32 MB (with [[512e|512]] byte sectors) | 256 MB (with [[4Kn|4 KB]] sectors) }} | max_volume_size = {{ubli | 2 [[gigabyte|GB]] (with 32 [[kilobyte|KB]] clusters) | 4 GB (with 64 KB clusters) (NT 4, PTS-DOS, EDR-DOS) | 8 GB (with 128 KB clusters and <!-- 128 s/c -->1 or <!-- 64 s/c -->2 KB sectors) (NT 4 and EDR-DOS only) | 8 GB (with 128 KB clusters and <!-- 256 s/c -->512 byte sectors) (EDR-DOS only) | 16 GB (with 256 KB clusters and <!-- 128 s/c -->2 or <!-- 64 s/c -->4 KB sectors) (NT 4 only) }} | max_file_size = {{ubli | 2,147,483,647 bytes (2 GB β 1)<!-- 2^31 β 1 --> (without [[large file support|LFS]]) | 4,294,967,295 bytes (4 GB β 1)<!-- 2^32 β 1 --> (with [[large file support|LFS]]) | limited by volume size only (with FAT16+<ref name="DRDOS_FAT+_R2" />) }} | file_size_granularity = 1 byte | max_files_no = 65,460 for 32 KB clusters<!-- 2^16 β 12 (reserved clusters) β 64 (number of 32 KB clusters for directory entries) --> | max_filename_size = [[8.3 filename]] with [[OEM character set|OEM]] characters, <br />255 [[UCS-2]] characters<ref group="nb" name="NB_LFN_UNI"/> when using [[Long filename|LFN]] | max_directory_depth = 32 levels or 66 characters (with [[Current Directory Structure|CDS]]), <br />60 levels or more (without CDS) | dates_recorded = {{ubli | Modified date/time, creation date/time (DOS 7.0 and higher only), | access date (only available with [[ACCDATE (CONFIG.SYS directive)|ACCDATE]] enabled),<ref name="Microsoft_2006_ACCDATE" /> | deletion date/time (only with DELWATCH 2<!-- with Novell DOS 7, Caldera OpenDOS 7.01, DR-DOS 7.02 and higher -->) }} | date_range = [[Epoch of 1980-01-01|1980-01-01]] to [[Year 2100 problem|2099-12-31]] ([[Year 2108 problem|2107-12-31]]) | date_resolution = {{ubli | 2 seconds for last modified time, | 10 ms for creation time, | 1 day for access date, | 2 seconds for deletion time }} | attributes = [[FAT file attributes|Read-only]], [[FAT file attributes|hidden]], [[FAT file attributes|system]], [[FAT file attributes|volume]], [[FAT file attributes|directory]], [[FAT file attributes|archive]] | file_system_permissions = {{ubli | File, directory and volume access rights for [[FAT file access rights|read]], [[FAT file access rights|write]], [[FAT file access rights|execute]], [[FAT file access rights|delete]] only with [[DR-DOS]], [[PalmDOS]], [[Novell DOS]], [[OpenDOS]], [[FlexOS]], [[IBM 4680 OS|4680 OS]], [[IBM 4690 OS|4690 OS]], [[Concurrent DOS]], [[Multiuser DOS]], [[Datapac System Manager|System Manager]], [[REAL/32]]:{{ubli | execute right only with FlexOS, 4680 OS, 4690 OS; | individual file / directory passwords not with FlexOS, 4680 OS, 4690 OS<!-- at least I could not find any user or programmer's documentation for it so far -->; | [[FAT file access rights|world]]/[[FAT file access rights|group]]/[[FAT file access rights|owner]] permission classes only with multiuser security loaded }} }} | compression = Per-volume, [[SuperStor]], [[Stacker (disk compression)|Stacker]], [[DoubleSpace]], [[DriveSpace]] | encryption = Per-volume only with [[DR-DOS]] }} In November 1987, [[Compaq MS-DOS 3.31|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. 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 [[x86 assembly language|assembly language]]. The result was initially called the ''DOS 3.31 Large File System''. [[Microsoft]]'s <code>[[DSKPROBE]]</code> tool refers to type <code>[[Partition type#PID_06h|0x06]]</code> as ''BigFAT'',<ref name="Microsoft_2003_CC736327" /> whereas some older versions of <code>[[FDISK]]</code> described it as ''BIGDOS''. Technically, it is known as '''FAT16B'''. 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. The original form of FAT16 (with less than 65,536 sectors) had a [[partition type]] <code>[[Partition type#PID_04h|0x04]]</code>. To deal with disks larger than this, type <code>[[Partition type#PID_06h|0x06]]</code> was introduced to indicate 65,536 or more sectors. In addition to this, the disk driver was expanded to cope with more than 65,535 sectors as well. The only other difference between the original FAT16 and the newer FAT16B format is the usage of a [[DOS 3.31 BPB|newer BPB]] format with 32-bit sector entry. Therefore, newer operating systems supporting the FAT16B format can cope also with the original FAT16 format without any necessary changes. 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 (<code>[[Partition type#PID_04h|0x04]]</code>). In practice however, type <code>[[Partition type#PID_01h|0x01]]</code> and <code>[[Partition type#PID_04h|0x04]]</code> 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. 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. The limit on partition size was dictated by the 8-bit [[Signedness|signed]] count of sectors per cluster, which originally had a maximum power-of-two value of 64. 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. On [[magneto-optical]] media, which can have 1 or 2 KB sectors instead of 0.5 KB, this size limit is proportionally larger. Much later, [[Windows NT]] increased the maximum cluster size to 64 KB, by considering the sectors-per-cluster count as unsigned. However, the resulting format was not compatible with any other FAT implementation of the time, and it generated greater [[internal fragmentation]]. [[Windows 98]], SE and ME also supported reading and writing this variant, but its disk utilities did not work with it and some [[File control block|FCB]] services are not available for such volumes. This contributes to a confusing compatibility situation. Prior to 1995, versions of DOS accessed the disk via [[Cylinder-head-sector|CHS]] addressing only. When [[Windows 95]](MS-DOS 7.0) introduced [[Logical block addressing|LBA]] disk access, partitions could start being physically located outside the first c. 8 GB<!-- exact value is somewhat smaller --> of this disk and thereby out of the reach of the traditional CHS addressing scheme. 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 <code>[[Partition type#PID_0Eh|0x0E]]</code> in the partition table instead. FAT16 partitions using this partition type are also named '''FAT16X'''.<ref name="Microsoft_2004_KB120138" /> 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. 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. For a given number <code>RDE</code> and sector size <code>SS</code>, the number <code>RDS</code> of root directory sectors is <code>RDS = ceil((RDE Γ 32) / SS)</code>, and <code>RDE</code> is normally chosen to fill these sectors, i.e., <code>RDE Γ 32 = RDS Γ SS</code>. FAT12 and FAT16 media typically use 512 root directory entries on non-floppy media. Some third-party tools, like mkdosfs, allow the user to set this parameter.<ref name="MKDOSFS" /> ===FAT32=== {{Infobox file system | name = FAT32 | full_name DEVICE1 [[Design of the FAT file system#FAT32|32-bit File Allocation Table]]<br />(with 28-bit cluster entries) | developer = [[Microsoft]], [[Caldera UK|Caldera]] | variants = | introduction_date = August 1996 ([[Windows 95 OSR2]]) | partition_id = [[Master Boot Record|MBR]]/[[Extended Boot Record|EBR]]: {{ubli | [[#FAT32|FAT32]]: <code>{{abbr|0x|Values in C-notation for hexadecimal numbers}}[[Partition type#PID_0Bh|0B]]</code><code>[[Partition type#PID_0Ch|0x0C]]</code> ([[Logical block addressing|LBA]]), e.a. | [[Basic data partition|BDP]]: <code>EBD0A0A2-B9E5-4433-87C0-68B6B72699C7</code> }} | directory_struct = | file_struct = | bad_blocks_struct = | min_volume_size = {{ubli | 32 [[megabyte|MB]] β 4.5 [[kilobyte|KB]] (with 65525 clusters and 512 byte sectors) | 256 MB β 36 KB (with 65525 clusters and 4 [[kilobyte|KB]] sectors) }} | max_volume_size = {{ubli | 2 [[terabyte|TB]] (with 512 byte sectors) | 8 TB (with 2 KB sectors and 32 KB clusters) | 16 TB (with 4 KB sectors and 64 KB clusters) }} | max_file_size = {{ubli | 2,147,483,647 bytes (2 GiB β 1 byte)<!-- 2^31 - 1 --> (without [[large file support|LFS]]) | 4,294,967,295 bytes (4 GiB β 1 byte)<!-- 2^32 - 1 --><ref name="GB4" /> (with [[large file support|LFS]]) | 274,877,906,943 bytes (256 GiB β 1 byte)<!-- 2^38 - 1 --> (only with FAT32+<ref name="DRDOS_FAT+_R2" />) }} | max_files_no = 268,173,300 for 32 KB clusters<!-- 2^28 β 12 (reserved clusters) β 262144 (number of 32 KB clusters for directory entries) --> | max_filename_size = [[8.3 filename]] with [[OEM character set|OEM]] characters, <br />255 [[UCS-2]] characters<ref group="nb" name="NB_LFN_UNI"/> when using [[Long filename|LFN]] | max_directory_depth = 32 levels or 66 characters (with [[Current Directory Structure|CDS]]), <br />60 levels or more (without CDS) | dates_recorded = {{ubli | Modified date/time, creation date/time (DOS 7.0 and higher only), | access date (only available with [[ACCDATE (CONFIG.SYS directive)|ACCDATE]] enabled),<ref name="Microsoft_2006_ACCDATE" /> | deletion date/time (only with DELWATCH 2<!-- with Novell DOS 7, Caldera OpenDOS 7.01, DR-DOS 7.02 and higher -->) }} | date_range = [[Epoch of 1980-01-01|1980-01-01]] to [[Year 2100 problem|2099-12-31]] ([[Year 2108 problem|2107-12-31]]) | date_resolution = {{ubli | 2 seconds for last modified time, | 10 ms for creation time, | 1 day for access date, | 2 seconds for deletion time }} | forks_streams = | attributes = [[FAT file attributes|Read-only]], [[FAT file attributes|hidden]], [[FAT file attributes|system]], [[FAT file attributes|volume]], [[FAT file attributes|directory]], [[FAT file attributes|archive]] | file_system_permissions = Partial, only with [[DR-DOS]], [[REAL/32]] and [[4690 OS]] | compression = Yes | encryption = | data_deduplication = | OS = | file_size_granularity = 1 byte }} In order to overcome the volume size limit of FAT16, while at the same time allowing DOS [[Real mode|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.<ref name="Microsoft_1998_CC768180" /> Cluster values are represented by [[32-bit]] numbers, of which 28 bits are used to hold the cluster number. ==== Maximal sizes ==== The FAT32 boot sector uses a 32-bit field for the sector count, limiting the maximal FAT32 volume size to 2 [[terabyte]]s with a sector size of 512 [[byte]]s. The maximum FAT32 volume size is 16 TB with a sector size of 4,096 bytes.<ref name="Microsoft_2007_KB184006" /><ref name="Microsoft_2007_KB314463" /> The built-in [[Windows shell]] disk format tool on Windows NT arbitrarily only supports volume sizes up to 32 GB,{{refn|group="nb"|This was a decision taken by the developer in question, who assumed his decision would be revised later, something that never happened.<ref>{{cite web | url=https://www.theregister.com/2021/01/04/windows_format_fat32/ | title=Explained: The thinking behind the 32GB Windows Format limit on FAT32 }}</ref>}} but Windows supports reading and writing to preexisting larger FAT32 volumes, and these can be created with the [[command prompt]], [[PowerShell]] or third-party tools,<ref>{{Cite web |last=Glenn |first=Walter |title=How to Format USB Drives Larger Than 32GB With FAT32 on Windows |url=https://www.howtogeek.com/316977/how-to-format-usb-drives-larger-than-32gb-with-fat32-on-windows/ |access-date=2021-01-26 |website=How-To Geek |date=July 20, 2017 |language=en-US |archive-date=2021-01-26 |archive-url=https://web.archive.org/web/20210126003213/https://www.howtogeek.com/316977/how-to-format-usb-drives-larger-than-32gb-with-fat32-on-windows/ |url-status=live }}</ref> or by formatting the volume on a non-Windows system or on a Windows 9x system with FAT32 support and then transferring it to the Windows NT system. In August 2024, Microsoft released an update to Windows 11 preview builds that allows for the creation of FAT32 partitions up to 2TB in size.<ref>{{Cite web |author1=Roshan Ashraf Shaikh |date=2024-08-16 |title=Windows 11 preview build sees FAT32 partition size increased to 2TB after 30 years |url=https://www.tomshardware.com/software/operating-systems/windows-11-preview-build-sees-fat32-partition-size-increased-to-2tb-after-30-years |access-date=2024-08-23 |website=Tom's Hardware |language=en}}</ref> The maximal possible size for a file on a FAT32 volume is 4 [[gigabyte|GB]] minus 1 byte, or 4,294,967,295 (2<sup>32</sup> β 1) bytes. This limit is a consequence of the 4-byte file length entry in the directory table and would also affect relatively huge FAT16 partitions enabled by a sufficient sector size. Like FAT12 and FAT16, FAT32 does not include direct built-in support for long filenames, but FAT32 volumes can optionally hold [[#VFAT|VFAT]] long filenames in addition to short filenames in exactly the same way as VFAT long filenames have been optionally implemented for FAT12 and FAT16 volumes. ==== Development ==== FAT32 was introduced with [[Windows 95]] OSR2(MS-DOS 7.1) in 1996, although reformatting was needed to use it, and [[DriveSpace 3]] (the version that came with Windows 95 OSR2 and Windows 98<!-- what about ME? -->) never supported it. [[Windows 98]] introduced a utility to convert existing hard disks from FAT16 to FAT32 without loss of data. In the Windows NT line, native support for FAT32 arrived in [[Windows 2000]]. A free FAT32 driver for [[Windows NT 4.0]] was available from [[Winternals]], a company later acquired by Microsoft. The acquisition of the driver from official sources is no longer possible. Since 1998, Caldera's dynamically loadable [[DRFAT32]] driver could be used to enable FAT32 support in DR-DOS.<ref name="Caldera_1998_DRFAT32-RM"/><ref name="Caldera_1998_DRFAT32"/> The first version of DR-DOS to natively support FAT32 and LBA access was OEM DR-DOS 7.04 in 1999. That same year [[Intelligent Micro Software|IMS]] introduced native FAT32 support with [[REAL/32]] 7.90, and [[IBM 4690 OS]] added FAT32 support with version 2.<ref name="IBM_4690_User_Guide" /> [[Ahead Software]] provided another dynamically loadable FAT32.EXE driver for DR-DOS 7.03 with [[Nero Burning ROM]] in 2004.<!-- with copyrights 2002-2004 --> IBM introduced native FAT32 support with OEM PC DOS 7.1 in 1999. Two partition types have been reserved for FAT32 partitions, <code>[[Partition type#PID 0Bh|0x0B]]</code> and <code>[[Partition type#PID 0Ch|0x0C]]</code>. The latter type is also named '''FAT32X''' in order to indicate usage of LBA disk access instead of CHS.<ref name="Caldera_1998_DRFAT32-RM"/><ref name="PowerQuest_1998_PQ4" /><ref name="Livingstone_1998_FAT32X" /><ref name="Duitz_2001_FAQ" /><ref name="Costanzo_1998_FAT32X" /> On such partitions, CHS-related geometry entries, namely the [[MBR partition entry|CHS sector address]]es in the MBR as well as the number of [[BPB sectors per track|sectors per track]] and the [[BPB number of heads|number of heads]] in the EBPB record, may contain no or misleading values and should not be used.<ref name="PowerQuest_1998_FAT32X" /><ref name="Duitz_2001_FAQ" /><ref name="Costanzo_1998_FAT32X" />
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)