Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
11-08-2005, 05:47 AM
|
#1
|
LQ Newbie
Registered: Jul 2004
Location: Pamplona (Spain)
Distribution: Fedora 4
Posts: 11
Rep:
|
vfat charset mount help
Hello all, that is my question.
I recently bought a external HD which now have a FAT32 partition and a EXT3 partition. I have no problem in recognize both partitions and I can mount both without problem. My question is: are there any way to set a default charset for all vfat partitions (external HD, internal HD, usb keys...)? I can change all the internal partitions charset in fstab but all the external drives are recognized when I plug them in, so the charset I need is not set by default.
The easier solution for me would be to set a different charset by default for all vfat partitions, is there any way to do that?
Thank you very much.
Iban.
|
|
|
11-08-2005, 06:18 AM
|
#2
|
LQ Guru
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131
Rep: 
|
when automounting devices, fstab is edited at runtime (just read mine) by fstab-sync. try reading it's manpage and so on..because the program that controls fstab, and causes the automated edit, defines at the same time which options (like charset) to use. so, I think you could alter the option there...
I have not done so myself, and I'm sorry I have no time to search for the answer myself (interests me too), because I don't have enough time. but personally I'd start by checking out whether or not fstab-sync edits your fstab, and what fstab-sync actually does, and how it can be affected.
|
|
|
11-08-2005, 06:32 AM
|
#3
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,224
|
automount (autofs) uses the file /etc/auto.master for configuration. In that file there is a map file (default name is /etc/auto.misc) where you define the mount options. For example in my /etc/auto.misc I use this line:
Code:
usb -fstype=vfat,rw,iocharset=iso8859-7 :/dev/sdc1
to automount my usb stick with support for iso8859-7 filenames. So you have to edit that file with the correct iocharset=... option.
Regards
|
|
|
11-08-2005, 09:05 AM
|
#4
|
LQ Newbie
Registered: Jul 2004
Location: Pamplona (Spain)
Distribution: Fedora 4
Posts: 11
Original Poster
Rep:
|
One solution
Hello, and thank you two for your replies.
I have solved the problem using the HAL (Hardware Abstraction Layer) facilities suggested by b0uncer. I've selected this option as all the new hardware connected is managed by HAL. I will explain the solution.
HAL has its own policies but you can add your own ones that are checked before doing the default. To do that, you only need to put your own policy files in the "/etc/hal/fdi/policy" directory as explained in fstab-sync man. You can find example policy files in "/usr/share/doc/hal-0.5.2/conf". I've used the "storage-policy-examples.fdi" sample as template to write my own file:
<?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- -->
<deviceinfo version="0.2">
<device>
<match key="block.is_volume" bool="true">
<match key="volume.fsusage" string="filesystem">
<match key="@block.storage_device:storage.vendor" string="FUJITSU">
<match key="@block.storage_device:storage.model" string="MHT2080AT">
<merge key="volume.policy.desired_mount_point" type="copy_property">volume.label</merge>
<!-- W95 FAT32 (LBA)-->
<match key="volume.partition.msdos_part_table_type" int="0x0c">
<merge key="volume.policy.mount_option.iocharset=utf8" type="bool">true</merge>
<merge key="volume.policy.mount_option.codepage=932" type="bool">true</merge>
</match>
</match>
</match>
</match>
</match>
</device>
With this policy file, all the volumes (partitions) of devices of vendor=FUJITSU and model=MHT2080AT are mounted in its volume label (volume.label) directory. Besides, all the partitions with FAT 32 LBA filesystem are mounted with charset utf8 and codepage 932.
The problem is that this only works for this device and you need to add a policy for each device. Maybe you can also modify the default policy file "/usr/share/hal/fdi/policy/10osvendor/10-storage-policy.fdi" but this solution is not recommended by the fstab-sync man page.
I hope this will help someone.
Iban.
|
|
|
All times are GMT -5. The time now is 08:16 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|