4.1.09

Linux FAT32 Case-Sensitivity Issue

Linux can fully access FAT32 partitions on both internal and external storage devices. While FAT32 file-system is case-preserving, it is not case-sensitive. This means that files can have names in lower-case, mixed-case or upper-case, but opening a file works regardless of the case used to open the file.

The case-preserving aspect is essential to work with files which are used by systems which are case-sensitive such as most web-servers. On Neocamera for example, images coming directly from digital cameras most often have uppercase filenames, such as DSCF0001.JPG. A web-page linking to such file must refer to filename in the correct case. If the correct case is not read from a FAT32 device storing the web-site, then such link will be broken. Sure, the website could be stored on a non-FAT32 device but when you share this between Linux, Windows and OS X, FAT32 is the most sensible choice. This is just one example, there are many other reasons why devices end up being formatted as FAT32.

The problem is the default handling of FAT32 on OpenSUSE, and perhaps other Linux distributions, causes filenames to be read as lower-case, regardless of their actual case. It turns out this behavior is an option to the FAT32 file-system handler.

The solution is to enable the mixed case option on FAT32 devices, so that Linux does not make any change to the case of filenames while reading a FAT32 volume. Here are the detailed steps, thanks to Chris Thomas' blog:
  1. Open the gconf editor. Its installed by default, but install it first if that is not the case.
  2. It is normally in the system tools section of your Gnome desktop menu.
  3. Navigate through the hierarchy of folders to: /system/storage/default_options/vfat
  4. On the right, open the mount options.
  5. Change the value of shortname=lower to shortname=mixed.
  6. Click Accept and close the gconf editor.
  7. Unmount and remount all FAT32 devices.

1 comment:

Itai said...

For those who upgraded to OpenSUSE 11.2. None of this works anymore. A future kernel will include a permanent fix but for now the issue is open once more.