mkfs.exfat(8)

NAME
mkfs.exfat - create an exFAT filesystem

SYNOPSIS
mkfs.exfat [ -CfFKqv ] [ -b boundary_alignment ] [ -s sector_size ] [ -c cluster_size ] [ -L volume_label ] [ -U volume_guid ] [ -P type ] [ --pack-bitmap ] [ --upcase=file ] device
mkfs.exfat -V
mkfs.exfat -h

DESCRIPTION
mkfs.exfat creates an exFAT filesystem by writing on a special file using the values found in the arguments of the command line. It is invoked automatically by mkfs(8) when it is given the -t exfat option.

As an example, to make a filesystem on the first partition on the first SCSI disk, use:

    mkfs.exfat /dev/sda1

OPTIONS

-b, --boundary-align=alignment
    Specifies the alignment for the FAT and the start of the cluster heap. The alignment argument is specified in bytes or may be specified with m/M suffix for mebibytes or k/K suffix for kibibytes and must be a power of two. Some media like SD cards need this for optimal performance and endurance, in which case alignment should be set to half of the card's native boundary unit size. If the card's native boundary unit size is not known, refer to the following table of boundary unit sizes recommended by the SD Card Association.
    Card Capacity Range | Cluster Size | Boundary Unit
     | ≤8 MiB | 8 KiB | 8 KiB
    >8 MiB | ≤64 MiB | 16 KiB | 16 KiB
    >64 MiB | ≤256 MiB | 16 KiB | 32 KiB
    >256 MiB | ≤1 GiB | 16 KiB | 64 KiB
    >1 GiB | ≤2 GiB | 32 KiB | 64 KiB
    >2 GiB | ≤32 GiB | 32 KiB | 4 MiB
    >32 GiB | ≤128 GiB | 128 KiB | 16 MiB
    >128 GiB | ≤512 GiB | 256 KiB | 32 MiB
    >512 GiB | ≤2 TiB | 512 KiB | 64 MiB
    The default is always 1 MiB.

-s, --sector-size=size
    Specifies the sector size of the exFAT file system. The size argument is specified in bytes or may be specified with k/K suffix for kibibytes and must either 512, 1024, 2048 or 4096 bytes. The default value is the sector size reported by the device, or 512 bytes if the device sector size cannot be determined. An exFAT volume formatted with the sector size value other than that of the device is unusable in most operating systems. DO NOT use this option unless you're absolutely sure that you know what you're doing.

-c, --cluster-size=size
    Specifies the cluster size of the exFAT file system. The size argument is specified in bytes or may be specified with m/M suffix for mebibytes or k/K suffix for kibibytes and must be a power of two. The default value is described in the following table:
    Card Capacity Range | Cluster Size
    <7 MiB |  | 512 B
    ≤256 MiB |  | 4 KiB
    >256 MiB | ≤32 GiB | 32 KiB
    >32 GiB |  | 128 KiB

-f, --full-format
    Performs a full format. This zeros the entire disk device while creating the exFAT filesystem.

-F, --force
    Allow overwriting a device that already contains a disk signature. Without this option, mkfs.exfat refuses to format when libblkid detects a foreign disk signature on the target device. This safeguard is in effect only when mkfs.exfat is run from a terminal.

-K, --no-discard
    Do not attempt to discard blocks.

-P, --partition-table=auto|none|mbr|gpt
    Specifies the type of partition table to set up. If set to auto, which is the default, the characteristics of the underlying device will be detected to determine whether a partition table is required for Microsoft Windows systems to be able to recognise the new volume. If MBR is selected, mkfs.exfat will set up the volume with an MBR partition entry that covers the entire device including LBA 0 that contains the MBR itself. This is known as a recursive partition and is similar to what mkfs.fat creates when needed. If GPT is selected, mkfs.exfat creates regular GPT structures with one partition with all the available space allocated, and the new exFAT volume will be created on the partition. The partition will be aligned to the boundary unit specified with -b option and must be at least 1 MiB.

    To override the default behaviour, set to none to disable partition table creation and set to mbr or gpt to force mkfs.exfat to create MBR or GPT, respectively.

--bootcode-msg=message
    Specifies the message the x86 real mode MBR bootstrap program displays. If the message is not terminated with \r\n(CRLF) newline characters, the newline characters will be appended to the given message. Use printf or echo command to escape newline characters from command line.

-C, --verify-written
    Verify filesystem metadata by reading it back after writing. This option performs read-back verification of critical exFAT metadata (boot record, FAT, allocation bitmap, upcase table, and root directory) after each formatting stage. When used with -f option, also written zeros are also verified. It is useful for detecting broken storage devices or devices that falsely report successful writes without actually persisting data. This option may slightly degrade formatting performance and is therefore disabled by default.

-h, --help
    Prints the help and exit.

-L, --volume-label=label
    Specifies the volume label to be associated with the exFAT filesystem.

-U, --volume-guid=guid
    Specifies the volume GUID to be associated with the exFAT filesystem. It can be given in the standard, hypenized UUID format like aaaabbbb-cccc-dddd-eeee-ffff00001111. Note: The volume GUID cannot be used to set the the 8-letter ID reported by blkid or used as the filesystem UUID in /etc/fstab.

--pack-bitmap
    Attempts to relocate the exFAT allocation bitmap so that it ends at the alignment boundary immediately following the FAT rather than beginning at that boundary. This strictly violates the SD card specification but may improve performance and endurance on SD cards and other flash media not designed for use with exFAT by allowing file-system metadata updates to touch fewer flash allocation units. Furthermore, many SD cards and other flash devices specially optimize the allocation unit where the FAT resides so as to support tiny writes with reduced write amplification but expect only larger writes in subsequent allocation units — where the exFAT bitmap would be placed by default. Specifying --pack-bitmap attempts to avoid the potential problems associated with issuing many small writes to the bitmap by making it share an allocation unit with the FAT. If there is insufficient space for the bitmap there, then this option will have no effect, and the bitmap will be aligned at the boundary as by default.

--upcase=file
    Format the volume with the specified up-case table file in binary format. No additional conversion or validation of the file is done by mkfs.exfat and the binary contents of the file is written to the volume as-is. This is useful for testing and debugging exFAT file system drivers. The scripts and example up-case tables useful for this option are located in /usr/libexec and /usr/share/doc/exfatprogs.

-q, --quiet
    Prints only error messages while creating the exFAT filesystem.

-v, --verbose
    Prints verbose debugging information while creating the exFAT filesystem.

-V, --version
    Prints the version number and exits.

SEE ALSO
mkfs(8), mount(8), mkfs.fat(8)