Understanding exFAT issues
Freedom of Choice
Just because you have two solutions for using exFAT doesn't necessarily mean you should use either one of them. We examine some of the issues – legal and technical – surrounding this Microsoft filesystem.
Sooner or later, the Linux operating system usually manages to support proprietary technology. However, the effort required frequently extends beyond the technical to include copyright and patent issues. A case in point is Microsoft's exFAT filesystem [1], which now has two free-licensed solutions – although whether you want to use them depends on what jurisdiction you are in and how likely you think it might be that you could be sued for patent violation.
exFAT is a filesystem designed for external and embedded devices. Basically, exFAT is intended as a replacement for FAT32, which has become the filesystem of choice for devices that need to communicate with a variety of operating systems, but whose disk and file size limitations are increasingly unsuitable for modern purposes. exFAT is designed to remove such limitations for the foreseeable future, supporting a recommended 512TB disk size, compared with the 2TB limit for a FAT32 partition with a sector size of 512 bytes, and a file size of 16 exabytes (16EB; 32x260 bytes) compared with the 4GB limit for FAT32.
Additionally, the latest version of exFAT uses free-space bitmaps [2] for allocating sectors, which reduces fragmentation. It also includes optional UTC time stamps and OEM-definable parameters. Releases of exFAT are often informally referred to by reference to the Windows releases with which they coincide, so developers might refer to exFAT Vista or XP.
During the five years or so of exFAT's existence, its use has spread slowly yet steadily. Microsoft asserts a variety of patents associated with exFAT [3] but has yet to defend any. Instead, Microsoft appears to prefer licenses to patent claims for retaining control of exFAT and who uses it, sharing exFAT's specifications only with its growing number of partners.
Working from User Space
Despite Microsoft's efforts to restrict information about exFAT, reverse-engineering has remained possible. exFat's resemblance to FAT32, which is often mentioned as an advantage, also allows developers to have some shrewd ideas about how it operates. As a result, the developers of free operating systems have developed two approaches for supporting exFAT.
The first approach is exFAT FUSE [4], which was begun by Russian developer Andrew Nayenko in 2010. FUSE is short for Filesystem in User Space, a system for working with filesystems without going through the kernel [5]. FUSE solutions have the advantage of allowing non-root users to edit and manipulate filesystems along with the disadvantage – at least in theory – of slower performance.
Just as importantly, the lack of kernel integration means that using exFAT requires a separate set of utilities from those usually used with filesystems. For example, you cannot use the normal mount
command; you must use mount.exfat-fuse
instead. In the same way, the exFAT FUSE project includes the utilities dumpexfat
, exfatfsck
, exfatlabel
, and mkexfatfs
. Basic support and mount.exfat-fuse
are provided by the exfat-fuse package, and the other utilities by exfat-utils. Thus, not only do you have to remember these utilities but you also have to mount exFAT drives manually, which can be a nuisance when you've become accustomed to automatic mounting.
exFAT FUSE achieved rudimentary read support for exFAT in early 2011. Now, with the 1.0.1 version of the code released in February 2013, Nayenko describes exFAT FUSE as "ready for everyday usage. The driver supports all exFAT functionality as of Windows Vista, and almost all (except time zone info) of Windows 7, XP, and 8. Both drivers and utilities are fully compatible with all desktop Windows versions. The main goal of the project is achieved." Packages are available for major distributions, including Debian, Fedora, openSUSE, and Ubuntu, although – because of the potential legal issues – not always in official repositories [6].
Nayenko concedes, however, that some limitations exist. In the 1.0.1 release, no tool exists for resizing or deleting, and although exfatfsck can detect errors, it still cannot correct them. So far, too, only Linux, OS X, and FreeBSD are supported; however, the fact that the kernel is bypassed should make support for other operating systems easy to implement.
As a Russian citizen, Nayenko has little concern for how Microsoft might react to the project, saying, "Here, reverse engineering is legal and US patents are not applicable." However, he immediately adds that "it's everyone's own responsibility to obey local laws."
Despite the emergence of another solution, Nayenko plans to continue development of exFAT FUSE, possibly adding support for the Transaction-Safe Extended FAT filesystem (TexFAT), a Microsoft filesystem intended to reduce data loss [7] and a utility for defragmentation. Nayenko's attitude is "One does not stop skiing just because somebody else starts doing the same, right?"
Unofficially from the Kernel
The second solution refers not to a single project so much as an unofficial name to describe a similar approach made by several groups whose results were being merged in August 2013. All of these groups can be described as non-FUSE, because they take a traditional approach of developing a driver for the Linux kernel. One of these groups is an Arch Linux project, led by Patryk Kowalczyk, that has been working on supporting exFAT for some months [8].
The second group is Samsung's Open Source Group. It became involved when a proprietary exFAT driver developed by a third party for Samsung was accidentally posted and discovered to include code licensed under the GNU General Public License (GPL). The code was immediately posted to GitHub [9] by someone identified only as "rxrz", who seemed to regard the posting as act of defiance against Microsoft, copyright law, or both [10].
According to Ibrahim Haddad and Guy Martin of Samsung's Open Source Group, the company is uncertain what exactly happened. However, Martin suggests that the GPL code was overlooked because it was relatively small, or it was perhaps vetted by someone who did not understand that its inclusion meant the entire driver needed to be released under the GPL.
Haddad adds that an examination of what was posted to GitHub shows that "the source code had changed when we compared it with our own internal version. There were changes that a competent open source developer would not do at all" – including the removal of copyright and license notices."
The renegade code was quickly seized upon by the Arch Linux group and even more quickly removed when its dubious legal status became obvious. Meanwhile, however, the Samsung code was released – by genuine mistake or some obscure internal purpose at Samsung. Then, Samsung immediately moved to regularize the status of the code, consulting with a number of experts, including the Software Freedom Law Center, The Linux Foundation, The Software Freedom Conservancy, and gpl-violations.
In two and a half weeks, Samsung had released the entire code under the second version of the GPL – which "by Samsung's standards, is record time," Martin says. "Once we determined there was GPL in it, we were determined to do the right thing, not just for the letter of the law, but to abide by the spirit of the open source community so that the community feels that it can trust us." The code is now available from Samsung's repositories [11] and from one maintained by Bradley Kuhn of the Software Freedom Conservancy [12].
The legal version of the Samsung code has since been merged with that on GitHub, which the Arch Linux repositories have packaged. This combined code has been tested with the 3.8 and 3.9 versions of the Linux kernel and can apparently be made to work with the 3.10 kernel with minor tinkering. Unlike earlier versions on GitHub, this code appears to be in compliance with the GPL.
Installing the code is no different from compiling and installing any source code. Just follow these steps:
Clone the repository on your hard drive with:
git clone https://github.com/dorimanx/exfat-nofuse
Change to the download directory and run:
make
Log in as root and, from the download directory, run:
make install
Load the finished module into the kernel with:
modprobe exfat_fs
When you are finished, your installation will recognize exFAT as a filesystem, and you will be able to use it with the standard Bash commands. However, utilities for repairing exFAT have yet to appear.
Dealing with the Legal Status
Whether you should use either of these solutions depends very much on your views on free software and probably on your level of responsibility as well. From one perspective, exFAT with its licensed use and patents is a Trojan horse comparable to Mono, the version of .NET whose use in Gnome concerned everyone so much a few years ago. In other words, it is something to be avoided at all costs in case its use provides Microsoft with the means to destroy Linux and free software. From another perspective, some people might hold that the patents are a bluff, and that these free solutions benefit Microsoft by making its exFAT technology more widely usable.
The decision is made more difficult because anyone with any expertise is reluctant to make any public statements about the issue. For example, although Samsung released the code under the GPL, Haddad says that "Samsung did not provide any statement on the subject, because it cannot provide free legal advice to others on how they should look at this code. However, like with any other source code made public, people need to do their own due diligence. They need to review the license, and figure out if this is something they want to use or not." The fact that Samsung has released code that its representative cannot recommend that anyone use goes to show how confused such issues can be for everyone.
Similarly, when asked whether exFAT support would be refused on general principle in the Linux kernel, Linus Torvalds replied, "Not on general principle, no. But in order to merge it into the standard kernel it would need to be clear that we don't have any latent patent issues, since Microsoft already has tried to push that angle, and people claim exFAT is patent-encumbered. So it's not just about the code and the copyright."
For now, all that can be said is that free software has evolved two solutions to the problem of exFAT support. However, you use either solution entirely at your own risk.
Infos
- exFAT filesystem: http://en.wikipedia.org/wiki/ExFAT
- Free space bitmaps: https://en.wikipedia.org/wiki/Free_space_bitmap
- Patents associated with exFAT: http://tinyurl.com/ogv5p2h
- exFAT FUSE: https://launchpad.net/~relan/+archive/exfat
- FUSE: http://en.wikipedia.org/wiki/Filesystem_in_Userspace
- Supported operating systems: https://code.google.com/p/exfat/
- TexFAT: https://en.wikipedia.org/wiki/Transaction-Safe_FAT_File_System
- Arch Linux package: https://aur.archlinux.org/packages/exfat-git/
- exfat-nofuse: https://github.com/dorimanx/exfat-nofuse
- The exfiltrated exFAT driver: https://lwn.net/Articles/560424/
- exFAT on Samsung: http://opensource.samsung.com/reception/receptionSub.do?method=sub&sub=F&searchValue=exfat
- exFAT on Gitorious: https://gitorious.org/binbang/exfat-linux/source/a562a7abffce20f1c13541b13086836fad82621a:
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
New Steam Client Ups the Ante for Linux
The latest release from Steam has some pretty cool tricks up its sleeve.
-
Gnome OS Transitioning Toward a General-Purpose Distro
If you're looking for the perfectly vanilla take on the Gnome desktop, Gnome OS might be for you.
-
Fedora 41 Released with New Features
If you're a Fedora fan or just looking for a Linux distribution to help you migrate from Windows, Fedora 41 might be just the ticket.
-
AlmaLinux OS Kitten 10 Gives Power Users a Sneak Preview
If you're looking to kick the tires of AlmaLinux's upstream version, the developers have a purrfect solution.
-
Gnome 47.1 Released with a Few Fixes
The latest release of the Gnome desktop is all about fixing a few nagging issues and not about bringing new features into the mix.
-
System76 Unveils an Ampere-Powered Thelio Desktop
If you're looking for a new desktop system for developing autonomous driving and software-defined vehicle solutions. System76 has you covered.
-
VirtualBox 7.1.4 Includes Initial Support for Linux kernel 6.12
The latest version of VirtualBox has arrived and it not only adds initial support for kernel 6.12 but another feature that will make using the virtual machine tool much easier.
-
New Slimbook EVO with Raw AMD Ryzen Power
If you're looking for serious power in a 14" ultrabook that is powered by Linux, Slimbook has just the thing for you.
-
The Gnome Foundation Struggling to Stay Afloat
The foundation behind the Gnome desktop environment is having to go through some serious belt-tightening due to continued financial problems.
-
Thousands of Linux Servers Infected with Stealth Malware Since 2021
Perfctl is capable of remaining undetected, which makes it dangerous and hard to mitigate.