LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 10-07-2006, 10:11 PM   #1
wonkocz
LQ Newbie
 
Registered: Oct 2006
Distribution: puppy
Posts: 10

Rep: Reputation: 0
Angry 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



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'.



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?


 
Old 10-07-2006, 10:56 PM   #2
IBall
Senior Member
 
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 61
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
 
Old 10-07-2006, 11:50 PM   #3
Sepero
Member
 
Registered: Jul 2004
Location: Tampa, Florida, USA
Distribution: Ubuntu
Posts: 733
Blog Entries: 1

Rep: Reputation: 30
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.

Last edited by Sepero; 10-08-2006 at 04:26 PM.
 
Old 10-08-2006, 03:37 AM   #4
khaleel5000
Member
 
Registered: Oct 2005
Location: Pakistan
Distribution: Debian,Pclinuxos
Posts: 327

Rep: Reputation: 31
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
 
Old 10-08-2006, 06:21 AM   #5
wonkocz
LQ Newbie
 
Registered: Oct 2006
Distribution: puppy
Posts: 10

Original Poster
Rep: Reputation: 0
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!
 
Old 10-08-2006, 06:28 AM   #6
wonkocz
LQ Newbie
 
Registered: Oct 2006
Distribution: puppy
Posts: 10

Original Poster
Rep: Reputation: 0
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. :/
 
Old 10-08-2006, 06:33 AM   #7
wonkocz
LQ Newbie
 
Registered: Oct 2006
Distribution: puppy
Posts: 10

Original Poster
Rep: Reputation: 0
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
 
Old 10-08-2006, 07:16 AM   #8
IBall
Senior Member
 
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 61
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.
 
Old 10-08-2006, 08:50 AM   #9
wonkocz
LQ Newbie
 
Registered: Oct 2006
Distribution: puppy
Posts: 10

Original Poster
Rep: Reputation: 0
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.
 
Old 10-08-2006, 08:57 AM   #10
wonkocz
LQ Newbie
 
Registered: Oct 2006
Distribution: puppy
Posts: 10

Original Poster
Rep: Reputation: 0
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
 
Old 10-08-2006, 09:30 AM   #11
b0uncer
Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
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)?
 
Old 10-08-2006, 09:40 AM   #12
wonkocz
LQ Newbie
 
Registered: Oct 2006
Distribution: puppy
Posts: 10

Original Poster
Rep: Reputation: 0
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.
 
Old 10-08-2006, 01:01 PM   #13
wonkocz
LQ Newbie
 
Registered: Oct 2006
Distribution: puppy
Posts: 10

Original Poster
Rep: Reputation: 0
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.
 
Old 11-15-2006, 09:51 PM   #14
juanapblode
LQ Newbie
 
Registered: Nov 2006
Posts: 1

Rep: Reputation: 0
Lightbulb 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
 
Old 11-16-2006, 05:39 AM   #15
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 62
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.
 
  


Reply

Tags
filenames, mounting, vfat


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
samba replaces Uppercase char in filenames to lowercase srikz Other *NIX 3 03-03-2006 08:59 AM
Uppercase filenames showing in lowercase rvoigt Linux - General 1 02-20-2006 11:07 PM
copy files and make all filenames uppercase pas Linux - Newbie 1 12-19-2004 11:39 PM
samba replaces Uppercase char in filenames to lowercase srikz Red Hat 1 10-26-2004 03:47 AM
External harddrive FAT32- VFAT options (uppercase to lowercase file name translation) pauquetb Linux - General 1 03-20-2004 12:52 PM


All times are GMT -5. The time now is 11:01 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration