26.1 Windows File Systems
FreeBSD currently requires the user-space driver ntfs-3g for NTFS read/write, and the user-space driver fusefs-exfat for exFAT read/write; FAT32 is natively supported by the kernel for both reading and writing.
NTFS File System
NTFS is a file system developed by Microsoft, commonly used in Windows operating systems. FreeBSD provides full read/write support for NTFS through the fusefs-ntfs package (corresponding to Port filesystems/ntfs), facilitating access to and modification of NTFS-formatted storage devices.
Installing ntfs-3g
Install using pkg:
# pkg install fusefs-ntfsAlternatively, build through the Ports system:
# cd /usr/ports/filesystems/ntfs
# make BATCH=yes install cleanConfiguring ntfs-3g
Insert an NTFS-formatted device, such as a USB flash drive, into the computer. The device name can then be identified, for example da0 (corresponding to the device file /dev/da0p1).
Edit the /etc/rc.conf configuration file to add the fusefs kernel module to the system startup load list:
# sysrc kld_list+="fusefs"The above command makes the configuration persistent. To apply it immediately, run:
# kldload fusefsManual Mounting
To manually mount an NTFS partition:
Use ntfs-3g to mount /dev/da0p1 to /mnt, set read/write permissions, and specify appropriate owner and permission mask for files:
Perform some read/write operations:
Automatic Mounting
NTFS partitions can be configured to mount automatically at boot.
Edit the /etc/fstab file and add the following mount information:
Verify the mount status:
Then view the file contents:
Appendix: Formatting a New Device as NTFS
First, a partition table must be created: the device can be set up with either an MBR or GPT partition table.
MBR partition tables are older, so the GPT scheme is used in the following demonstration.
Creating an MBR Partition Table
Creating a GPT Partition Table
Formatting an NTFS Partition
Warning
mkntfswill format the specified partition, and all data on the partition will be permanently lost. Please confirm the device path is correct.
Create an NTFS file system on the /dev/da0p1 partition:
Parameter description:
-f: fast format-v: verbose outputNTFS_USE_UBLIO=0: UBLIO (User space Block I/O) is a user-space block I/O library used to improve FUSE file system performance. However, in the FreeBSD environment, UBLIO may cause file system corruption and data loss when working with ntfs-3g. In this example, without this parameter to disable UBLIO, the command will become unresponsive.
References
FAT32 File System
The FAT file system is simple and reliable. Although it falls behind modern solutions in performance, reliability, and scalability, it remains a common choice for data exchange between devices due to its availability across multiple operating systems.
When using the gpart show command, FAT32 file systems are typically displayed as the ms-basic-data type.
The following command displays detailed information about the nda1 disk and its partitions, including start position, size, and type:
Note
The file system type must be explicitly specified for mounting.
Mount the /dev/nda1p3 partition as an msdosfs file system:
The
-vparameter is used for verbose output;The
-tparameter is used to specify the file system type.
List the contents of the mount directory:
When no longer needed, unmount the file system:
exFAT File System
exFAT (Extended File Allocation Table) is a lightweight file system optimized for flash storage devices (such as USB drives and SD cards). It supports large-capacity files and is widely used across multiple platforms, making it suitable for external storage devices.
To use exFAT on FreeBSD, install the filesystems/exfat package, load the FUSE kernel module, and mount the file system as follows:
Installing the exFAT Package
Install the exFAT package using pkg:
Install using Ports:
Loading the fusefs(4) Kernel Module
Before using FUSE file systems, the fusefs(4) kernel module must be loaded:
Use sysrc(8) to configure the module to load automatically at boot:
Formatting a Disk as exFAT File System
The Port filesystems/exfat-utils must be installed separately; it provides the mkexfatfs tool for formatting disks to exFAT format.
Create a GPT partition table
Create a partition containing all remaining space
Format as exFAT
The -n option specifies the volume label Mytest.
Verify the file system used by the /dev/ada1p1 partition:
Test Mounting an exFAT Volume
Mount the exFAT volume by specifying its FreeBSD partition name and an existing mount point. The following example mounts /dev/ada1p1 to /mnt:
Verify the exFAT volume mount status:
Try reading and writing some files:
References
FreeBSD Project. ntfs-3g manpage[EB/OL]. [2026-03-25]. https://man.freebsd.org/cgi/man.cgi?query=ntfs-3g&sektion=8. Official technical documentation for ntfs-3g, describing parameter configuration and usage.
Stephen Sherratt. NTFS on FreeBSD[EB/OL]. [2026-03-25]. https://www.gridbugs.org/ntfs-on-freebsd/. A systematic explanation of the technical implementation for mounting NTFS file systems on FreeBSD.
FreeBSD Forums. Why fstab file does not recognize NTFS commands?[EB/OL]. [2026-04-19]. https://forums.freebsd.org/threads/why-file-fstab-file-does-not-recognize-ntfs-commands.91972/. Discussion of NTFS parameters in the fstab file.
Last updated