9

Today I installed a fresh copy of Ubuntu 20.04 (GNU/Linux 5.4.0-1008-raspi aarch64) on my Raspberry PI, and I know that exFAT should be supported by the 5.4 kernel, but whenever I try to mount an external drive, I get an error

$ sudo mount -t exfat /etc/sda1 /media/wd
mount: /media/wd: unknown filesystem type 'exfat'.

And here is the output of cat /proc/filesystems

nodev   sysfs
nodev   tmpfs
nodev   bdev
nodev   proc
nodev   cgroup
nodev   cgroup2
nodev   cpuset
nodev   devtmpfs
nodev   configfs
nodev   debugfs
nodev   tracefs
nodev   securityfs
nodev   sockfs
nodev   bpf
nodev   pipefs
nodev   ramfs
nodev   devpts
    ext3
    ext2
    ext4
    squashfs
    vfat
nodev   ecryptfs
    fuseblk
nodev   fuse
nodev   fusectl
nodev   mqueue
nodev   pstore
    btrfs
nodev   autofs

Do you need to do anything additionally to enable the support for exFAT?

Thank you

8 Answers8

8

I had the same issue after having the fuse drivers installed in an earlier version then upgrading to 20.04 and removing the fuse drivers. cat /proc/filesystems | grep fat does not show exfat.

I re-installed the kernel module included with 20.04 using: sudo modprobe -v exfat

cat /proc/filesystems | grep fat now shows exfat. Then to make it survive a reboot, I added exfat to /etc/modules-load.d/modules.conf

Kevin Bowen
  • 20,055
  • 57
  • 82
  • 84
David
  • 89
2

Here's something you can try. Since the GNU/Linux 5.4.0-1008-raspi aarch64 kernel doesn't seem to have the support for exFAT built in, you can add it. From https://www.techrepublic.com/article/try-out-this-new-linux-exfat-kernel-module-for-improved-performance/ you can follow the steps to download and install the exFAT support for the kernel.

Install git if it is not installed:

sudo apt install git

You may also want the build-essential package:

sudo apt install build-essential

Next, download the exfat-linux:

git clone https://github.com/arter97/exfat-linux

Enter the newly created folder which should be cd exfat-linux

Then run the following to install the kernel module and make it active:

make
sudo make install
sudo modprobe exfat

Now when you run cat /proc/filesystems you should see exfat at the bottom of the list.

Terrance
  • 43,712
2

Here's the fix I found on my amd64 Ubuntu 20.04.

The fuse support gets called first if you have exfat-fuse installed.

  1. I renamed /sbin/mount.exfat.fuse to /sbin/mount.exfat.fuse-save
  2. I renamed /sbin/mount.exfat-save to /sbin/mount.exfat-save (so if I screw up I can revert them)
  3. I checked that exfat.ko existed in /lib/modules/5.4.0-29-generic/kernel/drivers/staging/
  4. I insmod-ed the exfat.ko (which I found wasn't necessary after the renaming of the mount commands above.
  5. I called /bin/mount to add the external drive and it mounted.
  6. I called umount to remove the mounted filesystem.
  7. I rmmod'd the exfat.ko and checked it just worked without insmod being forced.
  8. I apt removed exfat-fuse and removed the two saved renamed mount files above since they get called BEFORE the system mount command.

Hope that helps some folks. I think that were all the troubleshooting steps.

Ubuntu should put this in the release notes so others don't have the old fuse-mount versions loading first.

1

The new exFAT kernel driver was in Staging in 5.4 and fully released in 5.7.

See: https://www.omgubuntu.co.uk/2019/11/linux-5-4-kernel-release-features https://www.omgubuntu.co.uk/2020/06/linux-5-7-kernel-features

1

For me I had to run sudo apt install exfat-utils before it stopped being greyed out.

domc
  • 46
0

Distilling the above answers to their simplest form, for 20.04:

sudo apt install exfat-utils
sudo apt remove exfat-fuse
sudo mount -t exfat /dev/sde1 /mnt/exfat

Of course, mounting by UUID is better than /dev/sdX1 as the names change depending on what's plugged in first.

Joe Inwap
  • 461
0

Using Ubuntu 20.04 with kernel 5.14 I gave up on the old gparted and just used parted;

B="/dev/sda"
sudo modprobe exfat
sudo parted "$B" mktable msdos
sudo parted "$B" mkpart primary 0% 100%
sudo mkfs.exfat "${B}1"
0
$ sudo mount -t exfat /etc/sda1 /media/wd

etc... to be replace with dev and it will work. Even on Ubuntu Core it works out of the box.

Artur Meinild
  • 31,035