Using the "-s 2" option would only help if mkfs.fat had chosen by default to use more than 2 sectors per cluster. The actual logic that mkfs.fat will use to make this decision is rather complicated, but it has to do with the size of the volume.
I was digging into the FAT specification from Microsoft which is actually referenced in the source for mkfs.fat (http://www.win.tue.nl/~aeb/linux/fs/fat/fatgen103.pdf) and the relevant piece of information is that the determining factor for FAT12/FAT16/FAT32 is entirely based on the number of clusters and nothing else.
The criteria is this:
If the number of clusters is less than 4085, it's a FAT12 volume.
If the number of clusters is at least 4085 and less than 65525, it's a FAT16 volume.
If the number of clusters is at least 65525, it's a FAT32 volume.
You can ask mkfs.fat to format a partition as FAT32 using the "-F32" option but if it's too small, it can't make a valid FAT32 volume. The minimum cluster size is 1 sector and FAT kind of requires a sector size of 512 bytes. The minimum number of FATs is 1. Since 65525 * 512 = 33548800, so that means that the volume has to have a minimum of just under 32M just for the data region plus just slightly under 256K for the FAT plus 32 sectors of reserved space at the start of the volume. The FAT size calculation is based on 4 bytes of space in the FAT per cluster.
Therefore, the minimum size for a FAT32 volume is about 32.25M. If you try to format a volume smaller than that with mkfs.fat, you're going to get this warning. You may be able to mount the volume in Linux, but UEFI firmware will likely not recognize the volume. QEMU UEFI firmware will not.
]]>I don't know that the actual UEFI spec is a mess so much as the implementation by the hardware vendors. Even in these cases, I still don't know if it is the UEFI that is causing the issues so much as the closed and buggy firmwares that are often shipped. It is unfortunate that the standard by which firmware is deemed acceptable is in its ability to successfully operate with windows... that same can be said about acpi.
]]>BTW, it looks like I have Intgr to thank for posting the solution to the wiki page on 05-Aug. Thank you, Intgr.
]]>FWIW, I have heard in the past that it is often not possible to make a FAT32 filesystem on anything less than a half a GB (512M). Though, I have been able to specify 'F32' on smaller without any kind of warning like what you have gotten. I am not sure what influences this (in)ability to do this, but from my experience I know that this filesystem size is not always a limitation.
These days, I just always make my ESP 512MB to 1024MB just for the sake of ensuring that I don't ever have to deal with that crap. Though I am fairly certain that my machine is fine with FAT16 as well, so I don't know that it would actually make a difference.
I'm not sure how you arrived at calling EFI poorly implemented, when in reality it is the FAT filesystem that you are battling. I'm not saying that I thnk that the implementation of UEFI is perfect, but it just seems that you are complaining about the wrong thing in that statement.
]]>mkfs.vfat -F32 -s 2 /dev/sda1
/hissy-fit
]]># mkfs.vfat -F32 /dev/sda1
mkfs.fat 3.0.20 (12 Jun 2013)
WARNING: Not enough clusters for a 32 bit FAT!
My EFI bios does not recognize the filesystem even though I copied over Shellx64.efi to it. Nothing on a google search of relevance. Anyone else hit this and solve it?
]]>