From: Jose J. R. <jo...@gm...> - 2006-05-26 03:39:35
|
I need feedback on the correct mount arguments for the different FS types. So far I've discussed, tested and tweaked the following: ReiseFS, NTFS, FAT12, FAT16 and FAT32. I don't have other FS type partitions to test with, nor available hardware to repartition for testing (I've used my working pendrive and USB hdd, or feedback in the Forum). Here are the current mount arguments used by vl-hot. I already know ext2 and ext3 are wrong, as feedback from Kocil tonight suggests. Also, what other FS types do you think should be implemented?: # Mount options: USB_USER=3Droot USB_GROUP=3Dusers USB_UMASK=3D0111 USB_DMASK=3D0000 # consider adding the noatime option to save writes to flash mem: MOUNTSYNC=3D"noatime" # MOUNTSYNC=3D"sync,dirsync"=09=09#too friggin' slow! function chooseMountOptions { =09case $fsType in =09Ext2) =09=09MOUNT_OPTIONS=3D"-o $MOUNTSYNC,uid=3D$USB_USER,gid=3D$USB_GROUP,umask=3D$USB_UMASK,user" =09=09fsMountTypeArg=3D"ext2" =09;; =09Ext3) =09=09MOUNT_OPTIONS=3D"-o $MOUNTSYNC,uid=3D$USB_USER,gid=3D$USB_GROUP,umask=3D$USB_UMASK,user" =09=09fsMountTypeArg=3D"ext3" =09;; =09ReiserFS) =09=09MOUNT_OPTIONS=3D"-o $MOUNTSYNC,user" =09=09fsMountTypeArg=3D"reiserfs" =09;; =09NTFS) =09=09#MOUNT_OPTIONS=3D"-o $MOUNTSYNC,uid=3D$USB_USER,gid=3D$USB_GROUP,umask=3D$USB_UMASK,dmask=3D$USB= _DMASK,user,ro" =09=09MOUNT_OPTIONS=3D"-o $MOUNTSYNC,uid=3D$USB_USER,gid=3D$USB_GROUP,umask=3D$USB_UMASK,dmask=3D$USB= _DMASK,user,rw" =09=09fsMountTypeArg=3D"ntfs" =09;; =09FAT12) =09 MOUNT_OPTIONS=3D"-o $MOUNTSYNC,uid=3D$USB_USER,gid=3D$USB_GROUP,umask=3D$USB_UMASK,dmask=3D$USB= _DMASK,quiet,user,iocharset=3Diso8859-15,utf8" =09=09fsMountTypeArg=3D"msdos" =09;; =09FAT16) =09=09MOUNT_OPTIONS=3D"-o $MOUNTSYNC,uid=3D$USB_USER,gid=3D$USB_GROUP,umask=3D$USB_UMASK,dmask=3D$USB= _DMASK,quiet,user,iocharset=3Diso8859-15,utf8" =09=09fsMountTypeArg=3D"vfat" =09;; =09FAT32) =09=09MOUNT_OPTIONS=3D"-o $MOUNTSYNC,uid=3D$USB_USER,gid=3D$USB_GROUP,umask=3D$USB_UMASK,dmask=3D$USB= _DMASK,quiet,user,shortname=3Dmixed,iocharset=3Diso8859-15,utf8" =09=09fsMountTypeArg=3D"vfat" =09;; *) =09=09MOUNT_OPTIONS=3D"UNKNOWN" =09=09fsMountTypeArg=3D"auto" =09;; =09esac } Note: I changed the NTFS mounting from ro to rw tonight by request from Vec= 7. Regards, Joe1962 |
From: Oleg <ya...@gm...> - 2006-05-26 07:20:26
|
No new FS types, just some notes... for vfat file systems: 1) I use options fmask=3D111,dmask=3D000 - otherwise all files look as exec= utable. 2) I think charsets should be configurable: you use iocharset=3Diso8859-15,utf8, I use iocharset=3Dcp1251,codepage=3D866. Or these options could be obtained authomatically: "iocharset" could be obtained from the system locale settings, and "codepage" could be defined by "iocharset" via some mapping of encodings (a subset of it would be Windows "ANSI to OEM" mapping). |
From: Jose J. R. <jo...@gm...> - 2006-05-26 07:53:11
|
On 5/26/06, Oleg <ya...@gm...> wrote: > No new FS types, just some notes... for vfat file systems: > 1) I use options fmask=3D111,dmask=3D000 - otherwise all files look as ex= ecutable. This is different from umask=3D0111 and dmask=3D0000 that vl-hot currently uses? Sorry, but file masks are still a sort of grey area for me. > 2) I think charsets should be configurable: you use > iocharset=3Diso8859-15,utf8, I use iocharset=3Dcp1251,codepage=3D866. Or > these options could be obtained authomatically: "iocharset" could be > obtained from the system locale settings, and "codepage" could be > defined by "iocharset" via some mapping of encodings (a subset of it > would be Windows "ANSI to OEM" mapping). Very good point. I'd need some help with this though. Another way could be the through configuration interface I always intended to make for vl-hot, but time is so short.... Regards, Joe1962 |
From: Oleg <ya...@gm...> - 2006-05-26 09:01:15
|
2006/5/26, Jose J. Rodriguez <jo...@gm...>: > This is different from umask=3D0111 and dmask=3D0000 that vl-hot currentl= y > uses? Sorry, but file masks are still a sort of grey area for me. For me too ;) Yes, you are right, "umask=3D0111,dmask=3D0000" yields the same result. > Very good point. I'd need some help with this though. I am ready to help. Also I would like VL-Live to generate fstab with encoding options, depending of the chosen locale - that could be a simple dialog/Xdialog dialog during startup, I saw such dialogs in some live distros. So, I'll try to write a script and maybe also a small C program, which will define two env. variables for use in fstab, say FSTAB_IOCHARSET and FSTAB_CODEPAGE. BTW the codepage can also be used for automatic setup of ncpfs (Novell Netware) and smbfs (Window Network). |
From: Oleg <ya...@gm...> - 2006-05-26 11:03:22
|
> > Very good point. I'd need some help with this though. Here is a first draft of my script, which needs additional charset mapping entries. At home I have some additional info about AnsiToOem mapping. --------------------- BEGIN ----------------------- #!/bin/sh export FSTAB_IOCHARSET=3D`locale charmap | tr A-Z a-z` case "$FSTAB_IOCHARSET" in "iso-8859-1" | "ansi_x3.4-1968" | "cp1252" ) FSTAB_CODEPAGE=3D"850";; # Latin 1 "iso-8859-2" | "cp1250" ) FSTAB_CODEPAGE=3D"852";; # Latin 2 "iso-8859-5" | "cp1251" | "koi8-r" | "koi8-u" ) FSTAB_CODEPAGE=3D"866";; # Cyrillic *) FSTAB_CODEPAGE=3D"437";; esac export FSTAB_IOCHARSET FSTAB_CODEPAGE echo "iocharset=3D$FSTAB_IOCHARSET,codepage=3D$FSTAB_CODEPAGE" --------------------- END ----------------------- |
From: Oleg <ya...@gm...> - 2006-05-26 11:37:22
|
Okay, now I am pretty sure about the rest of charset mappings, assume this is a beta version: --------------------- BEGIN ----------------------- #!/bin/sh export FSTAB_IOCHARSET=3D`locale charmap | tr A-Z a-z` case "$FSTAB_IOCHARSET" in "iso-8859-1" | "iso-8859-15" | "ansi_x3.4-1968" | "cp1252" ) FSTAB_CODEPAGE=3D"850";; # Latin-1 & Latin-9 "iso-8859-2" | "cp1250" ) FSTAB_CODEPAGE=3D"852";; # Latin-2 "iso-8859-5" | "cp1251" | "koi8-r" | "koi8-u" ) FSTAB_CODEPAGE=3D"866";; # Cyrillic "iso-8859-6" | "cp1250" ) FSTAB_CODEPAGE=3D"864";; # Arabic "iso-8859-7" ) FSTAB_CODEPAGE=3D"737";; # Greek "iso-8859-8" ) FSTAB_CODEPAGE=3D"862";; # Hebrew "iso-8859-9" | "cp1254" ) FSTAB_CODEPAGE=3D"857";; # Turkish "iso-8859-13" | "cp1257" ) FSTAB_CODEPAGE=3D"775";; # Baltic *) FSTAB_CODEPAGE=3D"437";; esac export FSTAB_IOCHARSET FSTAB_CODEPAGE echo "iocharset=3D$FSTAB_IOCHARSET,codepage=3D$FSTAB_CODEPAGE" --------------------- END ----------------------- |
From: Oleg <ya...@gm...> - 2006-05-26 11:44:28
|
However if the current encoding is UTF-8, then it's impossible to define FAT codepage automatically :( In this case it should be configured manually. |
From: Oleg <ya...@gm...> - 2006-05-26 13:06:08
|
2006/5/26, Oleg <ya...@gm...>: > However if the current encoding is UTF-8, then it's impossible to > define FAT codepage automatically :( > In this case it should be configured manually. Solution exists! We can check $LANG in this case! Here is Beta2: --------------------------- BEGIN ----------------------------- #!/bin/sh export FSTAB_IOCHARSET=3D`locale charmap | tr A-Z a-z` case "$FSTAB_IOCHARSET" in "iso-8859-2" | "cp1250" ) FSTAB_CODEPAGE=3D"852";; # Latin-2 "iso-8859-5" | "cp1251" | "koi8-r" | "koi8-u" | "koi8-t" ) FSTAB_CODEPAGE=3D"866";; # Cyrillic "iso-8859-6" | "cp1250" ) FSTAB_CODEPAGE=3D"864";; # Arabic "iso-8859-7" ) FSTAB_CODEPAGE=3D"737";; # Greek "iso-8859-8" ) FSTAB_CODEPAGE=3D"862";; # Hebrew "iso-8859-9" | "cp1254" ) FSTAB_CODEPAGE=3D"857";; # Turkish "iso-8859-13" | "cp1257" ) FSTAB_CODEPAGE=3D"775";; # Baltic "utf-8" ) case "${LANG:0:2}" in "bs" | "cs" | "hr" | "hu" | "pl" | "ro" | "sk" | "sl" ) FSTAB_CODEPAGE=3D"852";; # Latin-2 "be" | "bg" | "mk" | "ru" | "tg" | "uk" ) FSTAB_CODEPAGE=3D"866";; # Cyrillic "ar" ) FSTAB_CODEPAGE=3D"864";; # Arabic "el" ) FSTAB_CODEPAGE=3D"737";; # Greek "iw" | "he" ) FSTAB_CODEPAGE=3D"862";; # Hebrew "tr" ) FSTAB_CODEPAGE=3D"857";; # Turkish "lt" | "lv" | "mi" ) FSTAB_CODEPAGE=3D"775";; # Baltic *) FSTAB_CODEPAGE=3D"850";; # Latin-1 & Latin-9 esac;; *) FSTAB_CODEPAGE=3D"850";; # Latin-1 & Latin-9 esac export FSTAB_IOCHARSET FSTAB_CODEPAGE echo "iocharset=3D$FSTAB_IOCHARSET,codepage=3D$FSTAB_CODEPAGE" --------------------------- END ---------------------------- I decided to use codepade 850 by default, because I don't see any drawbacks of this decision. Does anybody see them? |
From: Oleg <ya...@gm...> - 2006-05-26 13:11:10
|
Sorry for too much letters from me today. I've just understood how to simplify the script: the FAT codepage can be determined by $LANG in all cases. Beta3: --------------------------- BEGIN ----------------------------- #!/bin/sh FSTAB_IOCHARSET=3D`locale charmap | tr A-Z a-z` case "${LANG:0:2}" in "bs" | "cs" | "hr" | "hu" | "pl" | "ro" | "sk" | "sl" ) FSTAB_CODEPAGE=3D"852";; # Latin-2 "be" | "bg" | "mk" | "ru" | "tg" | "uk" ) FSTAB_CODEPAGE=3D"866";; # Cyrillic "ar" ) FSTAB_CODEPAGE=3D"864";; # Arabic "el" ) FSTAB_CODEPAGE=3D"737";; # Greek "iw" | "he" ) FSTAB_CODEPAGE=3D"862";; # Hebrew "tr" ) FSTAB_CODEPAGE=3D"857";; # Turkish "lt" | "lv" | "mi" ) FSTAB_CODEPAGE=3D"775";; # Baltic *) FSTAB_CODEPAGE=3D"850";; # Latin-1 & Latin-9 esac export FSTAB_IOCHARSET FSTAB_CODEPAGE echo "iocharset=3D$FSTAB_IOCHARSET,codepage=3D$FSTAB_CODEPAGE" --------------------------- END ---------------------------- |