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.
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 and camcorders, such as Sony FDR-AX43, FDR-AX53 and FDR-AX60, formats SDXC memory cards to the exFAT file system.
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.
# pkg install fusefs-exfat # nano /boot/loader.conf fuse_load="YES" # reboot
Attach the SD memory card and determine the FreeBSD device.
Insert the SD memory card in your camera, camcorder or card reader, and connect it by using a USB cable. FreeBSD will recognize the new device or devices.
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 will see, that 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 ID.
# gpart show da0 => 63 249737153 da0 MBR (119G) 63 32705 - free - (16M) 32768 249704448 1 ntfs (119G) # 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)
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
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.
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
More about exFAT.
You can learn more about exFAT is WikiPedia’s article exFAT.