USB Drive/SD Card not marked as 'removable' when mounted

Questions about hardware,drivers and peripherals
Forum rules
Before you post please read how to get help
Post Reply
dongers
Level 1
Level 1
Posts: 10
Joined: Sun Sep 24, 2017 5:40 pm

USB Drive/SD Card not marked as 'removable' when mounted

Post by dongers » Mon Feb 05, 2018 2:45 pm

This appears to be a hardware issue, but is related to Fingerprint-GUI and saving a password to an external drive/removable device. Not sure if should go into the Applications section - Mods feel free to move!

When trying to save the logon password to a removable device (so that Gnome Keychain also gets unlocked by a fingerprint logon), no removable devices are available to save the password to.

Have tried to save to a 'normal' usb drive (16Gb Sandisk Cruzer) and to SD Card (2Gb Generic) mounted in the card reader on laptop (Lenovo T420)

Looking in /sys/class/block/mmcblk0 there IS a 'removable' file but it is set 0 not 1, therefore the disk is marked as non-removable.

Both USB Drive/SD Card automount correctly and are accessible in nemo etc, appear in /etc/mtab ok, but are always marked as non-removable (have tried various FS too)

Been googling all day, and found similar issues (see below) going back to 2009, but no resolutions. This doesn't appear to be a new problem.
https://ubuntuforums.org/showthread.php?t=1359208

So, is there anyway to mark a drive as 'removable' in /sys/class/block/mmcblk0/removable?

LM 18.3 Cinnamon, 64 Bit, Lenovo T420

Code: Select all

System:    Host: John-ThinkPad-T420 Kernel: 4.13.0-32-generic x86_64 (64 bit gcc: 5.4.0)
           Desktop: Cinnamon 3.6.7 (Gtk 3.18.9) Distro: Linux Mint 18.3 Sylvia
Machine:   System: LENOVO (portable) product: 4236KL3 v: ThinkPad T420
           Mobo: LENOVO model: 4236KL3
           Bios: LENOVO v: 83ET76WW (1.46 ) date: 07/05/2013
CPU:       Dual core Intel Core i5-2520M (-HT-MCP-) cache: 3072 KB
           flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 9967
           clock speeds: max: 3200 MHz 1: 2491 MHz 2: 2491 MHz 3: 2491 MHz
           4: 2491 MHz
Graphics:  Card: Intel 2nd Generation Core Processor Family Integrated Graphics Controller
           bus-ID: 00:02.0
           Display Server: X.Org 1.18.4 drivers: intel (unloaded: fbdev,vesa)
           Resolution: 1360x768@59.80hz
           GLX Renderer: Mesa DRI Intel Sandybridge Mobile
           GLX Version: 3.0 Mesa 17.2.4 Direct Rendering: Yes
Audio:     Card Intel 6 Series/C200 Series Family High Definition Audio Controller
           driver: snd_hda_intel bus-ID: 00:1b.0
           Sound: Advanced Linux Sound Architecture v: k4.13.0-32-generic
Network:   Card-1: Intel 82579LM Gigabit Network Connection
           driver: e1000e v: 3.2.6-k port: 4080 bus-ID: 00:19.0
           IF: enp0s25 state: down mac: <filter>
           Card-2: Intel Centrino Advanced-N 6205 [Taylor Peak]
           driver: iwlwifi bus-ID: 03:00.0
           IF: wlp3s0 state: up mac: <filter>
Drives:    HDD Total Size: 384.1GB (32.2% used)
           ID-1: /dev/mmcblk0 model: N/A size: 2.0GB
           ID-2: /dev/sda model: LITEONIT_LCS size: 256.1GB
           ID-3: /dev/sdb model: M4 size: 128.0GB
Partition: ID-1: / size: 231G used: 97G (44%) fs: ext4 dev: /dev/dm-0
           ID-2: /home size: 118G used: 16G (14%) fs: ext4 dev: /dev/sdb1
           ID-3: /boot size: 472M used: 138M (31%) fs: ext2 dev: /dev/sda1
           ID-4: swap-1 size: 4.08GB used: 0.00GB (0%) fs: swap dev: /dev/dm-1
RAID:      No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors:   System Temperatures: cpu: 41.0C mobo: N/A
           Fan Speeds (in rpm): cpu: 1858
Info:      Processes: 252 Uptime: 2:35 Memory: 3374.3/7753.7MB
           Init: systemd runlevel: 5 Gcc sys: 5.4.0
           Client: Shell (bash 4.3.481) inxi: 2.2.35 
Cheers

Dongers

dongers
Level 1
Level 1
Posts: 10
Joined: Sun Sep 24, 2017 5:40 pm

Re: USB Drive/SD Card not marked as 'removable' when mounted

Post by dongers » Thu Feb 08, 2018 4:58 am

*Bump*

anyone...?

Cheers

Dongers

User avatar
ClixTrix
Level 5
Level 5
Posts: 642
Joined: Wed Dec 09, 2015 11:40 am
Location: Columbus, Ohio, USA

Re: USB Drive/SD Card not marked as 'removable' when mounted

Post by ClixTrix » Thu Feb 08, 2018 11:12 am

I haven't used this product, but it sometimes helps to just discuss a problem with second opinion.

In looking at the Saving a Password section of the User Manual for Fingerprint GUI, I'm seeing a conflict.

http://www.ullrich-online.cc/fingerprin ... al_en.html

You're showing that the USB drives are mounting /dev/. They should mount as removable as /media/. So, that invites the question on why are they mounting wrong. If the app is showing no removable devices, then the flash drive isn't mounting correctly to start.

Are they showing in /etc/fstab and if so how are they showing, e.g. /dev/???
Linux Mint 18.3 x64 Cinnamon Kernel 4.15.0-22-generic
Gigabyte GA-AB350M-D3H (F20) / Ryzen 5 1600 / Micron Ballistix Sport DDR4 2400 2x8GB / XFX HD5450-1GB
NVMe-SSD Samsung EVO 960 250GB / HDD WD1600BEKT 160GB / SSD Toshiba OCZ VX500 512GB

dongers
Level 1
Level 1
Posts: 10
Joined: Sun Sep 24, 2017 5:40 pm

Re: USB Drive/SD Card not marked as 'removable' when mounted

Post by dongers » Thu Feb 15, 2018 5:49 am

Thanks for the response...wasnt sure if anyone was reading my post! ;)

Anyway, also tested this on my X201 and this works perfectly on there, difference being its not a Ricoh SD Card reader on the X201, looks like it is a realtek Controller

from lshw on X201

Code: Select all

*-usbhost
                product: EHCI Host Controller
                vendor: Linux 4.13.0-32-generic ehci_hcd
                physical id: 1
                bus info: usb@2
                logical name: usb2
                version: 4.13
                capabilities: usb-2.00
                configuration: driver=hub slots=3 speed=480Mbit/s
              *-usb
                   description: USB hub
                   product: Integrated Rate Matching Hub
                   vendor: Intel Corp.
                   physical id: 1
                   bus info: usb@2:1
                   version: 0.00
                   capabilities: usb-2.00
                   configuration: driver=hub slots=8 speed=480Mbit/s
                 *-usb
                      description: Mass storage device
                      product: USB2.0-CRW
                      vendor: Generic
                      physical id: 1
                      bus info: usb@2:1.1
                      logical name: scsi6
                      version: 58.88
                      serial: 20071114173400000
                      capabilities: usb-2.00 scsi emulated scsi-host
                      configuration: driver=ums-realtek maxpower=500mA speed=480Mbit/s
                    *-disk
                         description: SCSI Disk
                         physical id: 0.0.0
                         bus info: scsi@6:0.0.0
                         logical name: /dev/sdb
                         size: 1909MiB (2001MB)
                         capabilities: partitioned partitioned:dos
                         configuration: logicalsectorsize=512 sectorsize=512 signature=d88a6023
                       *-volume
                            description: Windows FAT volume
                            vendor: mkfs.fat
                            physical id: 1
                            bus info: scsi@6:0.0.0,1
                            logical name: /dev/sdb1
                            logical name: /media/john/key2
                            version: FAT32
                            serial: 82a9-b2d3
                            size: 1906MiB
                            capacity: 1908MiB
                            capabilities: primary fat initialized
                            configuration: FATs=2 filesystem=fat label=key mount.fstype=vfat mount.options=rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,showexec,utf8,flush,errors=remount-ro state=mounted
For completeness lshw from T420 (cant even see the ricoh device/SD card being listed here BUT it is mounted and available in nemo)

Code: Select all

john-thinkpad-t420        
    description: Notebook
    product: 4236KL3
    vendor: LENOVO
    version: ThinkPad T420
    serial: R8Y2XVE
    width: 64 bits
    capabilities: smbios-2.6 dmi-2.6 vsyscall32
    configuration: administrator_password=disabled chassis=notebook family=ThinkPad T420 power-on_password=disabled uuid=8129B79B-8A51-CB11-B515-C58C0E08A419
  *-core
       description: Motherboard
       product: 4236KL3
       vendor: LENOVO
       physical id: 0
       version: Not Available
       serial: 1ZJJP16A0DE
       slot: Not Available
     *-cpu
          description: CPU
          product: Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz
          vendor: Intel Corp.
          physical id: 1
          bus info: cpu@0
          version: Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz
          serial: Not Supported by CPU
          slot: CPU
          size: 1099MHz
          capacity: 3200MHz
          width: 64 bits
          clock: 100MHz
          capabilities: x86-64 fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp constant_tsc arch_perfmon pebs bts nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm epb pti tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm ida arat pln pts cpufreq
          configuration: cores=2 enabledcores=2 threads=4
        *-cache:0
             description: L1 cache
             physical id: 2
             slot: L1-Cache
             size: 64KiB
             capacity: 64KiB
             capabilities: synchronous internal write-through data
             configuration: level=1
        *-cache:1
             description: L2 cache
             physical id: 3
             slot: L2-Cache
             size: 256KiB
             capacity: 256KiB
             capabilities: synchronous internal write-through data
             configuration: level=2
        *-cache:2
             description: L3 cache
             physical id: 4
             slot: L3-Cache
             size: 3MiB
             capacity: 3MiB
             capabilities: synchronous internal write-back unified
             configuration: level=3
     *-memory
          description: System Memory
          physical id: 5
          slot: System board or motherboard
          size: 8GiB
        *-bank:0
             description: SODIMM DDR3 Synchronous 1333 MHz (0.8 ns)
             product: M471B5273DH0-CK0
             vendor: Samsung
             physical id: 0
             serial: E587A57B
             slot: ChannelA-DIMM0
             size: 4GiB
             width: 64 bits
             clock: 1333MHz (0.8ns)
        *-bank:1
             description: SODIMM DDR3 Synchronous 1333 MHz (0.8 ns)
             product: M471B5173BH0-CK0
             vendor: Samsung
             physical id: 1
             serial: 820CD3D9
             slot: ChannelB-DIMM0
             size: 4GiB
             width: 64 bits
             clock: 1333MHz (0.8ns)
     *-firmware
          description: BIOS
          vendor: LENOVO
          physical id: a
          version: 83ET76WW (1.46 )
          date: 07/05/2013
          size: 128KiB
          capacity: 8128KiB
          capabilities: pci pnp upgrade shadowing cdboot bootselect edd int13floppy720 int5printscreen int9keyboard int14serial int17printer int10video acpi usb biosbootspecification
     *-pci
          description: Host bridge
          product: 2nd Generation Core Processor Family DRAM Controller
          vendor: Intel Corporation
          physical id: 100
          bus info: pci@0000:00:00.0
          version: 09
          width: 32 bits
          clock: 33MHz
        *-display
             description: VGA compatible controller
             product: 2nd Generation Core Processor Family Integrated Graphics Controller
             vendor: Intel Corporation
             physical id: 2
             bus info: pci@0000:00:02.0
             version: 09
             width: 64 bits
             clock: 33MHz
             capabilities: msi pm vga_controller bus_master cap_list rom
             configuration: driver=i915 latency=0
             resources: irq:27 memory:f0000000-f03fffff memory:e0000000-efffffff ioport:4000(size=64) memory:c0000-dffff
        *-network UNCLAIMED
             description: Ethernet controller
             product: 82579LM Gigabit Network Connection
             vendor: Intel Corporation
             physical id: 19
             bus info: pci@0000:00:19.0
             version: 04
             width: 32 bits
             clock: 33MHz
             capabilities: pm msi cap_list
             configuration: latency=0
             resources: memory:f1500000-f151ffff memory:f1529000-f1529fff ioport:4080(size=32)
        *-usb:0
             description: USB controller
             product: 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2
             vendor: Intel Corporation
             physical id: 1a
             bus info: pci@0000:00:1a.0
             version: 04
             width: 32 bits
             clock: 33MHz
             capabilities: pm debug ehci cap_list
             configuration: driver=ehci-pci latency=0
             resources: irq:16 memory:f1528000-f15283ff
           *-usbhost
                product: EHCI Host Controller
                vendor: Linux 4.13.0-32-generic ehci_hcd
                physical id: 1
                bus info: usb@1
                logical name: usb1
                version: 4.13
                capabilities: usb-2.00
                configuration: driver=hub slots=3 speed=480Mbit/s
              *-usb
                   description: USB hub
                   product: Integrated Rate Matching Hub
                   vendor: Intel Corp.
                   physical id: 1
                   bus info: usb@1:1
                   version: 0.00
                   capabilities: usb-2.00
                   configuration: driver=hub slots=6 speed=480Mbit/s
                 *-usb:0 UNCLAIMED
                      description: Generic USB device
                      product: Biometric Coprocessor
                      vendor: UPEK
                      physical id: 3
                      bus info: usb@1:1.3
                      version: 0.02
                      capabilities: usb-1.01
                      configuration: maxpower=100mA speed=12Mbit/s
                 *-usb:1
                      description: Video
                      product: Integrated Camera
                      vendor: Chicony Electronics Co., Ltd.
                      physical id: 6
                      bus info: usb@1:1.6
                      version: 7.52
                      capabilities: usb-2.00
                      configuration: driver=uvcvideo maxpower=200mA speed=480Mbit/s
        *-multimedia
             description: Audio device
             product: 6 Series/C200 Series Chipset Family High Definition Audio Controller
             vendor: Intel Corporation
             physical id: 1b
             bus info: pci@0000:00:1b.0
             version: 04
             width: 64 bits
             clock: 33MHz
             capabilities: pm msi pciexpress bus_master cap_list
             configuration: driver=snd_hda_intel latency=0
             resources: irq:28 memory:f1520000-f1523fff
        *-pci:0
             description: PCI bridge
             product: 6 Series/C200 Series Chipset Family PCI Express Root Port 1
             vendor: Intel Corporation
             physical id: 1c
             bus info: pci@0000:00:1c.0
             version: b4
             width: 32 bits
             clock: 33MHz
             capabilities: pci pciexpress msi pm normal_decode cap_list
             configuration: driver=pcieport
             resources: irq:16 ioport:2000(size=4096) memory:dfa00000-dfbfffff ioport:dfc00000(size=2097152)
        *-pci:1
             description: PCI bridge
             product: 6 Series/C200 Series Chipset Family PCI Express Root Port 2
             vendor: Intel Corporation
             physical id: 1c.1
             bus info: pci@0000:00:1c.1
             version: b4
             width: 32 bits
             clock: 33MHz
             capabilities: pci pciexpress msi pm normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:17 memory:f1400000-f14fffff
           *-network
                description: Wireless interface
                product: Centrino Advanced-N 6205 [Taylor Peak]
                vendor: Intel Corporation
                physical id: 0
                bus info: pci@0000:03:00.0
                logical name: wlp3s0
                version: 34
                serial: a0:88:b4:ac:7d:90
                width: 64 bits
                clock: 33MHz
                capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
                configuration: broadcast=yes driver=iwlwifi driverversion=4.13.0-32-generic firmware=18.168.6.1 ip=192.168.0.33 latency=0 link=yes multicast=yes wireless=IEEE 802.11
                resources: irq:29 memory:f1400000-f1401fff
        *-pci:2
             description: PCI bridge
             product: 6 Series/C200 Series Chipset Family PCI Express Root Port 5
             vendor: Intel Corporation
             physical id: 1c.4
             bus info: pci@0000:00:1c.4
             version: b4
             width: 32 bits
             clock: 33MHz
             capabilities: pci pciexpress msi pm normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:16 ioport:3000(size=4096) memory:f0c00000-f13fffff ioport:f0400000(size=8388608)
           *-generic
                description: System peripheral
                product: MMC/SD Host Controller
                vendor: Ricoh Co Ltd
                physical id: 0
                bus info: pci@0000:0d:00.0
                version: 08
                width: 32 bits
                clock: 33MHz
                capabilities: msi pm pciexpress bus_master cap_list
                configuration: driver=sdhci-pci latency=0
                resources: irq:16 memory:f0c00000-f0c000ff
        *-usb:1
             description: USB controller
             product: 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1
             vendor: Intel Corporation
             physical id: 1d
             bus info: pci@0000:00:1d.0
             version: 04
             width: 32 bits
             clock: 33MHz
             capabilities: pm debug ehci cap_list
             configuration: driver=ehci-pci latency=0
             resources: irq:23 memory:f1527000-f15273ff
           *-usbhost
                product: EHCI Host Controller
                vendor: Linux 4.13.0-32-generic ehci_hcd
                physical id: 1
                bus info: usb@2
                logical name: usb2
                version: 4.13
                capabilities: usb-2.00
                configuration: driver=hub slots=3 speed=480Mbit/s
              *-usb
                   description: USB hub
                   product: Integrated Rate Matching Hub
                   vendor: Intel Corp.
                   physical id: 1
                   bus info: usb@2:1
                   version: 0.00
                   capabilities: usb-2.00
                   configuration: driver=hub slots=8 speed=480Mbit/s
        *-isa
             description: ISA bridge
             product: QM67 Express Chipset Family LPC Controller
             vendor: Intel Corporation
             physical id: 1f
             bus info: pci@0000:00:1f.0
             version: 04
             width: 32 bits
             clock: 33MHz
             capabilities: isa bus_master cap_list
             configuration: driver=lpc_ich latency=0
             resources: irq:0
        *-storage
             description: SATA controller
             product: 6 Series/C200 Series Chipset Family 6 port SATA AHCI Controller
             vendor: Intel Corporation
             physical id: 1f.2
             bus info: pci@0000:00:1f.2
             version: 04
             width: 32 bits
             clock: 66MHz
             capabilities: storage msi pm ahci_1.0 bus_master cap_list
             configuration: driver=ahci latency=0
             resources: irq:26 ioport:40a8(size=8) ioport:40b4(size=4) ioport:40a0(size=8) ioport:40b0(size=4) ioport:4060(size=32) memory:f1526000-f15267ff
        *-serial UNCLAIMED
             description: SMBus
             product: 6 Series/C200 Series Chipset Family SMBus Controller
             vendor: Intel Corporation
             physical id: 1f.3
             bus info: pci@0000:00:1f.3
             version: 04
             width: 64 bits
             clock: 33MHz
             configuration: latency=0
             resources: memory:f1524000-f15240ff ioport:efa0(size=32)
     *-scsi:0
          physical id: 0
          logical name: scsi0
          capabilities: emulated
        *-disk
             description: ATA Disk
             product: LITEONIT LCS-256
             physical id: 0.0.0
             bus info: scsi@0:0.0.0
             logical name: /dev/sda
             version: 10C
             serial: TW0XFJWX5508534K4408
             size: 238GiB (256GB)
             capabilities: partitioned partitioned:dos
             configuration: ansiversion=5 logicalsectorsize=512 sectorsize=512 signature=94e2051f
           *-volume:0
                description: Linux filesystem partition
                vendor: Linux
                physical id: 1
                bus info: scsi@0:0.0.0,1
                logical name: /dev/sda1
                logical name: /boot
                version: 1.0
                serial: 5fac8ef4-183c-4e07-91bb-5fa29d3334f2
                size: 487MiB
                capacity: 487MiB
                capabilities: primary bootable extended_attributes large_files ext2 initialized
                configuration: filesystem=ext2 lastmountpoint=/boot modified=2018-02-13 00:25:35 mount.fstype=ext2 mount.options=rw,noatime,block_validity,discard,barrier,user_xattr,acl mounted=2018-02-13 00:25:35 state=mounted
           *-volume:1
                description: Extended partition
                physical id: 2
                bus info: scsi@0:0.0.0,2
                logical name: /dev/sda2
                size: 237GiB
                capacity: 237GiB
                capabilities: primary extended partitioned partitioned:extended
              *-logicalvolume
                   description: Linux LVM Physical Volume partition
                   physical id: 5
                   logical name: /dev/sda5
                   serial: L1O3HF-k637-R6gN-CfKn-1x2p-9W8R-sFtaDa
                   size: 237GiB
                   capacity: 237GiB
                   capabilities: multi lvm2
     *-scsi:1
          physical id: 2
          logical name: scsi2
          capabilities: emulated
        *-disk
             description: ATA Disk
             product: M4-CT128M4SSD3
             physical id: 0.0.0
             bus info: scsi@2:0.0.0
             logical name: /dev/sdb
             version: 07MH
             serial: 0000000012100342CB6E
             size: 119GiB (128GB)
             capabilities: partitioned partitioned:dos
             configuration: ansiversion=5 logicalsectorsize=512 sectorsize=512 signature=b61e9839
           *-volume
                description: EXT4 volume
                vendor: Linux
                physical id: 1
                bus info: scsi@2:0.0.0,1
                logical name: /dev/sdb1
                logical name: /home
                version: 1.0
                serial: ba53b934-dea3-4b41-b8ae-b7020c9e474b
                size: 119GiB
                capacity: 119GiB
                capabilities: primary journaled extended_attributes large_files huge_files dir_nlink recover extents ext4 ext2 initialized
                configuration: created=2018-01-26 11:48:23 filesystem=ext4 lastmountpoint=/home modified=2018-02-13 00:25:35 mount.fstype=ext4 mount.options=rw,noatime,discard,data=ordered mounted=2018-02-13 00:25:35 state=mounted
  *-battery
       product: 42T4710
       vendor: SANYO
       physical id: 1
       slot: Rear
       capacity: 71280mWh
       configuration: voltage=10.8V
  *-network DISABLED
       description: Ethernet interface
       physical id: 2
       logical name: virbr0-nic
       serial: 52:54:00:ac:6d:3c
       size: 10Mbit/s
       capabilities: ethernet physical
       configuration: autonegotiation=off broadcast=yes driver=tun driverversion=1.6 duplex=full link=no multicast=yes port=twisted pair speed=10Mbit/s


To answer your questions about the mount points tho:
X201:
No entry in fstab for the card
mtab shows this:

Code: Select all

/dev/sdb1 /media/john/key2 vfat rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,showexec,utf8,flush,errors=remount-ro 0 0
T420:
No entry in fstab for the card
mtab shows this:

Code: Select all

/dev/mmcblk0p1 /media/john/key vfat rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,showexec,utf8,flush,errors=remount-ro 0 0
So it DOES look like the cards are being mounted in different ways

On googling a bit more about the Ricoh card readers, it seems like there has always been issues with them reading/mounting SD cards correctly, going back a LONG time. They will mount an SD card so it is accessible, but they have extra functionality for MMC Cards that *MAY* cause the result I'm seeing. I found a page (which i cannot now find, to refer to, might have been an actual bug report?) that mentioned something about disabling of the MMC functionality on the reader, within the driver. Tried this, but couldn't tell if it was working or not (and it didnt fix the issue). I think this is the most promising route to explore tho, as does seem like this is what I'm seeing (esp as the card appears to be mounted as an MMC device in mtab on the t420). Could be that i have (re)discovered a bug with the driver?

I will keep on digging around this area to see if i can get it working, but if anyone has seen this, or knows of this extra functionality for MMC cards on the Ricoh Card readers and how to disable it, please let me know!!! :)

Cheers

Dongers

dongers
Level 1
Level 1
Posts: 10
Joined: Sun Sep 24, 2017 5:40 pm

Re: USB Drive/SD Card not marked as 'removable' when mounted

Post by dongers » Thu Feb 15, 2018 7:17 am

More googling...found this:

https://cateee.net/lkddb/web-lkddb/MMC_RICOH_MMC.html

Which suggests that the MMC functionality in the driver isnt required (as covered by the standard SDHC driver) and causes issues. Using the ricoh_mmc module should disable the functionality. However, as this is for a VERY old kernel (2.6), i would imagine it has since been rolled up into the main kernel branches anyway (or at least the subsequent bug has been fixed by now).

lsmod | grep ricoh

gives no output, so the module certainly isnt being loaded...any ideas if the module is still available in the latest kernels (or how i can check to see if it is there), and how i can enable it to test? Or should i not enable, so as not to taint my kernel..?

Cheers

Dongers

User avatar
ClixTrix
Level 5
Level 5
Posts: 642
Joined: Wed Dec 09, 2015 11:40 am
Location: Columbus, Ohio, USA

Re: USB Drive/SD Card not marked as 'removable' when mounted

Post by ClixTrix » Thu Feb 15, 2018 8:05 am

So, the working system uses a USB drive controller, and the problem system uses a PCIe Bus MMC/SD controller. Although your original post suggested you did try USB flash drive on the T420 (probably the better way to make the comparison to troubleshoot).

I can definitely see the logical name for the working as /media/john/key2 reflecting removable.
Linux Mint 18.3 x64 Cinnamon Kernel 4.15.0-22-generic
Gigabyte GA-AB350M-D3H (F20) / Ryzen 5 1600 / Micron Ballistix Sport DDR4 2400 2x8GB / XFX HD5450-1GB
NVMe-SSD Samsung EVO 960 250GB / HDD WD1600BEKT 160GB / SSD Toshiba OCZ VX500 512GB

dongers
Level 1
Level 1
Posts: 10
Joined: Sun Sep 24, 2017 5:40 pm

Re: USB Drive/SD Card not marked as 'removable' when mounted

Post by dongers » Thu Feb 15, 2018 8:23 am

Looking more at kernel modules now....

sudo find /lib/modules/$(uname -r) -type f -name '*.ko*' | grep ricoh

Code: Select all

/lib/modules/4.13.0-32-generic/kernel/drivers/mmc/host/sdricoh_cs.ko
sudo modprobe sdricoh

Code: Select all

modprobe: FATAL: Module sdricoh not found in directory /lib/modules/4.13.0-32-generic
[/code]
sudo modprobe /lib/modules/4.13.0-32-generic/kernel/drivers/mmc/host/sdricoh_cs.ko

Code: Select all

modprobe: FATAL: Module /lib/modules/4.13.0-32-generic/kernel/drivers/mmc/host/sdricoh_cs.ko not found in directory /lib/modules/4.13.0-32-generic
sudo modprobe /lib/modules/4.13.0-32-generic/kernel/drivers/mmc/host/sdricoh

Code: Select all

modprobe: FATAL: Module /lib/modules/4.13.0-32-generic/kernel/drivers/mmc/host/sdricoh not found in directory /lib/modules/4.13.0-32-generic
more googling....

sudo depmod -av|grep sdricoh

Code: Select all

/lib/modules/4.13.0-32-generic/kernel/drivers/mmc/host/sdricoh_cs.ko needs "pcmcia_disable_device": /lib/modules/4.13.0-32-generic/kernel/drivers/pcmcia/pcmcia.ko
sudo modprobe pcmcia - loads OK

sudo modprobe sdricoh

Code: Select all

modprobe: FATAL: Module sdricoh not found in directory /lib/modules/4.13.0-32-generic
grrrrr...back to where i was...???!!!!

Module appears to be there, why wont it load? Do i need to move it somewhere else to load it...?

cheers

Dongers

dongers
Level 1
Level 1
Posts: 10
Joined: Sun Sep 24, 2017 5:40 pm

Re: USB Drive/SD Card not marked as 'removable' when mounted

Post by dongers » Thu Feb 15, 2018 8:46 am

Just seen the new post, while was posting previous! :)

Think my original testing might have been wrong now. Just tried USB stick again and it is being recognized correctly, and allowing me further in FingerPrint GUI (can select the drive, and type password, but cannot save it). when i looked back at the OP, I started to wonder about the USB stick myself!

mtab looks like this for the usb drive

Code: Select all

/dev/sdc /media/john/FWSS31 iso9660 ro,nosuid,nodev,relatime,norock,check=r,map=n,blocksize=2048,uid=1000,gid=1000,dmode=500,fmode=400 0 0
which looks ok, so suspect that i prolly made some some incorrect assertions in the first post and that THIS is a different issue, apologies!

Cheers

Dongers

dongers
Level 1
Level 1
Posts: 10
Joined: Sun Sep 24, 2017 5:40 pm

Re: USB Drive/SD Card not marked as 'removable' when mounted

Post by dongers » Thu Feb 15, 2018 9:16 am

OK, just realized i was trying to load the wrong module name :D D'oh!

got it loaded now :)

lsmod | grep ricoh

Code: Select all

sdricoh_cs             16384  0
pcmcia                 61440 1 sdricoh_cs
ejected sd card and got same result....

mtab entry is still showing mmcblk device details

Code: Select all

/dev/mmcblk0p1 /media/john/key vfat rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,showexec,utf8,flush,errors=remount-ro 0 0
Now I'm stuck and out of ideas....unless i haven't in fact loaded/unloaded the correct modules :)

Cheers

Dongers

User avatar
ClixTrix
Level 5
Level 5
Posts: 642
Joined: Wed Dec 09, 2015 11:40 am
Location: Columbus, Ohio, USA

Re: USB Drive/SD Card not marked as 'removable' when mounted

Post by ClixTrix » Thu Feb 15, 2018 11:17 am

Does sudo umount and then sudo eject work?
Linux Mint 18.3 x64 Cinnamon Kernel 4.15.0-22-generic
Gigabyte GA-AB350M-D3H (F20) / Ryzen 5 1600 / Micron Ballistix Sport DDR4 2400 2x8GB / XFX HD5450-1GB
NVMe-SSD Samsung EVO 960 250GB / HDD WD1600BEKT 160GB / SSD Toshiba OCZ VX500 512GB

dongers
Level 1
Level 1
Posts: 10
Joined: Sun Sep 24, 2017 5:40 pm

Re: USB Drive/SD Card not marked as 'removable' when mounted

Post by dongers » Thu Feb 15, 2018 5:09 pm

sudo umount /dev/mmcblk0p1 works
sudo umount /media/john/key also works

sudo eject doesnt...?

Cheers

Dongers

User avatar
ClixTrix
Level 5
Level 5
Posts: 642
Joined: Wed Dec 09, 2015 11:40 am
Location: Columbus, Ohio, USA

Re: USB Drive/SD Card not marked as 'removable' when mounted

Post by ClixTrix » Thu Feb 15, 2018 5:21 pm

Hmmmm......maybe the mmc-tool commands are the answer.

http://manpages.ubuntu.com/manpages/bio ... ool.1.html
Linux Mint 18.3 x64 Cinnamon Kernel 4.15.0-22-generic
Gigabyte GA-AB350M-D3H (F20) / Ryzen 5 1600 / Micron Ballistix Sport DDR4 2400 2x8GB / XFX HD5450-1GB
NVMe-SSD Samsung EVO 960 250GB / HDD WD1600BEKT 160GB / SSD Toshiba OCZ VX500 512GB

dongers
Level 1
Level 1
Posts: 10
Joined: Sun Sep 24, 2017 5:40 pm

Re: USB Drive/SD Card not marked as 'removable' when mounted

Post by dongers » Wed Feb 21, 2018 10:53 am

Had a brief look at the mmc tools and i dont think they will help. Doesnt seem to be anything there that will control the way the cards are handled, which is what I think this is.

Seems more like a driver issue for the ricoh reader, in that the card is being marked as non removeable, maybe because of the additional functionality provided by the mmc handling within the reader/driver.

Will carry on digging, i think.

Thanks for your assistance so far!

Cheers

Dongers

dongers
Level 1
Level 1
Posts: 10
Joined: Sun Sep 24, 2017 5:40 pm

Re: USB Drive/SD Card not marked as 'removable' when mounted

Post by dongers » Tue Feb 27, 2018 10:11 am

OK, still not gotten to the bottom of the MMC/SD Card reader issues, found this page:

http://www.ilmostro.info/2015/03/ricoh- ... linux.html

but didnt seem to help either....However, i have found a workaround for my specific issue/use case. It DOES circumnavigate some of the security of the software, but works, so posting in case anyone else has the issue.

So, was trying to set up fingerprint gui so would save my creds to SDCard to unlock gnome keyring during login, saving some additional typing. Fingerprint gui has some built in logic that only allows the encrypted password to be saved to a removable drive, hence the need for a removable SD Card.

Looking at the docs for the software there are two parts to it, both xml:

This login password information is split into 2 different locations:

A file “<username>@<machinename>.xml” in a subdirectory “.fingerprints” on the chosen removable media, containing the encrypted password;

A file “config.xml” in the directory “/var/lib/fingerprint-gui/<username>” containing the path to the “<username>@<machinename>.xml” file, the UUID of the chosen partition on removable media and the key for decrypting the password.


So, by using a USB stick to save the password xml, you can then copy that to the SD Card and modify the path/UUID to SD Card to the file in var/lib/fingerprint-gui/<username>

Voila...it works!

Suspect if i had actually posted my use case in first place, some clever soul would have already told me this, but hey ho....got there in the end! :)

Cheers
Dongers

Post Reply

Return to “Hardware Support”