This is the procedure for mounting the exFAT file system on FreeBSD. exFAT are used on SD memory cards, such as SDSC, SDHC and SDXC. Updated 2024-05-25.

What is exFAT?

exFAT is a file system, that are used on 32 GB or larger memory cards, because it does not have the limitations, that FAT32 has. exFAT was developed by Microsoft in 2006 and was developed for use on flash memory, which is used in USB flash drives and SD memory cards, such as SDXC.

Cameras, such as Canon EOS 250D, and camcorders, such as Sony FDR-AX43, FDR-AX53 and FDR-AX60, formats microSDXC and SDXC memory cards to the exFAT file system.

Sandisk SDHC memory card with exFAT file system in Sony FDR-AX43 camcorder.
Sandisk Extreme PRO 128 GB microSDXC memory card with exFAT file system and microSDXC adapter in Sony FDR-AX43 4K camcorder.

Install FUSE and FUSE exFAT.

FUSE, which comes from file system in userspace, is a driver and a protocol, rewritten for FreeBSD, that allows userspace processes to access a file system, which the kernel presents to other processes like any other. FUSE can be used to mount and read the exFAT file system.

If FUSE is not already installed, then install FUSE and its exFAT implementation with the default package interface. You might want to have FreeBSD load the kernel module at boot time. Note, that after FreeBSD 13.0, then the FUSE kernel module has been renamed from fuse to fusefs.

# pkg install fusefs-exfat
# kldload fusefs
# nano /boot/loader.conf
# reboot

Attach the SD memory card and determine the FreeBSD device.

Insert the SD memory card in the card reader in your computer. If you do not have a card reader, you can use an external USB SD/SDHC/SDXC card reader. If you do not have an external card reader, you can connect your camera or camcorder via USB cable to your computer. FreeBSD will recognize the new device or devices. This is logged in the system message buffer.

In the example below a Sony camcorder with 128 GB SDXC memory card is attached to FreeBSD. The device is assigned to da0.

# dmesg
da0 at umass-sim0 bus 0 scbus7 target 0 lun 0
da0:  Removable Direct Access SCSI device
da0: Serial Number 1337ALLURBASE
da0: 40.000MB/s transfers
da0: 121942MB (249737216 512 byte sectors)
da0: quirks=0x2
da0: Write Protected

If you use the default FreeBSD disk partition control utility, then you might notice, that there seems to be an NTFS file system on the SD memory card. This is not true though. The reason is, that exFAT and NTFS share the same file system ID.

# gpart show da0
 =>       63  249737153  da0  MBR  (119G)
          63      32705       - free -  (16M)
       32768  249704448    1  ntfs  (119G)

You can gather even more information about the file system with the general FreeBSD command file.

# file -s /dev/da0
/dev/da0: DOS/MBR boot sector; partition 1 : ID=0x7, start-CHS (0x2,10,9), end-CHS (0x3ff,254,63), startsector 32768, 249704448 sectors, extended partition table (last)

A way to identify the file system or partition, that you will want to mount, on the file system is by using the ls command.

# ls /dev/da0*
/dev/da0 /dev/da0s1

Mount the exFAT formatted file system to FreeBSD.

If you have determined, that your SD memory card is in fact formatted with the exFAT file system, and, that FreeBSD has detected and assigned it as a device, then you can now use FUSE to mount and access the exFAT file system. If you have attached your SD card with the use of the camera or camcorder and a USB cable, then the file system should be mounted read-only by default.

# mount.exfat /dev/da0s1 /mnt
FUSE exfat 1.3.0
WARN: '/dev/da0s1' is write-protected, mounting read-only.

If you have attached your SD card with the use of a USB card reader, then you might want to mount it as read-only, so the file system is protected from changes. You should always let the camera format, delete and write data to the SD memory card, so optimal and stable operation is ensured.

# mount.exfat -o ro /dev/da1s1 /mnt
FUSE exfat 1.3.0

Find and copy files from SD card.

You can now access the recorded video clips and pictures, that are stored on the SD memory card, like you would do with any other data on your native file system. In this example, all MP4 video clips are copied from the SD card to a local directory. The time stamps are preserved.

$ mkdir -m 0700 ~/foobar
$ find /mnt -type f -name '*.MP4' -exec cp -pv {} ~/foobar \;
$ chmod 0600 ~/foobar/*.MP4

Unmount SD memory card.

When you are done with accessing the mounted exFAT file system, then you should unmount it before you deattach the card reader or camera from the computer or shuts down your computer.

# umount /mnt

Common mistakes, when dealing with exFAT formatted SD memory cards.

If you assume, that the memory card is formatted with FAT32 or similar MS-DOS like file system, then you will get an error, when you try to mount it with the default FreeBSD mounting tool.

# mount -t msdosfs /dev/da0s1 /mnt
# mount_msdosfs: /dev/da0s1: Read-only file system

If you assume, that the memory card is formatted with NTFS, then you will also get an error, when you install the FUSE NTFS implementation and try to mount it.

# pkg install fusefs-ntfs
# ntfs-3g /dev/da1s1 /mnt -o ro
NTFS signature is missing.
Failed to mount '/dev/da1s1': Invalid argument
The device '/dev/da1s1' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?

If you try to call the FUSE exFAT implementation from the default FreeBSD mount tool, then you will get an error message.

# mount -t exfat /dev/da1s1 /mnt
mount: /dev/da1s1: Operation not supported by device

If you use FreeBSD, or another operating system, to format the SD card manually, whether exFAT or NTFS, you might get the error message Cannot recognize this memory card. Format and use again., when you attach it to the camera or camcorder, or you might experience non-optimal operation.

# gpart destroy -F da1
da1 destroyed
# gpart create -s GPT da1
da1 created
# gpart add -t ms-basic-data da1
da1p1 added
# mkntfs -vf /dev/da1p1
# ntfs-3g /dev/da1p1 /mnt

If you upgraded FreeBSD to 13.0, then you will experience an error about FUSE. The reason is, that fuse has been renamed to fusefs. Fix this in loader.conf.

# mount.exfat -o ro /dev/da1s1 /mnt
FUSE exfat 1.3.0
fuse: failed to open fuse device: No such file or directory
# kldstat | grep fuse
# kldload fusefs
# mount.exfat -o ro /dev/da1s1 /mnt
# nano /boot/loader.conf

If you try to unmount, but the device is busy, you need to identify the proces, that has open files on the device, and kill it. See Unmounting a busy device on FreeBSD.

# umount /mnt/foobar
umount: unmount of /mnt/foobar failed: Device busy

More about exFAT and mounting SD memory cards on FreeBSD.

You can learn more about exFAT in WikiPedia’s article exFAT. How to mount FAT32 formatted SD memory card on FreeBSD by myself.

Would you like to treat me a cup of coffee?

If you would like to treat me a cup of coffee, then please consider making a small donation to My Bitcoin (BTC) Address. It would be greatly appreciated.