14

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

Chris Gerken
  • 16,221
  • 6
  • 44
  • 59
mustafa
  • 3,605
  • 7
  • 34
  • 56

1 Answers1

13

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

FRob
  • 3,883
  • 2
  • 27
  • 40
Marco Bax
  • 383
  • 2
  • 6
  • 1
    A link would be useful too... – gbn Dec 07 '11 at 09:20
  • 2
    Here you go: http://en.wikipedia.org/wiki/File_Allocation_Table#Size_limits – Marco Bax Dec 07 '11 at 09:49
  • 3
    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). – TOOGAM Jun 28 '18 at 08:09
  • @TOOGAM 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!` – hanshenrik Dec 09 '21 at 17:57
  • @TOOGAM I guess it's for the FAT entries. 65527 is just the number of blocks, and you need more blocks for metadata – phuclv Apr 23 '22 at 04:16
  • 2
    @hanshenrik 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 reported – phuclv Apr 23 '22 at 04:17