mkfs.exfat(8)
π mkfs.exfat π β the mkfs.exfat(8) page, but make it cute
okay bestie, welcome to the System Manager's Manual section for mkfs.exfat(8). this is the little tool that gives you a whole exFAT filesystem. sit down, hydrate, let's go π«Ά
β¨ 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 it found in the arguments you handed it on the command line. it doesn't guess, it doesn't daydream, it just writes. βοΈ
it also gets invoked automatically by mkfs(8) whenever you pass it the -t exfat option, so sometimes it's the main character and sometimes it's the quiet bestie doing the work in the background. either way, iconic.
as an example, to make a filesystem on the first partition on the first SCSI disk, use:
mkfs.exfat /dev/sda1
like. that's it. that's the whole vibe. π
π OPTIONS π
-b,--boundary-align=alignmentβ sets the alignment for the FAT and for the start of the cluster heap. thealignmentargument is in bytes, or you can slap anm/Msuffix on it for mebibytes or ak/Ksuffix for kibibytes, and it must be a power of two. some media (looking at you, SD cards π) literally need this for optimal performance and endurance, and in that case you should set the alignment to half of the card's native boundary unit size. if you don't know the card's native boundary unit size, the SD Card Association has a whole recommendation table, and here it is, every single row, no skipping:- card capacity range β€8 MiB β cluster size 8 KiB, boundary unit 8 KiB
- card capacity range >8 MiB to β€64 MiB β cluster size 16 KiB, boundary unit 16 KiB
- card capacity range >64 MiB to β€256 MiB β cluster size 16 KiB, boundary unit 32 KiB
- card capacity range >256 MiB to β€1 GiB β cluster size 16 KiB, boundary unit 64 KiB
- card capacity range >1 GiB to β€2 GiB β cluster size 32 KiB, boundary unit 64 KiB
- card capacity range >2 GiB to β€32 GiB β cluster size 32 KiB, boundary unit 4 MiB
- card capacity range >32 GiB to β€128 GiB β cluster size 128 KiB, boundary unit 16 MiB
- card capacity range >128 GiB to β€512 GiB β cluster size 256 KiB, boundary unit 32 MiB
- card capacity range >512 GiB to β€2 TiB β cluster size 512 KiB, boundary unit 64 MiB
the default is always 1 MiB. always always.
-s,--sector-size=sizeβ sets the sector size of the exFAT file system.sizeis in bytes, or you can use ak/Ksuffix for kibibytes, and it must be exactly512,1024,2048or4096bytes. default is whatever sector size the device reports, or512bytes if the device sector size can't be figured out.
β οΈ an exFAT volume formatted with a sector size different from the device's own is unusable in most operating systems. DO NOT use this option unless you're absolutely sure you know what you're doing. i'm serious. i'm holding your hand but i'm serious. π
-c,--cluster-size=sizeβ sets the cluster size of the exFAT file system.sizeis in bytes, or you can use anm/Msuffix for mebibytes or ak/Ksuffix for kibibytes, and it must be a power of two. the default value lives in this table, every row of it:- card capacity range <7 MiB β cluster size 512 B
- card capacity range β€256 MiB β cluster size 4 KiB
- card capacity range >256 MiB to β€32 GiB β cluster size 32 KiB
- card capacity range >32 GiB β cluster size 128 KiB
-f,--full-formatβ does a full format. this zeros the entire disk device while it's creating the exFAT filesystem. full send. π₯-F,--forceβ lets you overwrite a device that already has a disk signature on it. without this option,mkfs.exfatflat-out refuses to format whenlibblkiddetects a foreign disk signature on the target device. heads up though: this safeguard is only in effect whenmkfs.exfatis run from a terminal. iykyk.-K,--no-discardβ do not attempt to discard blocks. that's the whole thing. no notes. β¨-P,--partition-table=auto|none|mbr|gptβ picks what type of partition table to set up.autois the default: the characteristics of the underlying device get detected to work out whether a partition table is needed for Microsoft Windows systems to be able to recognise the new volume.- if
mbris selected,mkfs.exfatsets 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 it's similar to whatmkfs.fatcreates when needed. - if
gptis selected,mkfs.exfatcreates regular GPT structures with one partition with all the available space allocated, and the new exFAT volume gets created on that partition. the partition will be aligned to the boundary unit specified with the-boption and must be at least1 MiB. - to override the default behaviour, set it to
noneto disable partition table creation, or set it tombrorgptto forcemkfs.exfatto create MBR or GPT respectively.
--bootcode-msg=messageβ sets the message that the x86 real mode MBR bootstrap program displays. if the message isn't terminated with\r\n(CRLF) newline characters, those newline characters get appended to the given message for you. use theprintforechocommand to escape newline characters from the command line.-C,--verify-writtenβ verify the filesystem metadata by reading it back after writing it. this option does a read-back verification of critical exFAT metadata (boot record, FAT, allocation bitmap, upcase table, and root directory) after each formatting stage. when used with the-foption, the written zeros get verified too. super useful for catching broken storage devices, or devices that falsely report successful writes without actually persisting data. π€ this option may slightly degrade formatting performance, and it is therefore disabled by default.-h,--helpβ prints the help and exits. bye bestie π-L,--volume-label=labelβ sets the volume label to be associated with the exFAT filesystem. name your baby. π-U,--volume-guid=guidβ sets the volume GUID to be associated with the exFAT filesystem. you can give it in the standard, hyphenated UUID format, likeaaaabbbb-cccc-dddd-eeee-ffff00001111. note: the volume GUID cannot be used to set the 8-letter ID reported byblkidor used as the filesystem UUID in/etc/fstab. two different things, don't mix them up, i'm begging. π--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 it may improve performance and endurance on SD cards and other flash media that weren't designed for use with exFAT, by allowing file-system metadata updates to touch fewer flash allocation units. on top of that, lots of SD cards and other flash devices specially optimise the allocation unit where the FAT resides so they can support tiny writes with reduced write amplification, but they expect only larger writes in the subsequent allocation units β which is exactly where the exFAT bitmap would be placed by default. specifying--pack-bitmaptries to dodge the potential problems of issuing many small writes to the bitmap by making it share an allocation unit with the FAT. if there's 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. no harm, no foul.--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 bymkfs.exfat, and the binary contents of the file get 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/libexecand/usr/share/doc/exfatprogs. go poke around in there, it's a whole thing. π§-q,--quietβ prints only error messages while creating the exFAT filesystem. silent treatment, but productive.-v,--verboseβ prints verbose debugging information while creating the exFAT filesystem. tell me everything, i want the lore. π-V,--versionβ prints the version number and exits.
π SEE ALSO π
mkfs(8), mount(8), mkfs.fat(8)
and that's the whole page, bestie. this one lives in the System Manager's Manual and signs off as mkfs.exfat(8) β that footer at the bottom of the page is literally just the page name looking back at you. π β¨ π π¦ πΈ π
π«Ά
π¦ where this page comes from
- alpine 3.24: exfatprogs-doc 1.4.1-r0 Β· GPL-2.0-or-later
- arch rolling: exfatprogs 1.4.3-1 Β· GPL-2.0-or-later
- fedora 43: exfatprogs 1.4.3-1.fc43 Β· GPL-2.0-only
- fedora 44: exfatprogs 1.4.3-1.fc44 Β· GPL-2.0-only
- nixpkgs unstable: exfatprogs 1.4.3
- ubuntu stonking: exfatprogs 1.4.3-1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms