How to enable exFAT in Ubuntu

Ashton Mills
14 May 2011, 9:00 AM


We show you how to take advantage of the exFAT filesystem and all its benefits for your Ubuntu setup in just a few simple steps.


Today's modern filesystems were built with spinning-disk hard drives in mind. This is true for Linux's Ext2/3/4, Windows' NTFS, and server filesystems like XFS and ZFS. And, of course, so was the original FAT though it wasn't so much optimised, more simply being one of the first filesystems designed to address magnetic media.

However it's the simplicity of FAT that makes it attractive for the new generation of storage mediums based on flash memory. Usually, flash memory devices (think SD/memory cards and USB keys) don't have the fastest interfaces to the computer, and any overhead a filesystem introduces simply slows it down. And, because flash storage devices don't often approach the volume of spinning-disk drives, you don't need advanced filesystems to handle them.

FAT has its limitations, of course, which is why Microsoft's extended FAT32 is the de-facto for flash storage, providing the ability to address up to 2TB using traditional 512-byte sectors, while maintaining the simplicity and speed of FAT. Though, of course, it also lacks features that modern filesystems have such as security and journaling - but these aren't often needed for flash storage.

However while having served well for some time now, FAT32 has its limitations too - mainly the inability to handle single files larger than 4GB. As a filesystem it's also not the most efficient, and can slow down dramatically when large volumes of files are stored in a directory.

Which is why Microsoft introduced exFAT in Windows Vista and Windows 7. exFAT is built on the simplicity of FAT but designed specifically for large volume flash media, the type of which we now find in memory cards for cameras, portable USB drives and so on.

exFAT is faster than FAT32 and does a better job of maintaining speed with large volumes of files. In other words, if you're carrying around and regularly use USB keys or memory cards, you should be probably be using exFAT to make the most of them.

Which is all fine and dandy, except that Linux can't read exFAT volumes. At least, not without a little extra help.

So, if your USB key carrying escapades include transferring data between mixed-environment systems, you've got a bit of a problem.

While Linux has long had support for FAT and FAT32, as a new proprietary filesystem we've had to wait for the development of a reverse-engineered version of the exFAT driver to get support under Linux. Development versions of the Linux exFAT have been available over the past year, but you needed to compile it yourself and futz around with setting it up. Now, however, the driver has matured and thanks to a PPA (Personal Package Archive) can be installed and used in Ubuntu in just a few steps.

Formatting for exFAT

While the Linux exFAT driver supports reading and writing to exFAT volumes, it's so new there isn't currently support for creating exFAT volumes. So, for the moment, you'll need to start using an exFAT volume by first formatting the device in Windows Vista or Windows 7. This is easy enough to do by simply plugging in the drive, right-clicking on it in My Computer, and selecting 'Format'. When the dialog appears, choose exFAT as the filesystem.


Formatting in Windows 7 for exFAT.

Installing and mounting

To install ExFat support in Ubuntu, pull up a console (‘Applications > Accessories > Terminal’) and run:

sudo -s
apt-add-repository ppa:relan/exfat
apt-get install fuse-exfat

The driver uses the FUSE (filesystem in userspace) framework. For it to work, FUSE needs to be enabled in the kernel. If you use the stock Ubuntu kernels then this is the default, so you don't have to do anything else. If you roll your own drill down to ‘Filesystems > FUSE’ and either compile it in statically or enable it as a 'M'odule, then compile and install your kernel.

While available as a module, Ubuntu won't know to automatically use the driver when you insert an exFAT device. For now you'll need to manually mount the device and specify the exFAT filesystem. Plug in your device and run:

cat /proc/partitions

Chances are your USB device will be the last partition listed. You can also check by looking at its size and seeing if it matches the size of your USB key.

Next make a temporary directory where you can mount the device. Ubuntu by default attaches removable media under the /media directory, so you might as well do the same. Enter the following:

cd /media
sudo -s
mkdir usbdrive
mount -t exfat /dev/sdd1 usbdrive

The drive will appear on your desktop, and you can read and write to it like any other. To safely unmount it before removing, use 'sudo umount usbdrive' from the same directory.


Mounting an exFAT filesystem.


Post your comment



Comments

RSS feed Email alert

Bob-El (New user):

It doesn't work. After running "apt-get install fuse-exfat" I get the following message:
E: Unable to locate package exfat

08 September 2011, 8:37 AM (1 year ago)report abuse Send to a friend reply

Bob-El (New user):

Ah! I have it. You forgot to include running "apt-get update" after the repository is installed.

08 September 2011, 8:43 AM (1 year ago)report abuse Send to a friend reply

sjosul (New user):

In Oneiric (beta 1), once exfat-fuse is installed (ensure repo is natty not oneiric at this stage), drive mounts automatically.

11 September 2011, 11:50 AM (1 year ago)report abuse Send to a friend reply

Bob-El (New user):




Quoting sjosul:
In Oneiric (beta 1), once exfat-fuse is installed (ensure repo is natty not oneiric at this stage), drive mounts automatically.


Thanks. I guess I'll have to wait for a few more weeks.

11 September 2011, 11:41 PM (1 year ago)report abuse Send to a friend reply

RaptorsFAN (New user):

I like this youtube video below and it helped me enable exFAT in Ubuntu. You might wanna watch it form the 1min,45 seconds time of the video because in the begging it shows how to format it as exFAT in XP before you mount it in Ubuntu Linux!

http://computersguide.blogspot.com/search/label/exFAT%20for%20Linux

21 September 2011, 7:11 AM (1 year ago)report abuse Send to a friend reply

rafamg (New user):

Many thanks man, worked pretty well!
Just make sure you do an "apt-get update" before trying "apt-get install fuse-exfat" so it knows where the package is located.

19 October 2011, 1:45 PM (1 year ago)report abuse Send to a friend reply

Shmee007 (New user):

Awesome thanks, picks up drive automatically in Xubuntu 11.10 once driver is installed!

24 October 2011, 3:06 AM (1 year ago)report abuse Send to a friend reply

Erik666 (New user):

I don't know if it works for anyone, but since I did it multiple times, on multiple pc's, I guess so

this guide might be outdated so, just running
sudo su
apt-add-repository ppa:relan/exfat
apt-get update
apt-get install fuse-exfat

should be enough to be able to mount your drive by using the file explorer, just like any non exfat drive...

you don't have to bother about looking up the partitions or something.

perhaps someone can update this guide?
for me it is the first hit when I google "ubuntu exfat support"
it could be nice to get a complete correct answer at your first hit, it explains it quite well in fact.

22 March 2012, 8:54 PM (1 year ago)report abuse Send to a friend reply

Andrew Boyd (New user):

it nearly worked, then I thought: "maybe this doesnt need that gap"

mount -t exfat /dev/sdd1 usbdrive
mount -t exfat/dev/sdd1 usbdrive

and it worked!!

thank you thank you thank you :-)

07 July 2012, 9:06 PM (10 months ago)report abuse Send to a friend reply

Andrew Boyd (New user):

it nearly worked, then I thought: "maybe this doesnt need that gap"

mount -t exfat /dev/sdd1 usbdrive
mount -t exfat/dev/sdd1 usbdrive

and it worked!!

thank you thank you thank you :-)

07 July 2012, 9:08 PM (10 months ago)report abuse Send to a friend reply

Spygrass (New user):

code to read exFAT saved drives on Linux mint 13 :

this worked for me:

In the Terminal right the following commands:

sudo su
apt-add-repository ppa:relan/exfat
apt-get update
apt-get install fuse-exfat

15 July 2012, 7:36 PM (10 months ago)report abuse Send to a friend reply

anonymous user Anonymous user