I would like to format an SD card to fat32 with 64kb Block Size. Disk utility seems to do use 32kb by default and there is no option to change this. Is there a terminal command to do what I want to do?
SD Card – How to Format SD Card to FAT32 with Custom Allocation Block Size
fat32
Related Question
- Encryption on USB – Mac & Windows partitions
- MacOS – El Capitan Fat32 partition problem
- MacOS – FAT (file allocation table) variant used when disk is formatted using OS X (macOS) disk utility
- Mount FAT32 partition (external drive) on Mac
- SD card left with barely any space after formatting it to ExFAT
- Terminal – Format MBR FAT32 SD Card as 0x0C Partition on macOS
Best Answer
To format a disk with custom (FAT) allocation block sizes use the -c option with e.g.
sudo newfs_msdos -F 12|16|32 diskXsY
. -F is the FAT type (usually FAT32 here).First get the disk identifier with
diskutil list
and the block size of the disk withdiskutil info diskYsX | grep "Device Block Size"
.To get the -c factor divide the wanted allocation block size by the device block size: e.g. 65536/4096 = 16. Acceptable values are powers of 2 in the range 1 through 128.
Assuming the device block size is 512 Bytes in your case, the factor is 65536/512 = 128 and the resulting command is:
An additional
-v name
option will also add a name for the volume.