Live Chat & Podcast at 1:00PM Eastern on Sunday!
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
Linux and Unix
Tag Cloud
access acer asus bios bsod computer crash desktop driver drivers error ethernet excel freeze gaming hard drive hardware hdmi internet laptop malware memory modem monitor motherboard mouse network printer problem ram registry repair router slow software sound trojan ubuntu 11.10 uninstall usb video virus vista wifi windows windows 7 windows 7 32 bit windows 7 64 bit windows xp wireless
Search
Search for:
Tech Support Guy Forums > Operating Systems > Linux and Unix >
File/folder names with less than 9 characters become small letters

Reply  
Thread Tools
pkdcet's Avatar
Computer Specs
Member with 40 posts.
 
Join Date: Oct 2009
Experience: Intermediate
17-Nov-2009, 07:07 PM #1
File/folder names with less than 9 characters become small letters
Hi,
I am trying to use my pen drive which is having FAT32 file partition. But while transferring files from my linux partition(Ext3 in RHEL4) to my pen drive, I observe, all the files having names having more than 8 characters are displayed OK...but files with names less than or equal to 8 characters become transfered to all small letters....
Let me explain the problem with few examples.
Say I have a file named "CHAR8FLN" in my home folder. When I copy it my pen drive, it becomes "char8fln". But for a 9 character file "CHAR9FLNM" it comes up properly.
The same problem is observed for file names less than 8 characters and for more that 9 characers the file names remain as it is.
There is also another problem.
In my pen drive(FAT32 partition) I am not able to create two different files like "ChAr9FlNm" and "cHaR9fLnM". Even though I create the second file it seems, there is no further file created. But in my home folder the same process creates two different files.
For mounting the pen drive in RHEL4 I am using this command.


mount -t vfat /dev/sdc1 /media/PRATAP_8GB

Here is the content of the file /etc/fstab on my system. I think, the pen drive should be auto mounted as soon as I insert it. But it doesn't happen and I have to manually mount it every time.

# This file is edited by fstab-sync - see 'man fstab-sync' for details
LABEL=/12 / ext3 defaults 1 1
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tmpfs defaults 0 0
LABEL=/home1 /home ext3 defaults 1 2
none /proc proc defaults 0 0
none /sys sysfs defaults 0 0
/dev/hdc9 swap swap defaults 0 0
LABEL=SWAP-sda9 swap swap defaults 0 0
/dev/hda /media/cdrecorder auto pamconsole,exec,noauto,managed 0 0
/dev/sdc1 /media/PRATAP_8GB vfat pamconsole,exec,noauto,managed 0 0



Also I have several windows drives on my computer. But I am not able to see their content in RHEL4...I have seen that happen in other linux versions like ubuntu etc...by default. How can I get that sort of feature in RHEL 4 too? I need to use RHEL4 only as some of the tools I am running only run on RHEL 4 only.

Hoping for some positive responses,
Thanks in advance,
-Pratap
lotuseclat79's Avatar
Distinguished Member with 21,345 posts.
 
Join Date: Sep 2003
Location: -71.45091, 42.27841
17-Nov-2009, 11:36 PM #2
Hi pkdcet,

If your pendrive had been formatted as an ext3 file system, then you would be able to do what you want - but, not with a FAT32 file system which was built for Windows systems (i.e. not Linux or Unix) as I understand it unless for some reason I am mistaken on that point.

That said, what it means is that the FAT32 file system is probably hard-coded that way - unless there is some configuration file for it that can modify its operation to do what you want. I would concentrate on finding a good technical explanation of FAT32 that describes its operation in great detail - i.e. enough to cover the topic of what you are experiencing and whether there is a way to make it behave differently. Unless there is such a way what you are probably experiencing is its default behavior whether configured that way or by design (I do not know).

-- Tom
__________________
The independence created by philosophical insight is - in my opinion - the mark of distinction
between a mere artisan or specialist and a real seeker after truth. - Einstein 1944
Imagination is more important than knowledge. - Einstein
Lordandmaker's Avatar
Computer Specs
Member with 71 posts.
 
Join Date: Sep 2009
Location: London
Experience: Intermediate
18-Nov-2009, 09:56 AM #3
See this

The uppercase/lowercase issue is mostly down to what RH do to their kernels. I don't know exactly what it is, but it's been a common complaint for a while.
What should happen is FAT stores the filename in exactly the case you named it, but doesn't mind what case you use to call it.

ChAr9FlNm and cHaR9fLnM are exactly equivalent in FAT - it is case insenstive but also case preserving.
pkdcet's Avatar
Computer Specs
Member with 40 posts.
 
Join Date: Oct 2009
Experience: Intermediate
19-Nov-2009, 04:37 PM #4
When I tried this command to manually mount the devices, it solved the problem.
mount -t vfat -oshortname=winnt /dev/sdc1 /media/PRATAP_8GB

But I want my system to automatically do that whenever I insert pen drive. As far as I know the HAL Demon in RHEL4 handles that part...how can I add this extra option (shortname=winnt) to that servide?
Lordandmaker's Avatar
Computer Specs
Member with 71 posts.
 
Join Date: Sep 2009
Location: London
Experience: Intermediate
19-Nov-2009, 05:50 PM #5
It's the desktop environment that does the mounting - all hal does it tell the DE when something's inserted and what it is.

What DE are you running? It's most likely to be KDE or Gnome. Either have configuration options for what to do on device insertion, though I'm not sure if either allow you to specify options.

You can add a line the /etc/fstab as below:
Code:
[uuid] /media/PRATAP_8GB     vfat      defaults,shortname=winnt,auto,user     0      0
Where the uuid is found through
Code:
# vol_id /dev/sdc1
and is an amusingly long string of random characters.

You *can* put /dev/sdc1 in place of the UUID, but that's subject to change since those numbers are dished out in order of device discovery - if you plug another usb stick in first, that's likely to become /dev/sdc1.

This *might* (certainly should be) picked up by whatever hotplug daemon your DE runs. That bit I'm not so sure on, though you can certainly specify that it runs `mount -a` on discovering a new device, which would have the desired effect.
pkdcet's Avatar
Computer Specs
Member with 40 posts.
 
Join Date: Oct 2009
Experience: Intermediate
19-Nov-2009, 06:58 PM #6
Hi Lordmaker,
I am using KDE on RHEL 4.
As you suggested, I added the line...

[uuid] /media/PRATAP_8GB vfat defaults,shortname=winnt,auto,user 0 0

into the /etc/fstab file...But it didn't give any benefit, and seemed to be redundant as the Desktop Environment itself added two more lines into the file as soon as I inserted the pen drive.
This is the line it added...
/dev/sdc1 /media/PRATAP_PEN vfat pamconsole,noatime,sync,exec,noauto,managed 0 0
And the line I added previously had added still exists as...
[uuid] /media/PEN_DRIVE1 vfat defaults,shortname=winnt,auto,user 0 0

But on clicking PEN_DRIVE1, it seems to be an invalid drive. I can brows in PRATAP_PEN though (But with the short file name problem)
Please suggest if I am doing some thing wrong here.

Thanks,
Pratap


Lordandmaker's Avatar
Computer Specs
Member with 71 posts.
 
Join Date: Sep 2009
Location: London
Experience: Intermediate
19-Nov-2009, 07:06 PM #7
[uuid] should be replaced with the uuid of the device.

Alternatively, add shortname=winnt to the options list in the line added.

Unfortunately, it's been a long time since I've used KDE and even longer since RedHat.

Your best bet is likely to be to ask on a RedHat orientated forum (Redhat, CentOS and Fedora Core are all pretty much synonymous) if you're in a rush, or wait here for a red hat guy to come along. Unfortunately for you, most new Linux users plumped with Ubuntu.
Reply

Tags
auto mounting, fat32, fstab, mounting problem, vfat

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.
Thread Tools



Facebook Facebook Twitter Twitter TechGuy.tv TechGuy.tv Mobile TSG Mobile
You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 12:45 AM.
Copyright © 1996 - 2011 TechGuy, Inc. All rights reserved.

Powered by Cermak Technologies, Inc.