Enable Support For NTFS In FreeBSD 13

By Leonard Cucos •  Updated: 11/04/21 •  6 min read

If you are a Windows or Linux user exploring FreeBSD for the first time, you may find that the support for NTFS in FreeBSD is not configured by default.

In this tutorial, we are going to learn how to mount NTFS partitions in FreeBSD with read & write permissions.  

And this is no accident. FreeBSD is intended to be shipped bare-bones and gives its users the maximum degree of freedom to customize the system accordingly to their needs. 

The process of adding support for NTFS in FreeBSD is straightforward and can be done in various ways. In this guide, I am going to show you two methods simple to implement methods.

IMPORTANT: Backup your system before proceeding further using beadm utility in FreeBSD or any other backup alternative at your disposal.

METHOD 1: NTFS in FreeBSD with FUSE

This method requires installing the fusefs-ntfs module on FreeBSD 13 or later. Both internal and external NTFS drives can be mounted automatically at the boot if you choose so.

  1. Login as root by executing the following command in the terminal:
su -
  1. Search the fusefs-ntfs package available on the FreeBSD repository:
pkg search fuse | grep ntfs
NTFS in FreeBSD 13 - Install Fuse. Source: nudesystems.com
  1. Install the latest version of fusefs-ntfs available on the FreeBSD repository:
pkg install fusefs-ntfs-2017.3.23
  1. Load the fusefs kernel module in your system:
kldload fusefs

At this moment, you should be able to access your NTFS disks in FreeBSD, both internal or external drives. 

If you want the fusefs module to be automatically loaded at boot, continue with the following step:

  1. To load the fusefs kernel module each time you boot your FreeBSD system, you need to edit the /boot/loader.conf using the following command:
ee /boot/loader.conf

Add the following line at the bottom of the /boot/loader.conf file:

fusefs_load=”YES”
NTFS in FreeBSD 13 - Configure Fuse. Source: nudesystems.com

To save and exit the /boot/loader.conf file, type the ESC key and type the letter “a” twice.

NOTE: Starting with FreeBSD 13, fuse and fuse.ko was replaced with fusefs kernel module. 

[Optional] Test if the fusefs kernel module is loaded at boot by gracefully rebooting your system with the following command:

reboot -r

Your system should automatically mount your NTFS drives in FreeBSD.

I am using FreeBSD with KDE and the Dolphin file manager can access both internal and external NTFS disks with read & write permission without any problem.

Access NTFS in FreeBSD 13 [KDE]. Source: nudesystems.com

That’s it. You just enabled NTFS drive support in FreeBSD 13 and later.

In case you don’t use any Desktop Environment or Window Manager on FreeBSD, you can mount and access your NTFS disks/partitions via terminal. Continue as follows: 

6. Find out the device ID of your disk using the command below. In this case, I am looking to mount a portable USD Seagate disk, where the assigned device ID is ad0 [direct access].

dmsg
NTFS in FreeBSD 13 - List Drives. Source: nudesystems.com

NOTE: If you are looking to mount an internal disk, your device ID might be listed as ada [advanced direct access] followed by a number (e.g., 0).

7. Use gpart to show the partitions and their type for the respective device ID.

gpart show /dev/da0

As you can see in the output below, the /dev/da0 disk has only one partition – ms-basic-data [Microsoft basic data]. 

NTFS in FreeBSD 13 - List Partition Types. Source: nudesystems.com

8. List the device nodes on the target disk. This command allows us to find the node device for the partition identified above.

ls -l /dev/da0*
NTFS in FreeBSD 13 - List Nodes. Source: nudesystems.com

9. Mount the NTFS partition in FreeBSD by issuing the command:

ntfs-3g /dev/da0s1 /mnt -o rw

Alternatively, you can mount the partition in read-only mode using the -o ro switch:

ntfs-3g /dev/da0s1 /mnt -o ro

Note that the above commands are mounting the partition in /mnt. 

10. To list the content on your NTFS partition use:

ls /mnt

11. To unmount the disk use:

umount /mnt 

You might also want to check How To Disable sendmail in FreeBSD

METHOD 2: NTFS in FreeBSD With DSBMC

DSBMC is a Qt5 client that uses the DSBMD daemon to mount and unmount various file systems and disk images. It also provides features like configuring the reading speed of CD/DVD drives.

You can install DSBMC via pkg, ports, or compile it from git [link below].

We can use the DSBMV graphical client to mount NTFS drives in FreeBSD. In this section, we will cover how to install and configure DSBMV in FreeBSD using pkg.

  1. Open a terminal and log in as root:
su -
  1. Install DSBMC on FreeBSD:
pkg install dsbmc

Alternatively, you can install DSBMC from FreeBSD ports using the following command:

cd /usr/ports/sysutils/dsbmc/ && make install clean
  1. Enable vfs.usermount by executing:
sysctl vfs.usermount=1
  1. Make this change permanent by adding vfs.usermount=1 at the bottom of the /etc/sysctl.conf file. 

NOTE: This enables DSBMD to mount media as a normal user and allows you to unmount devices that you have mounted without requiring special permissions. You will also be able to use your file manager to unmount disks.

ee /etc/sysctl.conf
NTFS in FreeBSD 13 - Configure DSBMD. Source: nudesystems.com

Press the ESC key once and type “a” twice to save and exit the file.

  1. Enable DSBMD daemon at boot by executing the following command:
sysrc dsbmd_enable=YES
  1. Start DSBMD daemon in your system so you can use it right away:
service dsbmd start

[Optional] Test if the configuration is persistent on reboot by issuing the following command to gracefully reboot your system:

reboot -r
  1. Launch DSBMD from your menu or by executing the dsbmc command in the terminal. Right-click on the NTFS disk you want to mount and select the Mount option in the menu.
NTFS in FreeBSD 13 - Mount NTFS drives using DSBMD. Source: nudesystems.com
  1. Double-click on the mounted disk to open it in your file explorer.

If you are using KDE or XFCE, you can click on the DSBMD icon on your taskbar, and select Mount and Open for the NTFS disk you want to access in FreeBSD.

NTFS in FreeBSD 13 - Mount and Open NTFS drives using DSBMD. Source: nudesystems.com

Wrapping Up

As you can see, adding support for NTFS in FreeBSD is not difficult at all. Once you set up FUSE or DSBMC on your system, you are good to go.

Of course, you could install Windows or a flavor of Linux that comes with FUSE preinstalled [e.g., Pop!_OS, Fedora, Manjaro, etc.] and access your NTFS disk from there, but I don’t consider this to be an elegant nor permanent solution.

I hope you found this FreeBSD guide useful. If you are looking for more useful tutorials like this, check the FreeBSD section of this website.

Stay safe! 

Leonard Cucos

Leonard Cucos is an engineer with over 20 years of IT/Telco experience managing large UNIX/Linux-based server infrastructures, IP and Optics core networks, Information Security [red/blue], Data Science, and FinTech.

medyum