Cannot create files on exfat card / 10-stable

Kevin Oberman rkoberman at
Wed Jun 25 20:48:23 UTC 2014

> Hi all,
> I just got my first exfat formatted sdxc card.
> If I mount it with (as root) mount.exfat /dev/da2s1 /mnt I can read the
> content, create *directories*, but *not files*???
>     root at marcopolo:/mnt # touch test1
>     touch: test1: Invalid argument
>     root at marcopolo:/mnt # mkdir test1
>     root at marcopolo:/mnt # touch test1/test
>     touch: test1/test: Invalid argument
>     root at marcopolo:/mnt # ll -d test1
>     drwxr-xr-x  1 root  wheel  131072 16 Feb 19:46 test1/
>     root at marcopolo:/mnt # ll test1
>     total 0
> Shouldn't this work?
> I rebuilt fusefs-lib and fusefs-exfat with gcc48, same result...
> This is on a recent stable:
> marcopolo% uname -a
> FreeBSD marcopolo 10.0-STABLE FreeBSD 10.0-STABLE #14 r261827: Thu Feb
> 13 13:13:01 CET 2014     mathiasp at marcopolo:/usr/obj/usr/src/sys/GENERIC
> amd64
> The card is a Sandisk Extreme MicroSDXC 64Gb. Works fine in my phone.
> Any tips, hints, experiences?
> Thanks, Mathias

I have no answer as I found this message in the archive while researching
the root cause of the problem.

Workaround: After writing to the device on FreeBSD, put the card into a
Windows system. (It will also be usable to write to the device.)
Open an explorer (not Internet Explorer) window
Right click on the ExFAT device
Select "Properties"
In the Properties window, select the "Tools" tab
In the tools window click "Check now"
In the disk check window click start
No errors should be found, but the disk will now be writable on Windows.
Note that the directories you appeared to be creating on FreeBSD will be
Eject the media and mount it on the FreeBSD system I t will be writable
until it is re-mounted.

I believe the problem is that unmounting the file system fails to mark the
fs as clean. You might notice that a message that the device was not
cleanly dismounted is printed to the console and messages when the device
is re-mounted on FreeBSD. There is no fsck for ExFAT, so I need to use
Windows to do the same job.

It looks like all that is needed is to clear the second bit of byte 106 of
the VBR (block 0). I will try this some day when I am feeling brave.

I'd love to see this fixed
R. Kevin Oberman, Network Engineer, Retired
E-mail: rkoberman at

More information about the freebsd-questions mailing list