FAT32 partition on flash drive/USB keyfob gets automounted in case-sensitive mode

Bug #62321 reported by ropers
6
Affects Status Importance Assigned to Milestone
Ubuntu
Invalid
Undecided
Unassigned

Bug Description

Hi,

When having a 1GB USB keyfob / flash drive plugged in while booting a Ubuntu 6.06 LTS default install, the FAT32 partition gets mounted in case-sensitive mode.

At the very end of the dmesg it says this after bootup:

[17179647.740000] FAT: utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!

The partition otherwise does work and can be used, but it's possible to then create e.g. a file "New file" and a file "new file" in the same directory on that drive.

I believe FAT32 partitions, which are --for better or for worse-- a Microsoft standard should not get mounted in case-sensitive mode.
If a user were to copy eponymous files that differ only in capitalization onto that drive, they might be in for a surprise when subsequently trying to access their files from, say Windows XP. Ubuntu should try to play nice with the other kids in the yard -- yes, even try to play nice with the schoolyard bully. ;-P

I have a forum thread open on this at:
http://www.ubuntuforums.org/showthread.php?t=264501

Many thanks and kind regards,
Jens
_________
Disclaimer: Please excuse my n00bness. I have OpenBSD/Mac OS/OS X/DOS/Windows experience, but I've only started using Ubuntu/Linux in September 2006 and I can't really code.

Revision history for this message
Gert Kulyk (gkulyk) wrote :

Quoted from the LFS Page mentioned in forum thread:

--snip
Filesystems with MS-DOS or Windows origin (i.e.: vfat, ntfs, smbfs, cifs, iso9660, udf) need the “iocharset” mount option in order for non-ASCII characters in file names to be interpreted properly. The value of this option should be the same as the character set of your locale, adjusted in such a way that the kernel understands it.
[...]

FAT: utf8 is not a recommended IO charset for FAT filesystems,
    filesystem will be case sensitive!

This negative recommendation should be ignored, since all other values of the “iocharset” option result in wrong display of filenames in UTF-8 locales.

--snip

Ubuntu uses utf-8-locales by default, so it is _no_ bug. If you are afraid of losing data (never had any troubles with utf-8 on fat, but who knows?), add "iocharset=CODEPAGEYOUWANT" or "iocharset=ISOLOCALEYOUWANT" to your fstab-entry that mounts the fat-partition.

Revision history for this message
ropers (ropers) wrote :

I probably didn't explain myself very well and/or didn't put the emphasis right here:

Having figured things out as far as this, I don't see the "utf8 is not a recommended" part of the error message as central or even as much of an issue. Yes, I do think it's not nice to have error message thrown if there isn't an error, but for sure that's significantly less important than the substantive issue I filed this bug about.

The main issue here is that the FAT32 partition gets mounted case-sensitively instead of case-insensitively.

I don't actually understand at all why this error message would thow the utf8 part together with case-sensitivity, but anyway:
I think the mounting of FAT32 partitions as case-sensitive would be worth addressing.

Revision history for this message
Simon Law (sfllaw) wrote :

We must set the iocharset to utf8, or things will break horribly.

There is no current way to enfoce case-insensitivity in the vfat driver, without kernel support. If you feel that this is an error, please contact the Linux developers.

Thanks.

Revision history for this message
ropers (ropers) wrote :

Thanks for your replies.

I'm noticing that a FAT32 hard drive partition I am mounting via /etc/fstab does not have the problem of (incorrectly) being case-sensitive. It (correctly) is case-insensitive.

From my /etc/fstab:

/dev/hdc1 /mnt/fattie vfat user,auto,uid=ropers,gid=ropers,fmask=0111,dmask=0000 0 2

On that partition I cannot create a "New file" and a seperate "new file". I have tried this both with Nautilus and with touch "New file"; touch "new file" at the shell.

Is anybody interested in elucidating why this issue of unwanted case sensitivity would crop up when automounting a FAT32 partition (the one on the USB drive) but not when mounting one (the one on a hard drive) via /etc/fstab?

If fixing this still requires kernel support as Simon suggested, I would be prepared to compose a email to <email address hidden>.

However I feel I'm too incompetent to write a proper message to them. So if this is really an issue that would need kernel changes to be addressed, would anyone here be inclined to help submitting this to the kernel hackers? I don't even know what the name of the automounter daemon is.

Again, many thanks for your help. :)
--Jens

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.