« A Swing and a Miss | Main | World War Z »
July 26, 2009
On Case Sensitive File Systems
I've been using Unix and Unix-like systems for almost my entire computing "career." After leaving AmigaDOS behind, I ran Windows (3.1) long enough to ditch it for OS/2, and ran that just until it became practical to run Linux.
So the idea that the file system is case sensitive is just something I'm "used to."
Over time, however, I've come to the conclusion that the Windows and OSX model of being case preserving but not case sensitive is probably the right one - if not generally than certainly for a desktop (i.e. user-centric) operating system, and I figured I'd see what the options were in Posix (specifically Linux) land.
When I say that Windows and OSX are case preserving but case insensitive, it would be more accurate to say that NTFS (the Windows filesystem) and HFS+ (the OSX file system) have these properties, so I figured the obvious first try would be to install linux on one of these files systems.
Turns out that's a non-starter - while the kernel supports both NTFS and HFS+, the read/write support for both is pretty lacking. While linux supports read/write access to HFS+, there's no support for writing to a journaled HFS+ volume. Strike two.
The ntfs-3g project has brought full read/write support for NTFS, and despite the fact that the driver is in userspace it's possible to use it root filesystem for linux
Unfortunately, it turns out that the way NTFS implements case insensitivity requires cooperation from the OS/driver, and that mode isn't supported in ntfs-3g
Strike 2...
A bit of reading revealed that JFS, from IBM, supports case insensitivity (for compatibility with OS/2), so I figured I'd give it a whirl.
To make a long story short (too late), you can't get there from here - at least not without a bunch more work than I'm willing to do.
I nuked the Ubuntu install on my macbook (which I use only occasionally, and doesn't have anything important on it) and fired up the installer.
While it let me specify that I wanted the root partition to be formatted as JFS, it wouldn't let me specify additional options to the format command.
So that didn't work.
I booted into the live CD, made the file system manually with the right flag, and then pointed the installer at it. Things looked good, it copied a bunch of files, only to crash about 2/3 through. A bit of forensics revealed that the installer was trying to create a symbolic link between two names that differ only in case - and on a case insensitive file system, that's not gonna work.
Strike 2. (Or is it four?)
Finally, I figured I'd see if I could work around it. I created a small case insensitive JFS file system, and pointed the installer at the remaining free space on the drive. My plan was to let it install on a "normal" file system (ext3, by default), then move the install onto the JFS filesystem, fixing up the sort of issue that crashed the installer by hand (or giving up, if there were just too many of them).
That went swimmingly 'till the installer tried to install the bootloader (GRUB) on the JFS filesystem. Apparently the version of grub shipped with ubuntu 9.04 doesn't actually know how to do that, and fails the install.
Thus endeth the "install ubuntu on a case insensitive file system" experiment - at least for today.
Posted by dberger at July 26, 2009 12:22 PM