Mounting SD card with specific encoding

Tod Merley todbot88 at gmail.com
Wed Dec 26 04:02:22 UTC 2007


On Dec 25, 2007 12:19 PM, Dotan Cohen <dotancohen at gmail.com> wrote:
>
> On 25/12/2007, Tod Merley <todbot88 at gmail.com> wrote:
> > On Dec 24, 2007 9:47 PM, Dotan Cohen <dotancohen at gmail.com> wrote:
> > > On 25/12/2007, Tod Merley <todbot88 at gmail.com> wrote:
> > > > On Dec 24, 2007 3:21 PM, Dotan Cohen <dotancohen at gmail.com> wrote:
> > > > > How can I mount an SD card (via USB card reader) to have a specific
> > > > > filename encoding? My Fedora box is UTF-8, but the SD card in my Nokia
> > > > > 6288 seems to be CP1255 or ISO-8859-8. What mount command should I
> > > > > use? I read man mount and I see no mention of encodings.
> > > > >
> > > > > Thanks in advance.
> > > > >
> > > > > Dotan Cohen

> > >
> > > Dotan Cohen
> > >
> > > http://what-is-what.com
> > > http://gibberish.co.il
> > > א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת
> >
> > Hi Dotan Cohen!
> >
> > You are probably way ahead of me on this as well but what I found
> > (with the help from Ed Greshko and Lucia) is:
> >
> > The mount command to fix this will be something like:
> >
> > # mount -o codepage=1255,iocharset=iso8859-8,utf8 -t vfat /dev/sdb1
> > /media/myphonepictures
> >
> > # Has a very nice section on "The language selection parameters":
> > http://www.nslu2-linux.org/wiki/HowTo/MountFATFileSystems
> >
> > # Mention of the following:
> > charset=iso-8859-8  Hebrew Alphabet (ISO)
> > charset=windows-1255   Hebrew Alphabet (Windows)
> > # Found at (other Hebrew sets mentioned):
> > http://a4esl.org/c/charset.html
> >
> > # Wikipedia on Windows 1255
> > http://en.wikipedia.org/wiki/Windows-1255
> >
> > # Wikipedia on iso-8859-8
> > http://en.wikipedia.org/wiki/ISO-8859-8
> >
> > # Basic info on iso-8859-8 and iso-8859-8-I
> > http://www.fileformat.info/info/charset/ISO-8859-8/index.htm
> > http://www.fileformat.info/info/charset/ISO-8859-8-BIDI/index.htm
> >
> > I do hope this proves useful!
> >
> > Tod
>
> Thank you Tod. I had read the wikipedia articles, but NSLU2 page was
> excellent. I still cannot mount, I am getting this:
>
---- typos corrected above - below should be "codepage=1225" -----------

> $ sudo mount -o codepage=1225,iocharset=iso8859-8,utf8 -t vfat
> /dev/sdb1 /media/usb
> mount: wrong fs type, bad option, bad superblock on /dev/sdb1,
>        missing codepage or other error
>        In some cases useful info is found in syslog - try
>        dmesg | tail  or so
>
> -- snip from the end of dmesg --
> [420043.556000] usb 2-1: new low speed USB device using uhci_hcd and address 6
> [420043.756000] usb 2-1: configuration #1 chosen from 1 choice
> [420043.804000] input: HID 1241:1177 as /class/input/input44
> [420043.804000] input: USB HID v1.10 Mouse [HID 1241:1177] on usb-0000:00:1d.1-1
> [420704.856000] usb 3-1: new high speed USB device using ehci_hcd and address 26
> [420704.988000] usb 3-1: configuration #1 chosen from 1 choice
> [420704.988000] scsi7 : SCSI emulation for USB Mass Storage devices
> [420704.988000] usb-storage: device found at 26
> [420704.988000] usb-storage: waiting for device to settle before scanning
> [420709.988000] usb-storage: device scan complete
> [420709.988000] scsi 7:0:0:0: Direct-Access     Generic  USB SD Reader
>    1.00 PQ: 0 ANSI: 0
> [420709.988000] scsi 7:0:0:1: Direct-Access     Generic  USB CF Reader
>    1.01 PQ: 0 ANSI: 0
> [420709.988000] scsi 7:0:0:2: Direct-Access     Generic  USB SM Reader
>    1.02 PQ: 0 ANSI: 0
> [420709.988000] scsi 7:0:0:3: Direct-Access     Generic  USB MS Reader
>    1.03 PQ: 0 ANSI: 0
> [420710.176000] SCSI device sdb: 1984000 512-byte hdwr sectors (1016 MB)
> [420710.180000] sdb: Write Protect is off
> [420710.180000] sdb: Mode Sense: 03 00 00 00
> [420710.180000] sdb: assuming drive cache: write through
> [420710.180000] SCSI device sdb: 1984000 512-byte hdwr sectors (1016 MB)
> [420710.180000] sdb: Write Protect is off
> [420710.180000] sdb: Mode Sense: 03 00 00 00
> [420710.180000] sdb: assuming drive cache: write through
> [420710.180000]  sdb: sdb1
> [420710.184000] sd 7:0:0:0: Attached scsi removable disk sdb
> [420710.184000] sd 7:0:0:0: Attached scsi generic sg2 type 0
> [420710.188000] sd 7:0:0:1: Attached scsi removable disk sdc
> [420710.188000] sd 7:0:0:1: Attached scsi generic sg3 type 0
> [420710.188000] sd 7:0:0:2: Attached scsi removable disk sdd
> [420710.188000] sd 7:0:0:2: Attached scsi generic sg4 type 0
> [420710.192000] sd 7:0:0:3: Attached scsi removable disk sde
> [420710.192000] sd 7:0:0:3: Attached scsi generic sg5 type 0
> [420951.876000] Unable to load NLS charset cp1225
> [420951.876000] FAT: codepage cp1225 not found
>
> Might I need to install codepage cp1225? Is that something
> installable? I am still reviewing the NSLU2 page to see what I can
> come up with. I have tried narrowing down my options, and found this:
> $ sudo mount -o codepage=1225 /dev/sdb1 /media/usb
> mount: wrong fs type, bad option, bad superblock on /dev/sdb1,
>        missing codepage or other error
>        In some cases useful info is found in syslog - try
>        dmesg | tail  or so
>
> $ sudo mount -o  /dev/sdb1 /media/usb
> mount: can't find /media/usb in /etc/fstab or /etc/mtab
> $ sudo mount  /dev/sdb1 /media/usb
> $
>
> So it's the -o that seems to me to have been problematic. Man mount
> shows me that some -o options must be specified in /etc/fstab to work,
> however, I cannot specify _all_ the USB keychains that I will ever
> connect in fstab! I'd like to be able to connect any USB memory and
> have it 'just work', in fact, the wife demands it! :)
>
> Note also that I cannot unmount the device once mounted as above:
> $ sudo umount -a
> umount: /home: device is busy
> umount: /dev: device is busy
> umount: /proc/bus/usb: device is busy
> umount: /var/run: device is busy
> umount: /sys: device is busy
> umount: /: device is busy
>
> Note: I made a mistake... This is an Ubuntu system, not Fedora. I feel
> like a jerk as this is the second time that I've written to the Fedora
> list with an Ubuntu problem. I distro hop a lot, and sometimes loose
> track of what is installed where. I would still appreciate the wisdom
> of the Fedora gurus, Tom and everybody, and if I deserve a "go bug the
> Ubuntu list you traitor" then go ahead and flame me. I still need to
> fix this problem, though!
>
>
> Dotan Cohen
>
> http://what-is-what.com
> http://gibberish.co.il
> א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת
>
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
>
> --
> fedora-list mailing list
> fedora-list at redhat.com
> To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
>

Hi Dotan Cohen!

As Ed Greshko points out my dyslexia has soured the soup.  I saw 1255
but typed 1225 (twice!).  That little change may well fix it.

I regret the typo.

The mount command you used kind of scares me.  What I think you wanted
to do is to unmount your device located at /dev/sdb1.  What you told
your system to do was to unmount ALL file systems found in fstab!!  It
is good that the system will not unmount devices in use, you would
have lost it all.

To unmount /dev/sdb1 issue: umount /dev/sdb1.

Actually I used to contribute to both the Ubuntu and the Fedora lists.
 I have both on this machine. I tend to use Fedora when connected to
the Internet since I believe that it's pretty good implementation of
SELinux makes me a bit more secure in this more hostile world.  I am
glad to see this thread here since many languages are used by those
using Fedora.

The "messages" are a bit differant though.  Here is what happens when
I plug in my flash drive:

[root at localhost dev]# tail /var/log/messages
Dec 25 19:34:35 localhost kernel: sd 2:0:0:0: [sdb] 2013184 512-byte
hardware sectors (1031 MB)
Dec 25 19:34:35 localhost kernel: sd 2:0:0:0: [sdb] Write Protect is off
Dec 25 19:34:35 localhost kernel: sd 2:0:0:0: [sdb] Assuming drive
cache: write through
Dec 25 19:34:35 localhost kernel: sd 2:0:0:0: [sdb] 2013184 512-byte
hardware sectors (1031 MB)
Dec 25 19:34:35 localhost kernel: sd 2:0:0:0: [sdb] Write Protect is off
Dec 25 19:34:35 localhost kernel: sd 2:0:0:0: [sdb] Assuming drive
cache: write through
Dec 25 19:34:35 localhost kernel:  sdb: sdb1
Dec 25 19:34:35 localhost kernel: sd 2:0:0:0: [sdb] Attached SCSI removable disk
Dec 25 19:34:35 localhost kernel: sd 2:0:0:0: Attached scsi generic sg2 type 0
Dec 25 19:34:38 localhost hald: mounted /dev/sdb1 on behalf of uid 500

The last line is hald doing the automount.

You may find the command lsusb -v useful.  Also (from /dev before and
after inserting the flash drive):
[root at localhost dev]# ls -l sd*
brw-r----- 1 root disk 8, 0 2007-12-25 07:20 sda
brw-r----- 1 root disk 8, 1 2007-12-25 07:20 sda1
brw-r----- 1 root disk 8, 2 2007-12-25 07:20 sda2
brw-r----- 1 root disk 8, 3 2007-12-25 15:20 sda3
[root at localhost dev]# ls -l sd*
brw-r----- 1 root disk 8,  0 2007-12-25 07:20 sda
brw-r----- 1 root disk 8,  1 2007-12-25 07:20 sda1
brw-r----- 1 root disk 8,  2 2007-12-25 07:20 sda2
brw-r----- 1 root disk 8,  3 2007-12-25 15:20 sda3
brw-r----- 1 root disk 8, 16 2007-12-25 19:34 sdb
brw-r----- 1 root disk 8, 17 2007-12-25 19:34 sdb1

Well, I am rambling!  Did not sleep well last night.

After I get joined up on the BibleTime team I will re-join the Ubuntu list.

Have Fun!

Tod




More information about the users mailing list