====== Working with and using exFAT Filesystems ======
Many high capacity (>= 64Gb) portable media (microSDXC/SDXC/USB drives) use the [[wp>exFAT]] file system these days. A bit of work is required to get things working under Gentoo, hopefully this page will be of some use to others.
===== Overview =====
This particular file system type is handled under GNU/Linux using the [[wp>Filesystem_in_Userspace|FUSE]] (Filesystem in Userspace).
===== Kernel =====
You need to enable support for [[wp>Filesystem_in_Userspace|FUSE]] in your kernel.
File systems ->
<*> FUSE (Filesystem in Userspace) support
Save your configuration recompile your kernel and reboot.
===== Userspace Programs =====
You'll need a few filesystem and userspace tools installed too in order to detect, mount and work with FUSE filesystems
emerge -av sys-fs/fuse-exfat sys-fs/udisks
This will also pull in ''sys-fs/fuse'' which is a dependency.
===== Mounting and read/writing =====
Once you've updated your kernel support for FUSE and installed the required tools you're ready to mount the drive. Insert your media into your card-reader (or equivalent) and from a command prompt check what device it is with either ''dmesg'' or ''cat /proc/partitions'' (it should be the last item listed in the later as you will have only just inserted the drive). You now need to add a line to ''/etc/fstab'' to tell your system where to mount the device, I use ''/mnt/usb2'' so have the following in my ''/etc/fstab''
/dev/sdh1 /mnt/usb2 auto noauto,rw,users 0 0
Assuming the device is assigned to ''/dev/sdh1'' you can now issue the following command (hopefully as a user, if not add yourself to the ''users'' group in the ''/etc/group'' file) to mount the drive...
$ udisksctl mount -b /dev/sdh1
Mounted /dev/sdh1 at /mnt/usb2.
You should now be able to copy files too and from the storage without any permissions problems (something I couldn't work around with a simple ''/etc/fstab'' entry).
===== Links =====
* [[wp>exFAT]]
* [[wp>Filesystem_in_Userspace|FUSE]] (FileSystem in UserSpace)
* [[https://forums.gentoo.org/viewtopic-t-936634-start-0.html|Gentoo Forums : exFAT and FUSE]]