Raspberry Pi exFAT: Adding Support for exFAT File System

In this Raspberry Pi exFAT guide, we will be showing you how you can enable support for the exFAT file system format on your Raspberry Pi.

Raspberry Pi exFat

For those who do not know, exFAT (Extended File Allocation Table) is a proprietary file system format developed by Microsoft, and is designed to be optimal for flash memory such as USB flash drives and SD cards.

Due to exFAT being patented by Microsoft it cannot become an official part of Linux despite a kernel implementation being released by Samsung. Due to this limitation, we must implement support for the exFAT file system another way.

This limitation is where the FUSE kernel implementation comes in handy. FUSE will allow us to implement support for the exFAT format without having to recompile the kernel.

There are many reasons why you might need to enable exFAT support on your Raspberry Pi. For example, you might need it for when you set up a Samba server with the Raspberry Pi. You may also need it for other projects such as running Owncloud or basically anything that may require removable media.

Equipment List

Below are all the pieces of equipment that I made use of for this Raspberry Pi exFAT tutorial.

Recommended

Optional

Adding Support for exFAT

1. Before we get started with adding support for the exFAT file system to our Raspberry Pi, we must first ensure that our Raspberry Pi operating system is completely up to date and has the latest package list.

To update the Raspberry Pi and grab the package list we need to enter the following two commands into the terminal. You can do it by either using the terminal on the Pi itself or over SSH.

sudo apt update
sudo apt upgrade

2. Now that we have updated the Raspberry Pi and have grabbed the latest package list we can now install the packages we need.

To enable support for the exFAT file system on the Raspberry Pi, we will need to utilize two particular packages.

The two packages that we will be installing to the Pi is exfat-fuse and exfat-utils. These two packages work together to allow the operating system to talk to hard drives that are in the exFAT format.

Exfat-fuse works as a module to FUSE (Filesystem in Userspace) software system that allows the Raspberry Pi OS to mount and interpret exFAT drives without requiring extra privileges.

FUSE acts as a bridge between the kernel and userspace to allow developers to add support for additional file systems without having to release a customized kernel.

Additionally, thanks to FUSE being baked into the Raspberry Pi OS kernel we are not required to install any special kernels to add support. This makes this Raspberry Pi exFat tutorial a lot easier.

Exfatprogs provides all the utilities that you need to be able to deal with the exFAT format, including the ability to format drives on your Linux devices.

To install these two essential packages, we need to enter the following two commands into the terminal.

sudo apt install exfat-fuse
sudo apt install exfatprogs

Mounting an exFAT Drive Manually from Terminal

1. While Raspberry Pi OS should automatically detect and mount your exFAT drives after installing the previous two packages, there may be a time where you have to mount it manually.

Mounting an exFAT drive can’t be done in the same way you would mount any other partition. Instead, you will be utilizing the “-t exfat” argument to tell the mount command to recognize the file system as exFAT.

To begin, we must first create a folder where we will mount our desired drives. For our tutorial, we will be just calling this folder exfat.

Create this new exfat folder by running the following command on the Raspberry Pi.

sudo mkdir /media/exfat

2. With the folder now created we need to mount a drive. In our example below, we have already found where our device is located, in our case, this is “/dev/sdb1“.

To mount the device to the folder we created in the previous step, we need to utilize the following command. We need to reference the SD Card location, the folder location and that we want to utilize exFAT.

sudo mount -t exfat /dev/sdb1 /media/exfat

3.  You should now be able to interact with your device at the “/media/exfat” location.

Automatically Mounting an exFAT Drive

1.  If you wish to have the drive automatically mounted at boot, then you need to edit the fstab file. Make sure you back up this file as mistakes may cause your Pi to fail when booting.

You can find the fstab file at the following location.

sudo nano /etc/fstab

If you’re unsure of what to add then check out the tutorial on mounting a USB drive. Just make sure you specify exfat as the file system.

Below is an example of an exFAT fstab entry. You can find the UUID by using the “sudo blkid” command.

UUID=CA1C-06BC /media/exfat exfat defaults,auto,umask=000,users,rw 0 0

Formatting a Drive as exFAT

1. If you want to format your drive in the exFAT format, then you can do this by utilizing a piece of software that came in the “exfatprogs” package.

This piece of software is called mkfs.exfat, to use it you need to specify a drive location as we have shown in the command below.

mkfs.exfat /dev/sdb1

Once this command has finished your drive will now be formatted exFAT. Keep in mind that formatting a drive will erase anything on it.

We hope by the end of this Raspberry Pi exFAT tutorial you should now be able to successfully utilize exFAT formatted filesystems on your Raspberry Pi. If you have any thoughts, feedback or anything else then be sure to leave a comment below.

Leave a Reply

Your email address will not be published. Required fields are marked *

8 Comments

  1. Avatar for stseraf
    stseraf on

    I receive an error when trying to install exfat-utils:
    E: Package ‘exfat-utils’ has no installation candidate

    I also see package in no more available by the link: https://packages.debian.org/stretch/exfat-utils – so this article is outdated?

    Can somebody suggent me what to do to support exFAT on raspi (I’m using Pi 4 with Pi OS Lite 64-bit relased 2023-12-11)

    1. Avatar for Emmet
      Emmet on
      Editor

      Hi stseraf,

      Thank you for the heads up. At some point it looks like the “exfat-utils” package was renamed to “exfatprogs”.

      I have quickly updated the tutorial to reflect this change.

      Kind regards,
      Emmet

  2. Avatar for Svein Are Karlsen
    Svein Are Karlsen on

    The FUSE exFat driver feels like a terrible mess to me right now… Especially on low powered devices like the Pi family…

    The CPU overhead during file transfers is so high that it will max out the CPU on a Raspberry Pi 4… The OS was just etched to the card, and then upgraded with the latest packages..
    Then I installed exfat-utils and exfat-fuse..

    Then I did a reboot before mounting the drive and started testing…

    CPU load bounced wildly up and down between 100% and 65% on all CPU cores and that slows everything down even more…

    1. Avatar for Louie
      Louie on

      Is this still an issue?

    2. Avatar for Emmet
      Emmet on
      Editor

      Hi Louie,

      Unfortunately this will always be a potential issue with the FUSE-exfat driver just due to the way it works.

      Cheers,
      Emmet

  3. Avatar for James
    James on

    Hi,

    There’s an error in the second chapter : the first package to install isn’t fuxe-exfat but exfat-fuse.

    Regards.

    1. Avatar for Gus
      Gus on
      Editor

      Thank you for pointing that out! We have fixed the naming, so it is now correct.

  4. Avatar for Zip Freeman
    Zip Freeman on

    Hey, I was having trouble here: sudo mount -t exfat /dev/sdb1 /media/exfat, I kept getting
    fuse: device not found, try 'modprobe fuse'

    Turns out my raspberry pi kernel was an older one.

    To update my kernel:

    sudo apt update
    sudo apt install --reinstall raspberrypi-bootloader raspberrypi-kernel

    (https://www.raspberrypi.org/documentation/linux/kernel/updating.md)

    Then reboot.

    After that I was able to mount.