Welcome!
Important information
-- Spectre and Meltdown vulnerabilities
-- Change in MX sources

News
-- MX Linux on social media: here
-- Mepis support still here

Current releases
-- MX-17.1 Final release info here
-- antiX-17 release info here

New users
-- Please read this first, and don't forget to add system and hardware information to posts!
-- Here are the Forum Rules

The exFAT file system in Linux & beyond

Just as the name says, here is where you can post tips and tricks to share with other users of MEPIS.
Post Reply
Message
Author
User avatar
handy
Forum Regular
Forum Regular
Posts: 109
Joined: Mon Apr 23, 2018 2:00 pm

The exFAT file system in Linux & beyond

#1 Post by handy » Mon Aug 06, 2018 1:17 am

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.
Clevo N'book (2014): P150SM-A
CPU: i7-4810MQ (Haswell) Speed: 2800/3800 MHz
RAM: 16 GiB 1600 MHz DDR3
GPU-1: i915
GPU-2: NVIDIA GK104M [GeForce GTX 880M] vRAM: 8GB 2500 Mhz DDR5
Storage: TOSHIBA 931.51 GiB. HGST 931.51 GiB. Crucial 223.57 GiB (M.2 SSD)

User avatar
Adrian
Forum Veteran
Forum Veteran
Posts: 8927
Joined: Wed Jul 12, 2006 1:42 am

Re: The exFAT file system in Linux & beyond

#2 Post by Adrian » 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.

User avatar
handy
Forum Regular
Forum Regular
Posts: 109
Joined: Mon Apr 23, 2018 2:00 pm

Re: The exFAT file system in Linux & beyond

#3 Post by handy » Mon Aug 06, 2018 3:19 am

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.
Clevo N'book (2014): P150SM-A
CPU: i7-4810MQ (Haswell) Speed: 2800/3800 MHz
RAM: 16 GiB 1600 MHz DDR3
GPU-1: i915
GPU-2: NVIDIA GK104M [GeForce GTX 880M] vRAM: 8GB 2500 Mhz DDR5
Storage: TOSHIBA 931.51 GiB. HGST 931.51 GiB. Crucial 223.57 GiB (M.2 SSD)

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

Re: The exFAT file system in Linux & beyond

#4 Post by Richard » Tue Aug 07, 2018 12:14 am

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.
MX171: Lenovo T430: Intel DualCore i5-3320M, 8 GB RAM, 4.18.7-antix.1-amd64-smp, 119GB SSD
MX171: AA1-ZG5/EeePC-1005HA: DualCore N270, 1 GB RAM, 4.9.126-antix.1-686-smp-pae, 150GB HDD
Doublecmd84, LibO61, Dropbx, PMoon, CherryT,Vbox. LinuxCounter #208633

User avatar
chrispop99
Forum Guide
Forum Guide
Posts: 2403
Joined: Tue Jan 27, 2009 3:07 pm

Re: The exFAT file system in Linux & beyond

#5 Post by chrispop99 » Tue Aug 07, 2018 6:22 am

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
Test machines:
32-bit non-PAE - Thinkpad T41, 1.6GHz Pentium M, 1GB RAM.
32-bit PAE - DELL Latitude D610, 1.73GHz Pentium M, 2GB RAM.
64-bit - Lenovo T61, 2GHz Core 2 Duo, 2GB RAM
64-bit - Gigabyte Z77P-D3, Intel i3-3220, GeForce 8400 GS, 4GB PC3-12800.

Antediluvian
Forum Novice
Forum  Novice
Posts: 25
Joined: Sun May 20, 2018 7:42 pm

Re: The exFAT file system in Linux & beyond

#6 Post by Antediluvian » Tue Aug 07, 2018 5:53 pm

handy wrote:
Mon Aug 06, 2018 1:17 am
To 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”