52

I use Linux and Mac OS X on a regular basis, and sometimes I have to use Windows. I need to use a flash drive on all three, and I need a filesystem that will work well on all of them. None of the ext's work on Mac or Windows, HFS+ doesn't work on Windows (or well on Linux), NTFS is read-only on Mac, and FAT sucks on all OSes. Is there a file system that would work reasonably well on all operating systems? I'd like it to work without drivers or additional installations, so it can be used on any computer.

  • 2
    Here is the answer: Cross-platform file system – Marco Dec 27 '12 at 16:24
  • @Marco I'd like it to work without drivers or additional installations, so it can be used on any computer. – tkbx Dec 27 '12 at 16:25
  • 1
    If you want files larger than 4GiB there's just one choice, UDF. – Marco Dec 27 '12 at 16:27
  • @Marco I don't see that in GParted, how can I make a UDF partition? – tkbx Dec 27 '12 at 16:33
  • 1
    With mkudffs from the package udftools. – Marco Dec 27 '12 at 16:46
31

UDF is a candidate. It works out-of-the-box on linux >= 2.6.31, Windows >= Vista, MacOS >= 9 and on many BSDs.

Note: UDF comes in different versions, which are not equally supported on all platforms, see Wikipedia - Compatibility.

UDF can be created on Linux with the tool mkudffs from the package udftools.

| improve this answer | |
  • Wait, Vista and later will recognize UDF on flash or regular hard disks? Last time I tried that I guess it was XP thought it was only for optical media. That's good news. – psusi Dec 27 '12 at 21:05
  • I don't have a windows to test, but I would assume that it works for both. If the OS contains a driver to read UDF what would be a reason to not use it for a particular storage backend technology? And what would happen if the regular disk is a flash drive? Well, I guess in that case it works just sometimes. – Marco Dec 27 '12 at 21:49
  • 1
    I assumed the same thing but last time I tried it, Microsoft stupidly refused to recognize it on a hard disk/flash drive, even though they could on a cdrom. – psusi Dec 27 '12 at 22:52
  • 1
    @Marco I'm afraid that for Windows the implication "have a fs driver" => "will work on any media" is not guaranteed. Why that is is another question, but I just wouldn't take it for granted. It would expect it to work for DVD-RAM for though. – peterph Dec 28 '12 at 9:30
  • 6
    Since September 2006 due to CVE-2006-4145 kernel has disabled writing extents larger than 1Gb in size. In order to write files larger than 1Gb UDF driver should be updated to write more extents for a file. This has not happened till present (2015), so on linux UDF has been even worse than FAT32 for years. – Zart Mar 21 '15 at 10:05
16

Without troubles, use FAT32. There is no other compatible possibility. Linux since version 2.6.xy has no more problems with NTFS, but Mac OS does...Maybe you could make more partitions at your flash, but this is actualy not great solution.

Other solution: Try to imagine you have 4GB flash memory. Split it to 2 partitions. 1) FAT32 with freeware portable applications to access all other FS types. 2) Universal partition, which can be whatever you want - NTFS, ReiserFS (if you want real security and encryption) or whatever. Thanks first partition of your flash memory, you can easily read/write from whatever OS, because of programms you have stored at your FAT32 partition of your flash memory.

Better solution: Forget using a flash drive. Use Dropbox or something through network. They are one of the simplest ways of sharing files between machines.

edit: Thank you for correction: let me write one of comments here: " the maximum size depends on the selected cluster size. The limits really are from 2TB to 16TB for cluster sizes 512B to 4KB for FAT32 (also mentioned on the wikipage)." That is right, excuse my mistake.

Thank you peterph

| improve this answer | |
  • 1
    No, that is not truth. FAT32 limits only maximum filesize to 4GB, but I have seen FAT32 partitions sizes more than 200GB. So maximum size of FAT32 is 512GB per partition. look here: en.wikipedia.org/wiki/File_Allocation_Table – MIrra Dec 28 '12 at 0:52
  • 1
    @MIrra but a 640GB HDD of mine came as FAT32... – tkbx Dec 28 '12 at 3:28
  • 3
    @MIrra the maximum size depends on the selected cluster size. The limits really are from 2TB to 16TB for cluster sizes 512B to 4KB for FAT32 (also mentioned on the wikipage). – peterph Dec 28 '12 at 9:22
  • 1
    Anyone at this skill level should never ever have to touch any untrusted 3rd party storage like Dropbox. Just use sshfs on your server, which should work out of the box, and be done with it. Yes, there are many SSHFS clients for Windows, offering normal mounting abilities. – Evi1M4chine Dec 22 '15 at 19:19
  • 1
    Yes, you are right. Dropbox is no more secure solution, as we know better solution might be for example owncloud installed on your own server, or to use sshfs client as Evi1m4chine said. – MIrra Mar 25 '16 at 20:11
11

Since you have cut it to the filesystems supported by OS X and Windows out of the box, I'm afraid the least common denominator is FAT32. exFAT might be an option if you can relax the requirement and accept using FUSE - it is patent encumbered and hence it isn't going to make it to kernel till 2029 or until Microsoft grants the patent on royalty-free basis, whichever happens first.

| improve this answer | |
  • 5
    Now, I just have to wonder why Apple and Microsoft can't get off their proprietary horse and support ext. – tkbx Dec 27 '12 at 16:48
  • @tkbx It would mean more work for them (to get such code from scratch up to their standards), and not many users are complaining, I guess (and by "many" I mean "big corporate users that could cause bad publicity"). Those that do complain usually decide to use some open-source solution as an add-on (i.e. thay don't have the requirement for it to work without any additional software). – peterph Dec 27 '12 at 16:55
  • 9
    Also, let's hope there isn't a Windows in 2029. – tkbx Dec 28 '12 at 3:34
5

I'd suggest exFAT. Here's why:

  • It works in RW everywhere (unlike NTFS, that's supported read only on Mac OSX), it's included in Windows since Windows XP and in Mac OSX since Mac OS X 10.6 (Snow Leopard), and afaik all the GNU/Linux distros out there includes packages for it in default repos.
    Even Android devices, iOS devices (iPhones and iPads), and some smart TVs support it as of year 2017.
  • It doesn't support permissions and ownership of files (unlike ext2/3/4, NTFS and HFS+), and it's a good thing, since they can be very annoying on a flash drive that you often connect to several, different, computers.
  • It supports large disks and big file systems without wasting space, and supports files bigger than 4GB (unlike FAT32). It supports almost any unicode character in file and directory names (unlike FAT32
  • It's simple enough to be fast (unlike NTFS) and reliable (unlike FAT32).
  • With SDXC cards exFAT became the standard for SD and micro SD cards with storage bigger than 32 GB, so one can expect support for it in most recent cameras, camcorders, smartphones and game consoles. So even if you don't think to need it, maybe you already have one or more devices using it or ready for it.

Unfortunately, patents on exFAT prevent to include it in mainline Linux kernel, so you need to manually install an implementation of exFAT to add support for it in your system. Anyways, once you install it, the system will be able to mount or unmount it using normal mechanisms.

Most distros provide packages to install a FUSE implementation that works fine and flawlessly. I used it for flash drives, SD cards and external USB disks, and I'm happy with it.

I'd expect a FUSE file system to be slower than a native one, but most often the bottle neck is in the hardware, not in the file system (often flash drives themselves are slower than file system drivers), so for "normal" use it won't be a problem at all.

To use exFAT on Ubuntu and Debian you just need to install the exfat-fuse and exfat-utils packages:

sudo apt-get install exfat-fuse exfat-utils
| improve this answer | |
  • 1
    The exfat driver for macos is not as full-featured as on windows, and on mac the drive often gets the dirty flag set, as result you might need to to wait for hours (on multi-TB drives) the next time you plug it it because fsck_exfat has to finish checking it. The linux driver for exfat is userland and often leads to high CPU. There is a kernel-mode exfat linux driver but that's not official and can be buggy. – ccpizza Oct 12 '19 at 23:05
  • It's true, exfat is proprietary (but recently Microsoft seems to be willing to solve this), and current Linux and MacOS implementations have limitations, but imho it's still the best modern file system for interoperability. – gerlos Oct 13 '19 at 10:18
  • 1
    Agreed, given the lack of a better alternative exfat is currently the lowest common denominator and works even with android devices (with a OTG cable you can connect flash and hdd drives formatted as exfat). It lacks symlinks and permissions support, is not compatible with NFS but otherwise is ok for data storage. On Mac it can be problematic when the dirty bit gets set; I've described a workaround here: superuser.com/a/1491743/65975 – ccpizza Oct 13 '19 at 10:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.