MDGx MS-DOS Undocumented + Hidden Secrets (original) (raw)
FAT16 [R.I.P. :-)] used to be the most popular File Allocation Table (FAT) 16-bit standard on "Wintel" PCs, recognized by all MS-DOS releases beginning with 4.00 (released back in 1991), and all other 3rd party DOS OSes (DR-DOS, FreeDOS, OpenDOS etc), and by all Windows versions.
MS-DOS releases older than 4.00 used to operate with the obsolete FAT12 standard, discontinued, but still in use by the ol' floppy disk(ette) standard. :(
FAT12 is [was :)] able to handle disk partitions only up to 16 MB using 4 KB clusters.FYI:
Officially Microsoft implemented FAT16 only begining with MS-DOS 4.00 (through extended partitions larger than 32 MB), but unofficially FAT16 was already implemented in MS-DOS 3.3. FDISK.EXE supports extended partitions (the only way to take advantage of FAT16 at the time) begining with MS-DOS 3.3 (up to a total of 128 MB), but FORMAT.COM supports partitions larger than 32 MB only begining with MS-DOS 4.00. MS-DOS 3.3 FORMAT.COM supported partitions only up to 16 MB (FAT12), even if FAT16 was already available. :(
Further reading: "Upgrading and Repairing PCs" book by Scott Mueller, second edition, page 653.
[Thank you Mr. Nobby!]FAT16 limitations:
- maximum partition size = 2 GigaBytes (GB) = 2,048 MegaBytes (MB);
- maximum number of root directory file entries allowed = 512 (same as FAT12);
- (too) large cluster size, which wastes a lot of disk space, by allocating at least 1 cluster to each file on disk, even if a file is at least 1 byte in length.
Note that 0 byte files (same as directories/folders) do NOT take ANY disk space, but each directory entry (32 Bytes on FAT32) occupies a separate FAT entry. Moreover, Long File Names (LFNs) files and folders occupy an additional LFN FAT entry.
Another example: a 33 KB file has 2 clusters assigned on a disk partition with 32 KB clusters, thus wasting 31 KB, because the same cluster canNOT be shared among separate files or folders:
Partition size | FAT16 Cluster size |
---|---|
0 - 127 MB | 2 KB = 2048 B |
128 - 255 MB | 4 KB = 4096 B |
256 - 511 MB | 8 KB = 8192 B |
512 - 1023 MB | 16 KB = 16384 B |
1024 - 2047 MB | 32 KB = 32768 B |
In 1996 Microsoft introduced a new File Allocation Table standard called FAT32 (32-bit), which extends these limits:
- FAT32 (first version) released beginning with Windows 95B OSR 2.0, supports partitions up to 2 TeraBytes (TB) = 2,048 GB = 2,097,152 MB (theoretical + new practical limit);
- FAT32X (second version) released beginning with Windows 95C OSR 2.5 (1997), features eXtended support for hard drives larger than 8 GB (with more than 1023 cylinders, 255 heads and 63 sectors), using the BIOS interrupt 13 (INT13h) LBA (Logical Block Addressing) extension (on Pentium class and newer chipsets that support this BIOS feature), for a total of 28 bits of addressing a maximum of 137 GB of hard disk capacity (old practical limit).
Newer PC mainboards add eXtended support for drives larger than 137 GB, using the new BIOS interrupt 13 (INT13h) LBA (Logical Block Addressing) extension (on Pentium III/IV class and newer chipsets that support this BIOS feature), for a total of 48 bits of addressing a maximum of 2 TB of hard disk capacity (new practical limit); - supports unlimited number of root directory file entries;
- largest supported file size 4 GigaBytes (GB);
- smaller, more efficient cluster size, without noticeable performance degradation:
Partition size | FAT32/FAT32X Cluster size |
---|---|
0 - 259 MB | 512 B[*] |
260 - 511 MB | 1 KB = 1024 B [*] |
512 - 8191 MB | 4 KB = 4096 B |
8192 - 16383 MB | 8 KB = 8192 B |
16384 - 32767 MB | 16 KB = 16384 B |
32768 MB - 2 TB | 32 KB = 32768 B |
[*] = ONLY if using custom FORMAT drive: /Z:n values!
Therefore FAT32 wastes a lot less disk space, preserving speedy disk access at the same time.
More info:
- Wikipedia: FAT32.
- MSKB: MS-DOS Partitioning Summary ➜ Windows 95 OEM SR2 and Windows 98.
NOTE:
You MUST be using Windows 95B/95C OSR 2.0 - 2.5, 98/98 SE(U) [a.k.a. MS-DOS 7.10], ME [a.k.a. MS-DOS 8.00], 2000/newer [no native MS-DOS] to take advantage of FAT32.Intel 48-bit LBA test tool [33 KB, free].
This tool detects if the motherboard BIOS supports 48-bit LBA addressing mode, and therefore hard disks larger than 137 GB.PROs + CONs: - Larger cluster size means faster disk access, but more disk overhead (wasted clusters), and less space for stored files, opposite to:
- Smaller cluster size means slower disk access, but less disk overhead (wasted clusters), and more space for stored files.
FYI:
The performance hit for using FAT32(X) depends on the speed of your CPU, bus bandwidth, disk controller capabilities and hard disk subsystem transfer rates + access times. Test your computer motherboard extended BIOS capabilities using EXTBIOS.EXE for DOS [7 KB, freeware].FAT16/FAT32 versus NTFS versus exFAT comparison.
Default FAT16, FAT32, NTFS + exFAT cluster sizes when using MS FORMAT tool.
More info.
Even more info.FAT+ extension (FAT32+) (open source) is a new Enhanced DR-DOS and FreeDOS standard, and removes some of the FAT32/FAT32X limitations.KNOWN BUGS + FIXES:
- Microsoft acknowledged in this MSKB article that Windows 95 retail, 95a OSR1 + 95B/95C OSR 2.x do NOT support disk drives larger than 32 GB. :(
- Windows 98 retail, 98 SP1 + 98 SE(U) provide built-in support for media drives > 32 GB, but ONLY IF you install the fixed ESDI_506.PDR [English patch] that allows ScanDskw.exe to properly recognize (E)IDE/(Ultra)ATA hard disk clusters beyond cluster number 967,393.
More info @ MSKB. - The only Microsoft Operating Systems that natively support drives larger than 32 GB are Windows NT 4.0 + newer.
- Make sure your motherboard BIOS supports hard disks larger than 137 GB (48-bit LBA function). Always "flash" your BIOS using the current BIOS update from your mainboard vendor's web/ftp site.
More info @ MSKB.
Windows 98/98 SE/ME (E)IDE/ATAPI Driver for Hard Disks > 137 GB, also here.
In 2006 Microsoft introduced exFAT (Extended File Allocation Table) file system for Windows XP/newer similar to FAT32/FAT32X, but without the flaws and limitations that plagued FAT32/FAT32X, and designed for USB flash drives, SSD flash drives, hybrid (HDD + SSD) drives and flash memory cards, cartridges + sticks, and compatible with hard disk drives (HDDs), solid state drives (SSDs) and PCIe NVMe RAM drives.
Wikipedia: Comparison of flash memory cards.
Wikipedia: exFAT.
MSDN: File System Functionality Comparison.
NTFS.com: exFAT versus FAT32/FAT32X comparison.
NTFS.com: FAT16/FAT32 versus NTFS versus exFAT comparison.
Integral Memory: CARDS - Differences between FAT16, FAT32 and exFAT?
Tech-Recipes: exFAT versus FAT32 versus NTFS.
How-to Geek: What's the Difference between FAT32, exFAT and NTFS?
MSKB: Default FAT16, FAT32, NTFS + exFAT cluster sizes.Advantages:
- largest disk size 512 TB (TeraBytes) (practical limit) or 128 PB (PetaBytes) (theoretical limit);
- largest file size 512 TB (TeraBytes) (practical limit) or 16 EB (ExaBytes) (theoretical limit);
- largest cluster size 32 MB;
- up to 2,796,202 files per directory;
- extensible directory structure and file name hashes;
- improved free space allocation and delete performance due to free space bitmaps;
- Access Control Lists (ACL) support;
- Transaction-Safe FAT File System (TFAT) support (Windows CE only);
- OEM definable custom file system parameters for specific (portable) devices.
See technical specifications + requirements.
Disadvantages: - backward incompatible with DOS/MS-DOS/FreeDOS/DR-DOS/OpenDOS [DOS based OS users can installone of these real mode, unsupported drivers], Windows 95, 98, ME, NT and 2000 [Windows 2000 SP4+UR1 users can install this unofficial unsupported driver, which may or may not work];
- no file system journaling support.
STRONGLY RECOMMENDED:
In case you are using USB/Thunderbolt/port, CF/CFx/SD/SDHC/SDXC/SDUC/Micro-SD/mini-SD/M2/MMC/MS/MSXC/XQD, Wi-Fi/Wireless/Bluetooth flash/memory/RAM cards, cartridges, drives, sticks, HDDs, SSDs, NVMes, etc storage devices/media formatted with the obsolete, flawed, limited FAT32 file system you should (re)format them with the superior exFAT that among other advantages provides universal support and compatibility for all digital computers/devices/electronics released for the past 15+ years. This is why:
*** MSKB: Limitations of FAT32 File System.**
*** MSKB: Limitations of FAT32 File System in Windows XP.**
*** Western Digital (WD): File and partition size limitations using FAT32 (Windows and Mac).**
Nowadays overwhelming majority of computers, portables, devices, electronics: servers, desktops, laptops, netbooks, terminals, tablets/smart phones, flat TVs/monitors, multimedia/streaming audio/video players/recorders transmitters/receivers, amplifiers/tuners/stereos, digital cameras/recorders, projectors, etc... support exFAT for both reading and writing operations, even if some may do this unofficially (or undocumented) due to steep/unaffordable proprietary licensing fees. :-(
On the other hand, you [the end user ] can safely leap into the 21st century, and take advantage of the full capacity of your storage media and be able to use an almost unlimited number of files larger than 4 GB, as long as you own a computer/portable/device running a modern/compatible edition/release of Windows, Linux, MacOS, Android, iOS +/- similar/derivative/branch/fork/proprietary operating system(s) [OS(es)].
See next paragraph (further below) to learn how to (re)format all your storage media with exFAT in Windows.
How to enable exFAT: *** Native/real/true/pure DOS based OS [DOS, MS-DOS, FreeDOS, DR-DOS + OpenDOS] users: install one of these real mode drivers/executables (free, unsupported):** *** USBexFAT USB ASPI Disk Driver:** USBEXFAT.COM 1.0a + USBASPI.EXE 2.28 [336 KB]. *** exFAT Reader/Viewer (read only!):** EXFAT.EXE [50 KB, open source]. EXFAT.EXE requires HX DOS extender (free)! *** Windows OSes:** *** Windows XP users: MUST install (in this exact order):** 1. Windows XP Service Pack 3 (SP3). 2. Windows XP SP2/XP SP3 exFAT Drivers Update. *** Windows 2003 users: MUST install (in this exact order):** 1. Windows 2003 Service Pack 2 (SP2). 2. Windows 2003 SP1/2003 SP2 exFAT Drivers Update. *** Windows 2000 SP4+UR1, XP Pre-SP2 + 2003 Pre-SP1 users: MUST install this unofficial Update (unsupported, may or may not work!).** Windows 2000 requires (free): *** Windows 2000 Service Pack 4 (SP4).** *** Windows 2000 Post-SP4 Update Rollup 1 (UR1).** *** Unofficial Windows 2000 Kernel32 Extension [1 MB].** More info. *** Unofficial Windows 2000 XP API Wrapper Pack (OCW) [644 KB].** More info. *** Windows Vista Pre-SP2 users: MUST install Windows Vista Service Pack 2 (SP2).** *** Windows 2008 + newer have exFAT drivers built-in.** *** Linux/BSD:** *** Modern *nix distros (Linux kernel 3.8.11 and newer) can implement this native (non-FUSE) Linux kernel driver module, which must be compiled (source only).** *** Older Linux/BSD (Linux kernel 3.8.0x and older) users can install this open source (free GPL) FUSE driver.** *** How to Format External Hard Disk to exFAT Filesystem in Ubuntu.** *** How to Mount and Use an exFAT Drive on Linux.** *** Installing and mounting exFAT in Linux (with write option).** *** MacOS X Snow Leopard 10.6.5 + newer provide exFAT support.** Guide: Format an external drive for Macs and PCs without 3rd party software.
Format with exFAT
How to format your drives/cards/cartridges/sticks with exFAT:
- sunpech.blog: How to Format your Hard Drive into exFAT.
- Laptop Mag: How to Format a Hard Drive for both Windows and Mac.
- Seagate: Format an External Drive exFAT on Windows 8.
In Windows Vista/newer you can use a 3rd party exFAT formatting tool (freeware), or get the official Secure Digital (SD)/miniSD/microSD/SDHC (High Capacity)/SDXC (eXtended Capacity)/microSDXC/SDUC (Ultra Capacity) Card Formatter (free).
Secure Digital (SD)/miniSD/microSD/SDHC (High Capacity)/SDXC (eXtended Capacity)/microSDXC/SDUC (Ultra Capacity) memory cards require Microsoft Windows Vista Pre-SP2/7 Pre-SP1/2008 Pre-SP2/2008 R2 Pre-SP1 Memory Cards > 32 GB Fixed Card Driver! ➜ See WIC + MCCP + RAW Codecs for details + downloads.
Windows Vista SP2 + newer include Fixed Card Driver!
With the appropriate exFAT drivers installed Windows NTx OSes (2000/newer) can (re)partition and (re)format HDD, SSD, NVMe + USB drives/partitions/volumes by using the built-in Disk Management (a.k.a. Logical Disk Manager) front end GUI (which in turn uses DiskPart.exe+ FORMAT.COM command line tools): Start button (orb) ➜ (All) Programs ➜ Administrative Tools ➜ Computer Management ➜ Storage➜ Disk Management.
You can also run this command from the Run... box (hold down the WinKey and press R at the same time) or from a DOS console (CMD):
DISKMGMT.MSC
This is the complete version:
%windir%\SYSTEM32\MMC.EXE /S %windir%\SYSTEM32\DISKMGMT.MSC
See "WINKEY SHORTCUTS" in TIPS95.TXT (part of W95-11D.EXE).
Microsoft Management Console (MMC) executable (MMC.EXE) and this MMC snap-in (DISKMGMT.MSC) are both located in %windir%\SYSTEM32 (Win2000/newer 32-bit) and in %windir%\SYSWOW64 (WinXP/newer 64-bit).
Or (re)format a drive/partition/volume in Windows Explorer/File Explorer/Desktop shortcut/My Computer icon: highlight desired (must be writable) drive/partition/volume letter/name in the right hand pane ➜ right-click on it➜ select Format... ➜ select desired Capacity, File System [NTFS, FAT32 or exFAT (only with exFAT drivers installed)] ➜ select exFAT ➜ select Allocation unit size (Bytes) (you should leave it at default value in order to use full drive/partition capacity) ➜ select Volume label (type desired drive/partition/volume name)➜ select Format options [Quick Format +/- Enable Compression (NTFS only)] ➜ select Quick Format(leave all other options at default values) ➜ click the Start button or press Enter.
More details.
If you prefer using an automated/unattended batch (.BAT)/command (.CMD) script which runs the Windows built-in FORMAT.COM DOS console command line tool, this is an example of how to (re)format your **G:**drive/partition/volume with exFAT default parameters and a new label
:
FORMAT G:/FS:exFAT /V:XFAT_007 /Q
This is the complete version:
%windir%\SYSTEM32\FORMAT.COM G: /FS:exFAT /V:XFAT_007 /Q
Microsoft DOS console Format (FORMAT.COM) command line tool is located in %windir%\SYSTEM32 (Win2000/newer 32-bit) and in %windir%\SYSWOW64 (WinXP/newer 64-bit).
Hold down the WinKey and press R at the same time to open the Run... dialog box ➜ type CMD ➜ press Enter or click OK to run this command from a DOS box console to view all FORMAT.COM command line parameters:
FORMAT /?
See "WINKEY SHORTCUTS" in TIPS95.TXT (part of W95-11D.EXE).
You can create/edit your .BAT/.CMD file in Notepad (%windir%\NOTEPAD.EXE = where %windir% is usually C:\WINDOWS) or a better plain text/ASCII editor[free(ware)].
Then save it as XFATFRMT.BAT or XFATFRMT.CMD (example), and (optionally) save it inside a directory/folder found on your PATH statement.
Run this command from a DOS console window to view all directories/folders listed in your PATH:
PATH
To format any internal/external/removable/remote drive/partition/volume by using this batch/cmd script, just modify it to include these 2 variables, and then type a drive letter and a drive label number after the file name (each separated by a Space) whenever running it: %1 (substitute 1st number with your actual drive/partition/volume letter: from D up to Z) and %2 (substitute 2nd number with an actual integer number: from 0 up to 999):
Click/Touch inside block of text below ➜ right-click ➜ Copy [Ctrl+C]:
-----Begin cut & paste here-----
@ECHO OFF IF NOT "%OS%"=="Windows_NT" GOTO END IF NOT EXIST %windir%\SYSTEM32\FORMAT.COM GOTO END ECHO Y|%windir%\SYSTEM32\FORMAT.COM %1: /FS:exFAT /V:XFAT_00%2 /Q :END EXIT
------End cut & paste here------
In this example you are formatting your G drive/partition/volume with the exFAT file system and giving it the new label
:**XFATFRMT G 7**
Have fun!
FAT Links
FAT + BIOS limits techno details + specs:
- Wikipedia: File Allocation Table (FAT).
- Wikipedia: NTFS.
- MSKB: Description of FAT32 File System.
- MSKB: Description of FAT32 File System in Windows XP.
- MSKB: Limitations of FAT32 File System.
- MSKB: Limitations of FAT32 File System in Windows XP.
- MS WHDC:FAT32 on Preinstalled Systems.
- MC MCSE: Windows XP Professional File Systems Overview.
- MS TechNet: Windows NTx File Systems.
- MSDN: File System Functionality Comparison.
- FAT32 Resource Page.
- Windows XP/2000 FAT32 Formatting Limit.
- Disk Parameters for drives over 8.4 GB.
- BIOS and OS Limits on Large Hard Disks.
- MSDN: Windows and GPT FAQ.
- MSKB: 4K Sector Hard Drives in Windows.
- Wikipedia: GUID Partition Table (GPT).
- The Partition Primer.
- PowerLoad: FAT32, FDISK + FORMAT Guide.
- FAT32 Information.
- Partitions + File Systems.
- BIOS IDE Harddisk Limitations.
- Radified Partition Guide.
- File Systems.