File Allocation Table: Difference between revisions

Content deleted Content added
Citation bot (talk | contribs)
Altered template type. Add: pages, issue, volume, journal. | Use this bot. Report bugs. | Suggested by Whoop whoop pull up | #UCB_webform 2331/2985
deletingg hacker info from my decice
Tags: Reverted section blanking Mobile edit Mobile web edit
Line 361:
 
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&nbsp;[[megabyte|MB]] – 4.5&nbsp;[[kilobyte|KB]] (with 65525 clusters and 512 byte sectors)
| 256&nbsp;MB – 36&nbsp;KB (with 65525 clusters and 4&nbsp;[[kilobyte|KB]] sectors)
}}
| max_volume_size = {{ubli
| 2&nbsp;[[terabyte|TB]] (with 512&nbsp;byte sectors)
| 8&nbsp;TB (with 2&nbsp;KB sectors and 32&nbsp;KB clusters)
| 16&nbsp;TB (with 4&nbsp;KB sectors and 64&nbsp;KB clusters)
}}
| max_file_size = {{ubli
| 2,147,483,647 bytes (2&nbsp;GiB − 1 byte)<!-- 2^31 - 1 --> (without [[large file support|LFS]])
| 4,294,967,295 bytes (4&nbsp;GiB − 1 byte)<!-- 2^32 - 1 --><ref name="GB4" /> (with [[large file support|LFS]])
| 274,877,906,943 bytes (256&nbsp;GiB − 1 byte)<!-- 2^38 - 1 --> (only with FAT32+<ref name="DRDOS_FAT+_R2" />)
}}
| max_files_no = 268,173,300 for 32&nbsp;KB clusters<!-- 2^28 − 12 (reserved clusters) − 262144 (number of 32&nbsp;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&nbsp;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,
| 1&nbsp;day for access date,
| 2&nbsp;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&nbsp;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&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;[[gigabyte|GB]] 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.
 
==== 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" />
 
== Extensions ==