GNOME Bugzilla – Bug 668491
Formatting small FAT32 partitions (32MB) violates FAT32 specifications
Last modified: 2012-02-22 00:54:42 UTC
Created attachment 205869 [details] Microsoft Whitepaper for FAT32 GParted 0.7.0 allows to FAT32 format partitions with 32MB. This is not possible e.g. with mkdosfs. E.g. 32MB partition on a 2GB USB stick. BPB_RootEntCnt: x0000 BPB_BytsPerSec: 0x0200 (512) BPB_FATSz16: 0 BPB_FATSz32: 0x000001f8 (504) BPB_TotSec16: 0 BPB_TotSec32: 0x00010000 (65536) BPB_ResvdSecCnt: 0x0020 (32) BPB_NumFATs: 0x02 BPB_SecPerClus: 1 DataSec = 65536 – (32 + 2*504) + 0 = 64496 CountOfClusters = 64496 / 1 = 64496 ===== The result violates the Microsoft Whitepaper for FAT32 filesystem: fatgen103.doc Please see page 14, for "FAT Type Determination" A FAT32 volume must have at least 65,525 clusters. ======
Version 0.7.0 is an old version from November 2010. Please use a recent version and reopen this bug report if the problem still exists in a recent version: http://gparted.sourceforge.net/download.php
Created attachment 206069 [details] fat32_32mb_gparted0.7.0_dump.hex Hex dump of first 1K of 32MB FAT32 partition on USB stick. This partition was created and formatted with GParted 0.7.0 on Ubuntu 10.04
Created attachment 206070 [details] fat32_32mb_gparted0.11.0_dump.hex Hex dump of first 1K of 32MB FAT32 partition on USB stick. This partition was created and formatted with GParted 0.11.0 on Ubuntu 11.10
Tested again with GParted 0.11.0, build from source on Ubuntu 11.10. The results were exactly the same. Please see attached hex dumps of the first 1K of both partitions
Thank you Gerd for reporting this issue. Do you know what the minimum size should be for a FAT32 file system partition?
I'm not a specialist, and this is only the result from my investigations. According to the white paper, I come to following minimum values for fat32. A FAT32 partition must have a minimum of 65,525 data clusters. With a minimum size of 512 bytes per sector and 1 sector per cluster I get round about 66576 total sectors/clusters as a minimum, but this is only my best guess. The sector size in relation to the disk size is given by the table on page 20. Following article on the Microsoft support portal implies that there were support for FAT32 smaller than 32MB for Windows NT, but it seems this was discontinued. http://support.microsoft.com/kb/140365
Gerd, thank you for the link. The current limit in the source code is 32 MB and has the following comment beside it: <begin fat32.cc code snippet> fs .MIN = 32 * MEBIBYTE ; //smaller fs'es will cause windows scandisk to fail.. <end fat32.cc code snippet> So I decided to test this limit. Since it is no longer obvious where to find scandisk in Windows, a quick Internet search brought me to the following instructions: How to Perform Scandisk in Windows http://support.microsoft.com/kb/156571 For the test I created FAT32 partition sizes of 32, 33, and 34 MB in GParted Live 0.11.0-10 and the booted into Windows XP. When I tried to run a scandisk on the 32 MB FAT32 partition, a dialog box with the following message popped up. "Windows was unable to complete the disk check." The scandisk was able to successfully complete on the larger FAT32 partition sizes. Hence it appears that you are correct. A 32 MB FAT32 partition is too small. 33 MB does appear to work so I will set that as the minimum size.
The minimum size for a FAT32 file system partition has been increased to 33 MiB. This enhancement has been committed to the git repository for inclusion in the next release of GParted. The relevant git commit can be viewed at the following link: http://git.gnome.org/browse/gparted/commit/?id=fcdd853cb9d63ad86114fa15a267d353bfa0789f
This enhancement has been included in GParted 0.12.0 released on February, 21, 2012.