This is the old SliTaz forum - Please use the main forum.slitaz.org

[solved] SD-card not recognized
  • loislois October 2010
    Hi,

    I have a problem getting my card reader to work on a foxconn nt-330i.

    I tried the steps listed in this thread:
    http://forum.slitaz.org/index.php/discussion/690/solved-sd-card-mmc-not-recognized
    (I also tried to modprobe all modules provided by linux-mmc, but no success)

    Slitaz seems to recognize the hardware ( a Genesys GL826-chip based onboard card-reader, fully compliant to usb 2.0 ), but does nothing when I insert a sd-card ( tried 3 different ones ):

    lsusb:

    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
    Bus 001 Device 004: ID 1043:8012 iCreate Technologies Corp.
    Bus 001 Device 005: ID 1241:1503 Belkin Keyboard
    Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 002: ID 13fd:2040 Initio Corporation
    Bus 002 Device 003: ID 05e3:0716 Genesys Logic, Inc.
    Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 003 Device 002: ID 046d:c00e Logitech, Inc. M-BJ58/M-BJ69 Optical Wheel Mouse
    Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub


    dmesg:

    SCSI subsystem initialized
    scsi2 : SCSI emulation for USB Mass Storage devices
    scsi 2:0:0:0: Direct-Access Generic STORAGE DEVICE 9732 PQ: 0 ANSI: 0
    sd 2:0:0:0: Attached scsi generic sg2 type 0
    usb-storage: device scan complete
    sd 2:0:0:0: [sdb] Attached SCSI removable disk


    When I boot ubuntu10.04-live, kernel 2.6.32 on the foxconn nt-330i the sd-card is recognized as mass storage. So I tried to compile a new slitaz kernel with the ubuntu kernel config. but no success as well.

    dmesg on ubuntu:

    [ 5.556629] scsi2 : SCSI emulation for USB Mass Storage devices
    [ 10.560484] usb-storage: device scan complete
    [ 10.563928] scsi 2:0:0:2: Direct-Access Generic STORAGE DEVICE 9732 PQ: 0 ANSI: 0
    [ 10.567042] sd 2:0:0:2: Attached scsi generic sg4 type 0
    [ 10.589573] sd 2:0:0:2: [sdd] Attached SCSI removable disk
    [ 327.601315] EXT3 FS on sdd2, internal journal
    [ 482.972978] sd 2:0:0:2: [sdd] 8024064 512-byte logical blocks: (4.10 GB/3.82 GiB)
    [ 482.974964] sd 2:0:0:2: [sdd] Assuming drive cache: write through
    [ 482.977973] sd 2:0:0:2: [sdd] Assuming drive cache: write through
    [ 482.977983] sdd: sdd1 sdd2
    [ 483.451862] EXT3 FS on sdd2, internal journal
    [ 475.972896] Modules linked in: nls_iso8859_1 vfat fat binfmt_misc ppdev lp parport snd_hda_codec_nvhdmi snd_hda_codec_realtek snd_hda_intel snd_hda_codec snd_hwdep snd_pcm_oss snd_mixer_oss snd_pcm snd_seq_dummy snd_seq_oss snd_seq_midi snd_rawmidi snd_seq_midi_event arc4 snd_seq iptable_filter ecb snd_timer ip_tables snd_seq_device x_tables ath9k snd mac80211 led_class psmouse ath shpchp atl1c serio_raw soundcore cfg80211 i2c_nforce2 snd_page_alloc dm_crypt squashfs aufs nls_cp437 isofs usbhid dm_raid45 xor usb_storage


    Could this be a kernel issue anyhow or has anyone an idea why slitaz doesn't recognize the sd-cards. Does Slitaz somehow handle usb-storage in another way ubuntu does?

    Any help would be very appreciated!





  • Trixar_zaTrixar_za October 2010
    To answer your question, yes, SliTaz handels hardware differently than Ubuntu 10.04. Actually, one of the newest things about this year in Ubuntu, Fedora and the like is that totally did away with the use of HAL and is using udev and it's extentions to do the work HAL once did.

    It's clear from the information your providing that it's detecting, but for some reason it's not showing up... Have you tried mount /dev/sdd from the terminal? My DVD-ROM gives me a similar issue and I have to forcefully mount it. But once that's done I can access it from the /media folder. I did have to mkdir the directory that mount was expecting in /media though.
  • loislois October 2010
    Forcibly mount the sd-card didn't work:

    mount /dev/sdb/ /media/sd
    mount: mounting /dev/sdb on /media/sd failed: No medium found


    It looks like hald and udevd are running

    ps | grep hal | grep sdb && ps | grep udev
    2217 root hald-addon-storage: polling /dev/sdb (every 2 sec)
    750 root /sbin/udevd --daemon
    2429 root /sbin/udevd --daemon
    2430 root /sbin/udevd --daemon
    13971 root grep udev


    Could it help switching fom hald-addon-storage to something like udev-addon-storage ?

  • mojomojo October 2010
    Did you install linux-mmc.tazpkg and modprobe:
    /lib/modules/2.6.30.6-slitaz/kernel/drivers/mmc/card/mmc_block.ko.gz
    /lib/modules/2.6.30.6-slitaz/kernel/drivers/mmc/card/sdio_uart.ko.gz
    /lib/modules/2.6.30.6-slitaz/kernel/drivers/mmc/core/mmc_core.ko.gz
    /lib/modules/2.6.30.6-slitaz/kernel/drivers/mmc/host/sdhci-pci.ko.gz
    /lib/modules/2.6.30.6-slitaz/kernel/drivers/mmc/host/sdhci.ko.gz

    If this works add to /etc/rcS.conf LOAD_MODULES=

    If you still can't read/write the card:
    Post output with sd card in reader:
    root@slitaz: fdisk -l

    root@slitaz: lsmod

  • Trixar_zaTrixar_za October 2010
    Hmmm, when I tried mount /dev/dvd the first time, it gave me a similar error. I just su to root and mkdir /media/dvd/ to make it work. Maybe you need to try mkdir /media/sd/ as root and see if that helps force mounting to work.

    As for the full udev support, you've given me an idea and maybe I can partially use the same system Ubuntu is using right now. It will either break my system or provide a good fix. So I'll keep you guys up to date how badly I'll end up breaking my system by trying this... :P
  • loislois October 2010
    I tried installing linux-mmc and modprobing all modules, but no success. The card-reader seems to appear as usb-mass-storage, it is recognized as scsi-device sdb ( see dmesg of 1st post )
    fdisk -l has no output.

    root@slitaz:/home/tux# fdisk -l
    root@slitaz:/home/tux#
    root@slitaz:/home/tux# lsmod
    Module Size Used by Not tainted
    ipv6 198616 18
    ath9k 271500 0
    mac80211 138268 1 ath9k
    rfkill 8664 2 ath9k
    cfg80211 52872 2 ath9k,mac80211
    led_class 3436 1 ath9k
    atl1c 25388 0
    snd_hda_codec_nvhdmi 2564 1
    snd_hda_codec_realtek 179412 1
    snd_hda_intel 22020 1
    snd_hda_codec 49928 3 snd_hda_codec_nvhdmi,snd_hda_codec_realtek,snd_hda_intel
    snd_hwdep 5988 1 snd_hda_codec
    snd_pcm 51780 2 snd_hda_intel,snd_hda_codec
    snd_timer 16344 1 snd_pcm
    snd 43584 8 snd_hda_codec_realtek,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_timer
    soundcore 5180 1 snd
    snd_page_alloc 7248 2 snd_hda_intel,snd_pcm


    I wonder if there's a way to tell hald or udevd that ther's a sd-card (/dev/sdb1) present.
  • loislois October 2010
    @Trixar_za
    mounting to /media/sd has no effect.

    Do you think it is possible via udev-rules to get the sd-card work? ( the idea was to use the nettop without harddisk but a flash for booting a tazusb iso )
    Anyway full udev support sounds good, at least better than breaking the system does ;)



  • erniaernia October 2010
    looking at your dmesg output it seems that you have a problem with partitions or filesystem instead of card reader.
    i can't see mmc_block in your lsmod output, may you
    modprobe mmc_block
    , check if it works, and if it does not work post the output of
    tail /var/log/messages
    ?
    are you on 3.0?
  • loislois October 2010
    i tried modprobing mmc_block but it did'nt help. the problem is that my card reader is detected as generic-storage scsi device sdb, but unlike the usb-stick sda no hardware sectors / partitions etc. are found

    /var/log/messages:

    Oct 6 17:39:44 (none) user.notice kernel: scsi 0:0:0:0: Direct-Access Flash Drive 1.00 PQ: 0 ANSI: 2
    Oct 6 17:39:44 (none) user.notice kernel: sd 0:0:0:0: Attached scsi generic sg0 type 0
    Oct 6 17:39:44 (none) user.notice kernel: sd 0:0:0:0: [sda] 2011136 512-byte hardware sectors: (1.02 GB/982 MiB)
    Oct 6 17:39:44 (none) user.notice kernel: sd 0:0:0:0: [sda] Write Protect is off
    Oct 6 17:39:44 (none) user.debug kernel: sd 0:0:0:0: [sda] Mode Sense: 03 00 00 00
    Oct 6 17:39:44 (none) user.err kernel: sd 0:0:0:0: [sda] Assuming drive cache: write through
    Oct 6 17:39:44 (none) user.debug kernel: usb-storage: device scan complete
    Oct 6 17:39:44 (none) user.err kernel: sd 0:0:0:0: [sda] Assuming drive cache: write through
    Oct 6 17:39:44 (none) user.info kernel: sda:
    Oct 6 17:39:44 (none) user.info kernel: sda1
    Oct 6 17:39:44 (none) user.notice kernel: sd 0:0:0:0: [sda] Attached SCSI removable disk
    Oct 6 17:39:44 (none) user.notice kernel: scsi 2:0:0:0: Direct-Access Generic STORAGE DEVICE 9732 PQ: 0 ANSI: 0
    Oct 6 17:39:44 (none) user.notice kernel: sd 2:0:0:0: Attached scsi generic sg2 type 0
    Oct 6 17:39:44 (none) user.debug kernel: usb-storage: device scan complete
    Oct 6 17:39:44 (none) user.notice kernel: sd 2:0:0:0: [sdb] Attached SCSI removable disk

  • erniaernia October 2010
    I have a card reader that reproduce a similar behavior.
    In my case i think that the problem resides in the output of this command:
    zcat /proc/config.gz | grep CONFIG_SCSI_MULTI_LUN
    As you can see multilun support is disabled in default Slitaz kernel, so if your card reader, like mine, is a multicard reader (it surely is scsi), it probably see only the first lun. E.g. mine reads only CF and not sd.
    http://cateee.net/lkddb/web-lkddb/SCSI_MULTI_LUN.html
    http://www.cs.sfu.ca/~ggbaker/personal/cf-linux
    I have just a liveusb system and no time now to recompile the kernel with
    CONFIG_SCSI_MULTI_LUN=y
    but i would bet that this would solve your problem, and from another post i know that you know how to recompile a kernel, so if you want to give it a try and let me know ... ;-)
  • loislois October 2010

    CONFIG_SCSI_MULTI_LUN=y

    ... compiled the kernel with this config and it works!
    thank you very, very much for this hint, ernia, you made my day :)
  • erniaernia October 2010
    not at all, now i know that it works and i'll include the config in my next kernel build :-)
  • slicelslicel March 2011
    "As you can see multilun support is disabled in default Slitaz kernel, so
    if your card reader, like mine, is a multicard reader (it surely is
    scsi), it probably see only the first lun."


    Would that prevent slitaz from using a modem on a sound card and would enabling multilun in the slitaz kernel fix it?

    Thank you

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership

SliTaz Social