Konubinix' site

How to Have a File System in an External Drive Accessible From Windows/Mac/Linux?

Fleeting

TL;DR: Use udf

1 FAT32

Accessible everywhere, but is limited to 4Go per file…

2 NTFS

Good drivers on linux (NTFS-3G), but philosophically bad.
The specification has become open ?

3 Universal Disk Format

Should be the best option.

4 Comparison of udf, ntfs, ext

https://en.wikipedia.org/wiki/Comparison_of_file_systems

4.1 Size limits

:PROPERTIES
:CREATED: [2014-11-05 Wed 11:40]
:CUSTOM_ID: 4af5f416-c583-4299-9066-aaf895a673ec
:END
:LOGBOOK

:END

File system Maximum filename length Allowable characters in directory entries Maximum pathname length Maximum file size Maximum volume size
ext4 255 bytes Any byte except NUL and / No limit defined 16 TB 1 EB
NTFS 255 characters Depends on namespace used 32,767 UCS with each path component (directory or filename) up to 255 characters long 16 EB 16 EB
UDF 255 bytes Any Unicode except NUL 1,023 bytes 16 EB 2 TB (hard disk), 8 TB (optical disc)

4.2 Metadata

:PROPERTIES
:CREATED: [2014-11-05 Wed 11:40]
:CUSTOM_ID: e16c1451-a4c5-4b7a-b478-cb6bfbf9ea6d
:END
:LOGBOOK

:END

File system Stores file owner POSIX file permissions Creation timestamps Last access/ read timestamps Last content modification timestamps Disk copy created Last metadata change timestamps Last archive timestamps Access control lists Security/ MAC labels Extended attributes/ Alternate data streams/ forks Checksum/ ECC Max Timestamp Granularity
ext4 Yes Yes Yes Yes Yes Unknown Yes No Yes Yes Yes Yes 1 nanosecond
NTFS Yes Yes Yes Yes Yes No Yes No Yes Yes Yes No 100 nanoseconds
UDF Yes Yes Yes Yes Unknown Unknown Yes Yes Yes No Yes No Unknown

4.3 Features

:PROPERTIES
:CREATED: [2014-11-05 Wed 11:40]
:CUSTOM_ID: 9c66eedf-0282-41a6-b5ea-123e670b2db5
:END
:LOGBOOK

:END

File system Hard links Symbolic links Block journaling Metadata-only journaling Case-sensitive Case-preserving File Change Log Snapshot XIP Encryption COW integrated LVM Data deduplication Volumes are resizeable
ext4 Yes Yes Yes Yes Yes Yes No No Yes Yes No No No Online
NTFS Yes Yes No Yes Yes Yes Yes Partial Yes Yes Partial Unknown No Online
UDF Yes Yes Yes Yes Yes Yes No No Yes No No No No Unknown

4.4 Allocation and layout policies

:PROPERTIES
:CREATED: [2014-11-05 Wed 11:40]
:CUSTOM_ID: 47220927-55ef-4c7c-b502-b287543ef1e4
:END
:LOGBOOK

:END

File system Block suballocation Variable file block size Extents Allocate-on-flush Sparse files Transparent compression
ext4 No No Yes Yes Yes No
NTFS Partial No Yes No Yes Partial
UDF No No Yes Depends No No

4.5 Supporting operating systems

:PROPERTIES
:CREATED: [2014-11-05 Wed 11:40]
:CUSTOM_ID: 11aa919e-a797-486a-a575-fd72cf434a78
:END
:LOGBOOK

:END

File system DOS Windows 9x Windows NT Linux Mac OS Mac OS X FreeBSD BeOS Solaris AIX z/OS OS/2 Windows CE Windows Mobile VxWorks HP-UX
ext4 No No with Ext2Fsd (partial, extents limited) or Ext2Read (read-only, also on LVM2) Yes since kernel 2.6.28 No with fuse-ext2 (partial) and ExtFS (full read/write) No Unknown Unknown Unknown Unknown Unknown No Unknown Unknown Unknown
NTFS with third-party driver with third-party driver Yes Yes Kernel 2.2 or newer, or with NTFS-3G or ntfsprogs No with NTFS-3G with NTFS-3G with NTFS-3G with NTFS-3G on Opensolaris Unknown Unknown Partial read-only third-party driver with 3rd-party driver No Unknown Unknown
UDF Unknown Partial read-only support of UDF 1.02 since Win98 and WinME Yes Yes Yes since Mac OS 9 Yes Yes Unknown Yes Unknown Unknown Unknown Yes Unknown Unknown Unknown

5 Conclusion

UDF is THE true universal file system. The drawback on using UDF is that is
possesses less features that others. But the essentials are there. It also
suffers from bad OS implementations that will consider a UDF filesystem as
being a read only CD-Rom.

6 Test mkudffs for real

http://superuser.com/questions/39942/using-udf-on-a-usb-flash-drive#answer-48040

Zeroing the disk to avoid any confusion later.

dd if=/dev/zero of=/dev/sdx bs=512 conv=sync bs=4M

Creating the new filesytem.

sai udftools
mkudffs -l mydisk --media-type=hd --blocksize=512 /dev/sdx

It worked perfectly on a 1Go micro sd card.