LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   VFAT partition in Linux is weird. (https://www.linuxquestions.org/questions/slackware-14/vfat-partition-in-linux-is-weird-416855/)

StevenO 02-18-2006 10:41 AM

VFAT partition in Linux is weird.
 
Hi,

Let's say I have a vfat partition and I did the following command:
#mkdir UPPERCASE

Yet, the folder created is "uppercase" instead.

Is it just me? Or is that some vfat behaviour?

odevans 02-18-2006 11:06 AM

FAT32 (vfat) is not case sensitive.

http://en.wikipedia.org/wiki/Compari...stems#Features

davcefai 02-18-2006 11:12 AM

I can confirm this behaviour in Debian.

However, if you do the same in a shell from KDE then the case you use is retained. Strange....

drumz 02-18-2006 12:25 PM

Case is always conserved for me: console, Konsole, Konqueror, and stuff created in Windows. My /etc/fstab looks like this:

/dev/hda7 /vfat vfat auto,rw,umask=000 1 2

Edit: it only conserves case when there's a mix of upper and lowercase.

titopoquito 02-18-2006 01:01 PM

I recently had to deal with this, too. It seems you can use upper and lower letters. So a "cd UPPERCASE" should have the same effect as "cd uppercase" or similar commands.

Woodsman 02-18-2006 05:30 PM

Quote:

FAT32 (vfat) is not case sensitive.
http://en.wikipedia.org/wiki/Compari...stems#Features
I think this table criterion is misleading. I suspect the meaning of that table is that commands from the command line are case insensitive. For example, as mentioned above, a cd UPPERCASE and cd uppercase command will function exactly the same. With respect to file names and directories, I use mixed case on my shared FAT32 partition with no issues.

Working with the FAT32 file system from with GNU/Linux is a challenge and some oddball fstab settings have helped me. Here is my shared FAT32 entry in my fstab:

# # # Shared FAT32 Partition # # #
/dev/hda10 /mnt/nt_o vfat uid=username,gid=users,umask=0000,noatime,check=s,shortname=winnt 0 0

Please be sure to modify the previous example with a correct user name for your box. I can't recall at the moment why I had to add the uid parameter, but I think the reason had to do with certain errors I would experience if root possessed ownership and as mortal user I tried any kind of file operation dealing with modifications of permissions or meta data, such as an embedded chmod operation.

The check=s parameter forces the kernel to use strict file naming conventions. The shortname parameter modifies how long names and short names will be created.

There are other fat and vfat options listed in the mount man page that might help you further.

odevans 02-18-2006 08:38 PM

Quote:

Originally Posted by Woodsman
I think this table criterion is misleading. I suspect the meaning of that table is that commands from the command line are case insensitive.

I would've thought that'd be more up to the OS, shell, or whatever is interpreting the typed command. Either way, I have no FAT32 disks to test this with. I was probably thinking of the FAT16 on my camera's SD cards (still "vfat") that's definately case-insensitive. D'oh.

Quote:

Originally Posted by Woodsman
# # # Shared FAT32 Partition # # #
/dev/hda10 /mnt/nt_o vfat uid=username,gid=users,umask=0000,noatime,check=s,shortname=winnt 0 0

Thanks for the useful info.


All times are GMT -5. The time now is 09:16 PM.