Smallest FAT32 Partition [closed]
Asked Answered
B

1

13

I need to create a small partition image (a few MB) with FAT32 filesystem. I came up some contradictory info on the Internet about the minimum size limit of a FAT32 partition.

When I tried to mkfs a 5MB partition as FAT32 in Linux, I get a warning since it's too small. Though, it writes something in it. (I'm not sure if it's valid) And when I try to format a 5MB partition as FAT32 with diskpart in Windows, it simply fails.

How small can a FAT32 partition be?

thanks

Boni answered 7/12, 2011 at 9:12 Comment(5)
Wikipedia? Have you investigated?Talus
Why do you want to do that, and why avoiding a few more megabytes are so important?Endostosis
en.wikipedia.org/wiki/File_Allocation_Table#Size_limitsGorgonian
Have you considered using FAT12 or FAT16?Pompey
I had a similar need for testing purpose. I created (Windows 7) a VHD of 5 MB and formated a partition of 1 MB using FAT.Metamer
K
13

FAT32 requires a partion of atleast 33,548,800 bytes (32763 KB). See a list of FAT size limits on Wikipedia.

Khichabia answered 7/12, 2011 at 9:15 Comment(6)
A link would be useful too...Talus
Here you go: en.wikipedia.org/wiki/File_Allocation_Table#Size_limitsKhichabia
Where did this number come from? I don't see that listed on the referenced Wikipedia page (anymore?). I have found some reference to a 65,527 cluster limit which, if using half-kilobyte clusters, would be 33,549,824 bytes which would be 32,763.5 KB but the provided 33,548,800 number of bytes would be 32,762.5 KB (or 65,525 clusters, which is not an amount I've seen documented). Yes, this seems to be squabbling over one kilobyte, but I disapprove of technical inaccuracy (especially being used as documentation).Ungava
@Ungava fwiw seems it must be close. switching out 33M with 32M here truncate -s 33M diskfile; mkfs.fat -F 32 -a -f 1 -h 0 -R 2 -s 1 -S 512 diskfile will make mkfs print the warning WARNING: Not enough clusters for a 32 bit FAT!Indicatory
@Ungava I guess it's for the FAT entries. 65527 is just the number of blocks, and you need more blocks for metadataSenarmontite
@Indicatory I tried your command and the minimum size is truncate -s $((66043*512)) diskfile; mkfs.fat -F 32 -a -f 1 -h 0 -R 2 -s 1 -S 512 diskfile. Change to 66042 and an error is reportedSenarmontite

© 2022 - 2024 — McMap. All rights reserved.