LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Grrr! vfat not respecting all uppercase filenames (https://www.linuxquestions.org/questions/linux-newbie-8/grrr-vfat-not-respecting-all-uppercase-filenames-490479/)

wonkocz 10-07-2006 10:11 PM

Grrr! vfat not respecting all uppercase filenames
 
Hi, I am a linux newbee and have been wrestling with getting Eclipse working under linux.


Help!? And thanks if you can figure this out. -I'm at my wits end and ready to go back to windows XP :(

My system: booting/running puppy linux 2.10 from USB on a VFAT USB card, all one partition fat32 : /dev/sda1

:confused:

Problem: On the vfat partition, if I create a file with an editor, say the filename is 'DOG' and then create content and save and exit said editor, then do an 'ls' the filename shows up as 'dog'.

:tisk:

now, this is not good! Here is why: the Eclipse application creates tons of files on the fly. When it creates all uppercase filenames, it expects to find them in all uppercase. (a valid assumption!) But alas!! they are not in all uppercase anymore, the linux filesystem demons have elected to change the filename to all lowercase. Thank you but.. no thanks. I want (and Eclipse does and probably several other applications) the filename to stay in whatever case it was in when the file was created/copied/moved.

I am thinking this is not a 'limitation' of FAT32 because under windows the case of the filename is preserved. - so the issue must be in linux handling of the vfat filesystem.

I have Googled for hours and asked for assistance from friends before submitting this plea for help. I have tried multiple mount and fstab options including the 'win95', 'mixed', 'winnt' options for 'shortname'. I have tried setting the 'check=s' option, etc.

The below mount options _still_ do not allow me to create an all uppercase filename. -the filename will be changed to all lowercase automatically no matter what I do.

mount -t vfat -o check=s,codepage=850,iocharset=iso8859-1,shortname=win95 /dev/sda1 /mnt/flash


current /ect/fstab settings -- no luck here either

/dev/sda1 /mnt/flash vfat noauto,noatime,users,shortname=win95,check=s,codepage=850,iocharset=utf8 0 0

has/can anyone get a USB vfat device to respect filename case consistantly in linux?


:scratch: :Pengy:

IBall 10-07-2006 10:56 PM

Welcome to LQ!

AFAIK, FAT32 does not respect case on Windows either. Windows adds an extra layer somewhere to preserve case, but I think it is independent of the file system.

Is there any reason why you are working on a USB drive?

May I suggest that you download another Linux distro, such as Fedora Core 5, and set it up to dual boot with Windows. There are plenty of sites that tell you how to do this. Install eclipse, and then you should have no problems with file names, etc.

I hope this helps
--Ian

Sepero 10-07-2006 11:50 PM

Fat32 does not recognise uppercase. If you need uppercase, you will have to use a filesystem that supports it. I think somebody makes a Microsoft program that can write to the ext2 filesystem. Ext2 is like Fat32 for Linux, but it supports capitalization.

EDIT: After futher testing it appears that Fat32 DOES support capitalization. The only exception is when the entire-filename is capitalized. In that case, it will save as lowercase. This testing done on a Linux system.

khaleel5000 10-08-2006 03:37 AM

I agree with IBALL , wonkocz if you are a newbie and need to use linux, then i suggest you get lock and loaded distros like pclinuxos , suse , etc so you dont have much problem installing programmes in the initial phase of your linux experience
I recommend Pclinuxos its very good , one cd , live install cd and has a great arsenal of programmes.
homepage
pclinuxos.com

wonkocz 10-08-2006 06:21 AM

Quote:

Originally Posted by IBall

Welcome to LQ!

AFAIK, FAT32 does not respect case on Windows either. Windows adds an extra layer somewhere to preserve case, but I think it is independent of the file system.

Thanks for the fine welcome :)

In respect to your statemenet above that FAT32 does not respect case on Windows - When writing the files from a windows system any case I put the file in is preserved and remembered even after rebooting, etc. And if I move the USB card to another windows machine, that 'layer' must go with it becase the case of the files is interpreted the same.

So again, the file system seems to have all it needs for the case of the files to be respected and preserved. Perhaps it is interpreting it using another layer, but why can't linux use an extra layer for vfat as well? Isn't that the job of the file system interpreter do that? --Don't tell me as a newbee I'm going to have to write a filesystem level driver just to get linux to do what I want. Actually go ahead. It is the 'story of my life' as a software developer to always freaking bump into the edge of whatever technology I touch just trying to do what I consider 'normal use'.


Quote:

Originally Posted by IBall
Is there any reason why you are working on a USB drive?

I am using a 2GB USB card and trying to create a useful development environment on an older laptop which has limited memory and space, and happens to belong to someone else. So I need the following:

1) The main OS can't be disturbed
2) The memory usage needs to be frugal
3) I need to take my files with me when I am working on other machines. some of my work is confidential.

With my limited knowledge I tried building a QEMU? boot from puppy 2.10 but decided that was too much to bite off at this time and it also would end up using more memory in the host OS.

Getting the USB boot to work to begin with was quite an ordeal, after much reading of the puppy forums I finally found I needed to use a much older init script to properly detect USB and un-pack and change files in the initrd.gz But once that was working, puppy seems to have all the things I need to get the Java environment up and running, including Eclipse. In fact, right now if I point Eclipse at an ext2 or 3 filesystem Eclipse works GREAT.

The problem here, I am coming to understand, is that linux (in general?) does not know how to use the FAT file system properly.

--Now this is a bit confusing to me as linux is touted as the 'can do anything' OS and it is hard to believe it cannot handle a filesystem that has been around almost a decade as well or better than windows.

I don't know if I have the expertise to modify the way linux interacts with the filesystem but I will research it and perhaps give it a shot if no one else has bothered to fix an obviously broken aspect of interacting with the windows file system. From doing tons of Google searches trying to fix this I have seen that this problem hinders people trying to come to linux from a windows background, dual booting. And now is beginig to affect people trying to use the newer high storage capable USB devices. Again, Eclipse isn't the only program having trouble out there. Even CVS was having issues with it in one article I read!


Quote:

Originally Posted by IBall
May I suggest that you download another Linux distro, such as Fedora Core 5, and set it up to dual boot with Windows. There are plenty of sites that tell you how to do this. Install eclipse, and then you should have no problems with file names, etc.

Ian, I have Sled 10 installed on two other systems but it doesn't help with the USB issue. From from what I have read, Sled uses the ReiserFS? on the main file systems but Sled would have the same trouble reading and writing to a vfat partition on a USB device. Please correct me if I am wrong.


Quote:

Originally Posted by IBall
I hope this helps
--Ian

I'm still as stuck as I was before and loosing hope fast. Thanks for trying to help though!

wonkocz 10-08-2006 06:28 AM

Quote:

Originally Posted by Sepero
Fat32 does not recognise uppercase. If you need uppercase, you will have to use a filesystem that supports it. I think somebody makes a Microsoft program that can write to the ext2 filesystem. Ext2 is like Fat32 for Linux, but it supports capitalization.


Hi, thanks for the thought Sepero.


I have the Ext2IFS driver in windows XP but then I run into an obvious shortcoming of windows which is windows only sees the _first_ partition on a USB device no matter what you do. The writer of the ext2 driver said as much in his FAQ. In this case linux is superior as I expected it would be :)

I tried formatting the USB stick ext3 but then it won't boot.

I then cfdisked and formatted the partition in two pieces with the 'boot' part on a FAT32 parition and a second ext3 partition for a workspace.

This seemed to work and may be the solution I have to live with, But then I no longer have the ability to plug the USB device into windows and transfer projects to my little development environment. :/

wonkocz 10-08-2006 06:33 AM

Quote:

Originally Posted by khaleel5000
I agree with IBALL , wonkocz if you are a newbie and need to use linux, then i suggest you get lock and loaded distros like pclinuxos , suse , etc so you dont have much problem installing programmes in the initial phase of your linux experience
I recommend Pclinuxos its very good , one cd , live install cd and has a great arsenal of programmes.
homepage
pclinuxos.com

Thanks for the alternate distro suggestion.

I will check out pclinux as I want to find one that is 'just right' and will be contined to be supported in the future.

I tried DSL but the windowing system was incompatible with Eclipse. So far other than the USB boot fiasco Puppy seems to be fine for a live CD/USB. As a Java developer puppy may be fine. But when I want to 'make' something I am thinking puppy may not have the needed libraries as it is only 70MB. I am not that good yet at finding and installing needed libraries :S

IBall 10-08-2006 07:16 AM

I am not familiar with Puppy Linux. On my Ubuntu system, however, filenames are case-preserved correctly from my VFAT USB stick.

Thus, it appears that case preserving does work, but perhaps not on Puppy Linux. It is quite likely that your SLED (Suse ??) system will work correctly - try it and see.

Otherwise, you may have to live with your solution of creating a separate ext3 partition on the usb stick.

--Ian

PS: be careful working on a flash memory device. Flash memory has a limitted number of times that it can be written to, and I know people whose data has been corrupted because of this. Keep regular backups on another machine.

wonkocz 10-08-2006 08:50 AM

Quote:

Originally Posted by IBall
I am not familiar with Puppy Linux. On my Ubuntu system, however, filenames are case-preserved correctly from my VFAT USB stick.

Thus, it appears that case preserving does work, but perhaps not on Puppy Linux. It is quite likely that your SLED (Suse ??) system will work correctly - try it and see.

Otherwise, you may have to live with your solution of creating a separate ext3 partition on the usb stick.

--Ian

PS: be careful working on a flash memory device. Flash memory has a limitted number of times that it can be written to, and I know people whose data has been corrupted because of this. Keep regular backups on another machine.

OK, thanks for the warning about USB Hmmm. the 2GB Stick has a lifetime warranty but am wondering if I will run into trouble :/

Puppy also has the option of session saving on CD or DVD. Maybe I will do that instead of USB.

I will try the case test from SLED right now, I didn't test on other 'nixes because I figured all distros handling of an 8 year old file system (vfat) would be the same.

I will post results soon. :)

wonkocz 10-08-2006 08:57 AM

Success Ian!

Sled writes the filenames in all uppercase correctly so this seems to be a problem with puppy. I will cross link this post to the puppy forum to see if they can help.

Thanks everyone for all your help and especialy Ian for not giving up on me :)

Now I am worried about USB reliability. hehe

b0uncer 10-08-2006 09:30 AM

Quote:

Now I am worried about USB reliability. hehe
Don't be. I don't think you can, in a normal work, write to a usb (flash) memory so many times it gets screwed because of that..it's far more probable that the thing gets broken all by itself (I've met several devices like this), without you helping in it by writing data ten billion times to it. :)

I wonder who can give a lifetime warranty for a flash memory..I mean, (not if but) when it breaks down, which it will eventually do if you just keep it for decades, they would have to give you a new one. Or do they just rely on the fact that most people throw their working flash memories into trash when they get too small (i.e. in the past 64MB cards were considered "big", nowadays a 2GB card isn't that "big" anymore)?

wonkocz 10-08-2006 09:40 AM

I am using dual channel 'OCZ Rally' USB memory, thus the OCZ in the name :) I have heard nothing but good reports about the speed and reliability from this company. :)

wonkocz 10-08-2006 01:01 PM

Please note after discovering this was a puppy distro issue (or settings I have changed inside my copy of the distro) I tried create a discussion in the puppy forum but a moderator has closed the thread. http://www.linuxquestions.org/questi...d.php?t=490561


Moderator, if would, please move this thread to the puppy forum. Thank you.

juanapblode 11-15-2006 09:51 PM

RE: Grrr! vfat not respecting all uppercase filenames
 
Please use another shell like csh o ksh, I have got the same problem and I solved to change shell, don't use bash

Regards and have a nice day

matthewg42 11-16-2006 05:39 AM

On the original problem, I can think of two possibilities which might have solved without having to change distro:

1. With vfat filesystems, the mount option "posix" will make Linux respect case, else upper and lower case file names are considered the same. See also the "shortname" option in the vfat options section of the mount manual page.

2. If the mount options thing just doesn't work, you could have created a loop back filesystem inside a file on your vfat filesystem, formatted it with ext2 or something similar, mounted that and done your eclipse work "inside" this.


All times are GMT -5. The time now is 11:26 PM.