File Allocation Table: Difference between revisions

Content deleted Content added
Emunah00 (talk | contribs)
Fixed units that should use binary prefixes that were inaccurately using decimal prefixes
Tags: Reverted Visual edit
bibibibibibi ; see Unusual units of measure Undid revision 1225206996 by Emunah00 (talk)
Line 288:
 
{{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]])
Line 298:
| 1988 ([[MS-DOS 4.0 (IBM-developed)|MS-DOS 4.0]])
}}
| partition_id = [[Master Boot Record|MBR]]/[[Extended Boot Record|EBR]]:{{ubli
| [[#FAT16B|FAT16B]]:&nbsp;<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&nbsp;[[megabyte|MB]] (with 128&nbsp;byte sectors)
| 32&nbsp;MB (with [[512e|512]]&nbsp;byte sectors)
| 256&nbsp;MB (with [[4Kn|4&nbsp;KB]] sectors)
}}
| max_volume_size = {{ubli
| 2&nbsp;[[gigabyte|GB]] (with 32&nbsp;[[kilobyte|KB]] clusters)
| 4&nbsp;GB (with 64&nbsp;KB clusters) (NT&nbsp;4, PTS-DOS, EDR-DOS)
Line 314:
| 16&nbsp;GB (with 256&nbsp;KB clusters and <!-- 128 s/c -->2 or <!-- 64 s/c -->4&nbsp;KB sectors) (NT&nbsp;4 only)
}}
| max_file_size = {{ubli
| 2,147,483,647 bytes (2&nbsp;GiBGB − 1)<!-- 2^31 − 1 --> (without [[large file support|LFS]])
| 4,294,967,295 bytes (4&nbsp;GiBGB − 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&nbsp;byte
| max_files_no = 65,460 for 32&nbsp;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&nbsp;levels or 66&nbsp;characters (with [[Current Directory Structure|CDS]]), <br />60&nbsp;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&nbsp;seconds for last modified time,
| 10&nbsp;ms for creation time,
Line 335:
| 2&nbsp;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&nbsp;OS]], [[IBM 4690 OS|4690&nbsp;OS]], [[Concurrent DOS]], [[Multiuser DOS]], [[Datapac System Manager|System Manager]], [[REAL/32]]:{{ubli
Line 343:
}}
}}
| 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&nbsp;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&nbsp;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]].
Line 423 ⟶ 422:
The FAT32 boot sector uses a 32-bit field for the sector count, limiting the maximal FAT32 volume size to 2&nbsp;[[terabyte]]s with a sector size of 512&nbsp;[[byte]]s. The maximum FAT32 volume size is 16&nbsp;TB with a sector size of 4,096&nbsp;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&nbsp;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.
 
The maximal possible size for a file on a FAT32 volume is 4&nbsp;[[Gibibytegigabyte|GiBGB]] minus 1 byte, or 4,294,967,295 (2<sup>32</sup>&nbsp;−&nbsp;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.
Line 446 ⟶ 445:
[[OS/2]] heavily depends on [[extended attribute]]s (EAs) and stores them in a hidden file called "<code>EA&#x2420;DATA.&#x2420;SF</code>"<!-- Since the exact spelling is important and most sources list only 10 of the 8+3 available characters in directory entries, recheck the exact 8+3 byte spelling of this filename --> in the [[root directory]] of the [[#FAT12|FAT12]] or [[#FAT16|FAT16]] volume. This file is indexed by two previously reserved bytes in the file's (or directory's) [[FAT directory entry|directory entry]] at offset [[Design of the FAT file system#DIR OFS 14h|<code>0x14</code>]].<ref name="Eager_2000_EA" /> In the [[#FAT32|FAT32]] format, these bytes hold the upper 16&nbsp;bits of the starting cluster number of the file or directory, hence making it impossible to store [[OS/2 EA]]s on FAT32 using this method.
 
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 "<code>&#x2420;EA.&#x2420;SF</code>" appended to the regular filename of the file to which they belong. The driver also utilizes the byte at offset [[Design of the FAT file system#DIR OFS 0Ch|<code>0x0C</code>]] in directory entries to store a special mark byte indicating the presence of extended attributes to help speed up things.<ref name="Kelder_2003_FAT32IFS0913" /><ref name="Kelder_FAT32IFS074" /> (This extension is critically incompatible with the FAT32+ method to store files larger than 4&nbsp;GiBGB minus 1 on FAT32 volumes.)<ref name="DRDOS_FAT+_R2" />
 
Extended attributes are accessible via the [[Workplace Shell]] desktop, through [[REXX]] scripts, and many system [[graphical user interface|GUI]] and [[command line interface|command-line]] utilities (such as [[4OS2]]).<ref name="Eager_2000_Tavi" />
Line 489 ⟶ 488:
 
=== <span id="FAT16+"></span><span id="FAT32+"></span><span id="FAT32B"></span>FAT+ ===
In 2007 the open '''FAT+''' draft proposed how to store [[Large file support|larger files]] up to 256&nbsp;GiBGB minus 1&nbsp;byte, or 274,877,906,943 (2<sup>38</sup>&nbsp;−&nbsp;1) bytes, on slightly modified and otherwise backward-compatible FAT32 volumes,<ref name="DRDOS_FAT+_R2" /> 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. Support for '''FAT32+''' and '''FAT16+''' is limited to some versions of [[DR-DOS]] and not available in mainstream operating systems.<ref>{{cite web |url=http://www.drdosprojects.de/ |title=DR-DOS/OpenDOS Enhancement Project |first=Udo |last=Kuhnt |date=July 21, 2011 |access-date=2015-04-20 |archive-date=2016-07-06 |archive-url=https://web.archive.org/web/20160706205139/http://www.drdosprojects.de/ |url-status=live }}</ref> (This extension is critically incompatible with the <code>/EAS</code> option of the FAT32.IFS method to store [[FAT extended file attributes|OS/2 extended attributes]] on FAT32 volumes.)
 
== Derivatives ==
Line 506 ⟶ 505:
While resembling the same basic design ideas as [[#FAT16|FAT16]] and [[#FAT32|FAT32]], the '''FATX16''' and '''FATX32''' on-disk structures are simplified, but fundamentally incompatible with normal FAT16 and FAT32 file systems, making it impossible for normal FAT file system drivers to mount such volumes.
 
The non-bootable [[superblock (file systems)|superblock]] sector is 4&nbsp;KB in size and holds an 18&nbsp;byte large BPB-like structure completely different from normal [[FAT BPB|BPB]]s. Clusters are typically 16&nbsp;KB in size and there is only one copy of the FAT on the Xbox. Directory entries are 64&nbsp;bytes in size instead of the normal [[FAT directory entry|32&nbsp;bytes]]. Files can have filenames up to 42 characters long using the [[OEM character set]]<!-- not Unicode --> and be up to 4&nbsp;GiBGB minus 1&nbsp;byte in size. The on-disk timestamps hold creation, modification and access dates and times but differ from FAT: in FAT, the [[Epoch (computing)|epoch]] is [[Epoch of 1980-01-01|1980]]; in FATX, the epoch is [[Epoch of 2000-01-01|2000]]. On the [[Xbox 360]], the epoch is 1980.<ref name="Xbox360_FATX" />
 
=== exFAT ===
Line 513 ⟶ 512:
exFAT is a file system introduced with [[Windows Embedded CE 6.0]] in November 2006 and brought to the Windows&nbsp;NT family with [[Windows Vista Service Pack 1|Vista Service Pack 1]] and [[Windows XP Service Pack 3]] (or separate installation of Windows&nbsp;XP Update KB955704). It is loosely based on the File Allocation Table architecture, but incompatible, proprietary and protected by patents.<ref name="Microsoft_exFAT-License" />
 
exFAT is intended for use on [[flash drive]]s and [[memory card]]s such as [[SDXC]] and [[Memory Stick XC]], where FAT32 is otherwise used. Vendors usually pre-format SDXC cards with it. Its main benefit is its exceeding of the 4&nbsp;GiBGB file size limit, as file size references are stored with eight instead of four bytes, increasing the limit to 2<sup>64</sup>&nbsp;−&nbsp;1 bytes.
 
Microsoft's [[Graphical User Interface|GUI]] and command-line format utilities offer it as an alternative to [[NTFS]] (and, for smaller partitions, to [[#FAT16B|FAT16B]] and [[#FAT32|FAT32]]). The [[Master Boot Record|MBR]] [[partition type]] is <code>[[Partition type#PID_07h|0x07]]</code> (the same as used for [[Installable File System|IFS]], [[High Performance File System|HPFS]], and NTFS). Logical geometry information located in the [[Volume Boot Record|VBR]] is stored in a format not resembling any kind of BPB.