The exFAT file system in Linux & beyond

Here is where you can post tips and tricks to share with other users of MX. Do not ask for help in this Forum.
Post Reply
Message
Author
User avatar
handy
Posts: 611
Joined: Mon Apr 23, 2018 2:00 pm

The exFAT file system in Linux & beyond

#1 Post by handy »

Note: Please let me know if there are any problems in the following:

exFAT Filesystem, what is it?

Microsoft created the exFAT (Extended File Alocation Table) filesystem https://en.wikipedia.org/wiki/ExFAT to make up for the inadequacies of FAT32 (4GB file size limit) & NTFS (read only from OS/X), as it can hold large files, large numbers of files & use very large partitions.

For details on which versions of Windows & OS/X can relate to exFAT, & other details about exFAT, please see this wiki page: https://en.wikipedia.org/wiki/ExFAT

The exFAT FS does not use journaling, though there is an optional TexFAT component available, it is not at this stage compatible with desktop GNU/Linux systems. More info' on TexFAT can be found here: https://en.wikipedia.org/wiki/Transacti ... ile_System

Having no journal makes the data on such a filesystem more vulnerable to irreparable corruption due to it not being ''ejected'' properly, or if the system is hit by a power outage of some kind.

Use this knowledge to prevent loss of data on your exFAT drive as best you can. Also, choose wisely the use of such a drive. Using such a drive to carry movies, music, photos & such would be fine, providing you of course have them ''safely'' backed up elsewhere.

Why you may be happy to use exFAT

I've found using the exFAT FS to be the easiest way for me to be able to create a situation where my 3TB drive can have data (including very large files) on it, having been copied from an ext4 drive, & is easily accessible to OS/X 10.6.5 (& newer versions); Windows XP (& newer versions, read the exFAT wiki https://en.wikipedia.org/wiki/ExFAT ); & Linux (after installed three files - see below).

exFAT in Linux

To use exFAT, you need to be sure that the following files are installed on your Linux system (I believe that they are all in both antix/MX):

exfat-utils
exfat-fuse
util-linux

With the above three files installed, when you plug in an exFAT formatted device, it should ''automount''. Also, if you have ''exfat-utils'' installed, then GParted is capable of looking at your exFAT partition but not formatting it (most likely due to the risk of legal issues with MS). To format, you will need to use mkfs.exfat in terminal. (My thanks to Adrian for a little fine tuning of the details here. ;) )

File Permissions, Ownership & Data Security

The exfat partition on my drive came with
drwxrxrx permissions & is root:root
for the owner & group.

So anyone can read it, execute from it, but only root can delete files & write to the partition. So the data is protected on all file systems, as it needs administrator access to delete files or write to the drive.

I've used the exFAT formatted drive now in OS/X 10.6.8, Win7 & a number of different Linux distros - the permissions & user:group are still the same when I look at them in antiX/MX. So it has passed the test of experience, for me at least.

Summary

With the easy mounting on Linux, OS/X & Windows, plus the above ownership & permissions, there are certainly times when exFAT is a good (if not the best) choice.

It was invented for removable media, though certainly is very useful for HDD's, particularly the external variety that bounce around between different OS's. For me at least, I've found the exFAT FS to be a near perfect & relatively simple solution to the multi-OS media access problems.

Here is a link https://groups.google.com/forum/#!msg/e ... kfs8LMrBwJ with questions answered by Andrew Nayenko the developer of most of the files that GNU/Linux (at least) need to use to be able to work with exFAT.
Last edited by handy on Mon Aug 06, 2018 3:12 am, edited 1 time in total.
1_MSI: MAG B560 TORP', i5, RAM 16GB, GTX 1070 Ti 12GB, M2 238GB + USB, MX-23 Fb to Openbox
2_Lenovo: Ideapad 520S, i5, RAM 8GB, GPU i620, HDD 1TB, MX-21 - Openbox
3_Clevo: P150SM-A, i7, RAM 16GB, nVidia 8600, 2x 1TB HDD & M.2 256 GB, MX-21 - Openbox

User avatar
Adrian
Developer
Posts: 8250
Joined: Wed Jul 12, 2006 1:42 am

Re: The exFAT file system in Linux & beyond

#2 Post by Adrian »

Thanks for the detailed article. One comment, GParted can format many file system formats, but not exFAT (it's grayed out, most likely because of patent fears) use mkfs.exfat in terminal for that.
Also, the package is exfat-fuse, not fuse-exfat.

User avatar
handy
Posts: 611
Joined: Mon Apr 23, 2018 2:00 pm

Re: The exFAT file system in Linux & beyond

#3 Post by handy »

Adrian wrote: Mon Aug 06, 2018 1:43 am Thanks for the detailed article. One comment, GParted can format many file system formats, but not exFAT (it's grayed out, most likely because of patent fears) use mkfs.exfat in terminal for that.
Also, the package is exfat-fuse, not fuse-exfat.
Thanks Adrian, I tidied up the appropriate details in the OP.
1_MSI: MAG B560 TORP', i5, RAM 16GB, GTX 1070 Ti 12GB, M2 238GB + USB, MX-23 Fb to Openbox
2_Lenovo: Ideapad 520S, i5, RAM 8GB, GPU i620, HDD 1TB, MX-21 - Openbox
3_Clevo: P150SM-A, i7, RAM 16GB, nVidia 8600, 2x 1TB HDD & M.2 256 GB, MX-21 - Openbox

User avatar
Richard
Posts: 1577
Joined: Fri Dec 12, 2008 10:31 am

Re: The exFAT file system in Linux & beyond

#4 Post by Richard »

Thanks for the effort, Handy, and Adrian
for the explanation of why Gparted won't format exFAT.
I understand that exFAT is recommended for removable media
but had not thought or known about mkfs.exfat.

Yes, the three: exfat-utils exfat-fuse & util-linux
are installed by default in MX Linux.
Thinkpad T430 & Dell Latitude E7450, both with MX-21.3.1
kernal 5.10.0-26-amd64 x86_64; Xfce-4.18.0; 8 GB RAM
Intel Core i5-3380M, Graphics, Audio, Video; & SSDs.

User avatar
chrispop99
Global Moderator
Posts: 3171
Joined: Tue Jan 27, 2009 3:07 pm

Re: The exFAT file system in Linux & beyond

#5 Post by chrispop99 »

Great write-up; thanks.

I feel I should point out that most USB devices, and the various SD cards, up to and including 32GB, are formatted fat32 as supplied. Over 32GB they are usually exFAT. This can create problems, with many devices such as phones and cameras unable to recognise exFAT formatted devices, regardless of capacity. That's why many such devices are described as only able to accept memory up to 32GB.

Re-formatting one of the larger capacity cards to fat32 often allows it to work in a device where it was previously unrecognised. Conversely, re-formatting a smaller card to exFAT may prevent a card that previously worked from being recognised.

Chris
MX Facebook Group Administrator.
Home-built desktop - Core i5 9400, 970 EVO Plus, 8GB
DELL XPS 15
Lots of test machines

User avatar
Antediluvian
Posts: 304
Joined: Sun May 20, 2018 7:42 pm

Re: The exFAT file system in Linux & beyond

#6 Post by Antediluvian »

handy wrote: Mon Aug 06, 2018 1:17 amTo format, you will need to use mkfs.exfat in terminal.
Novices (like me) may need more information to apply that command. Here is what worked for me.
I started with a USB stick that had a bootable full Linux OS on it, so it was not a data stick and was formatted ext4.

1. Using USB Stick Formatter or GParted I created an msdos partition table.
2. In the terminal I issued the command

Code: Select all

sudo mkfs.exfat -n LABEL /dev/sdx
where "label" is the name you give for your USB stick and sdx is your USB drive name. Instead of making the whole USB stick exfat you could specify a partition with sdxn.

For a pure terminal approach see this.

Post Reply

Return to “Tips & Tricks by users”