HowTo mount a extFAT filesystem on FreeBSD
Simple things can be very inconvenient sometimes.
I „just“ wanted to copy data from my USB pen-drive to my Synology DiskStation. To be possible to put data on the stick form every operating system I’m using it on (Mac OSX and sometimes Microsoft Windows) I’ve formatted it as extFAT, which does not have the silly limitations like the normal FAT filesystem.
The problem was that of course the DiskStation wasn’t able to read the filesystem on the pen-drive. So I decided to boot up my FreeBSD test server, which is the only machine that is attached to my router via ethernet and does not need to copy the data over the wifi (it was about 27GB and my wifi isn’t – unfortunately – very robust).
So here is a short HowTo that describes the process to install the needed stuff on FreeBSD to read and write ExFAT filesystems.
1. Install the fusefs-exfat port:
I’m using postmaster to install the ports on FreeBSD which makes the process more convenient. See the official FreeBSD guides to figure out which solution you’d like to use and how.
cd /usr/ports portmaster sysutils/fusefs-exfat
2. Enable fusefs stuff:
echo 'fuse_enable="YES"' >> /etc/rc.conf
3. Find the device:
You need to find out which device your pen-drive is assigned to:
For me it gave the following output:
<Samsung SSD 840 EVO 120GB EXT0BB6Q> at scbus0 target 0 lun 0 (ada0,pass0) <JetFlash Transcend 32GB 1100> at scbus6 target 0 lun 0 (da0,pass1)
The first line is the internal SSD of my server and the second one my pen-drive. So the important info here is the
da0 which tells me I can use
/dev/da0s1 as the device to access the first partition. But you could figure out all available partitions by running:
ls -l /dev/da0*
For example the result will be something like this:
crw-r----- 1 root operator 0x71 Mar 28 18:56 /dev/da0 crw-r----- 1 root operator 0x72 Mar 28 20:33 /dev/da0s1
The first line here is the device itself and the second one is the first and only partition.
4. Mount the device:
I would like to mount the device unter
/mnt/usb so I had to create the directory first. But you could also mount it simply to
After this I could use the special mount command provided by fusers:
mount.exfat /dev/da0s1 /mnt/usb
And we’re done. Please note that most commands in this HowTo will only work if you have root permissions.
Now I could copy my files using
scp from the FreeBSD server to my DiskStation.