Format FAT32 partition with set "Allocation Unit Size"

Note: This answer didn't work for me.

I wish to format a FAT32 partition with set AUS of 32K. I've read the man page man mkfs.fat, and the only thing that I can find is

-S LOGICAL-SECTOR-SIZE Specify the number of bytes per logical sector. Must be a power of 2 and greater than or equal to 512, i.e. 512, 1024, 2048, 4096, 8192, 16384, or 32768.

I don't know whether this is the "AUS", but I tried it out, and set -S 32768. This happened:

user@pc:~$ sudo mkfs.fat -S 32768 /dev/sdb1
mkfs.fat 3.0.28 (2015-05-16)
Warning: sector size is set to 32768 > 4096, such filesystem will not propably mount
WARNING: Not enough clusters for a 32 bit FAT!
mkfs.fat: Attempting to create a too large filesystem

I also tried sudo mkfs.fat -I -S 32768 /dev/sdb if that works, and it doesn't. Same error prints out.

1

2 Answers

man mkfs.fat:

-s SECTORS-PER-CLUSTER Specify the number of disk sectors per cluster. Must be a power of 2, i.e. 1, 2, 4, 8, ... 128.

The allocation unit size is also known as the cluster size.

2

The best way is to divide by 512 (the cluster size):

mkfs.fat -S $((32768/512)) /dev/sdb1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like