Card reader question

Robert Heller heller at deepsoft.com
Wed Jul 15 01:58:41 UTC 2015


At Wed, 15 Jul 2015 11:21:52 +1000 "Ubuntu user technical support,  not for general discussions" <ubuntu-users at lists.ubuntu.com> wrote:

> 
> Thank you for reading this.
> 
> /dev/mmcblk0 is created whenever I plug an SD card into my laptop, as 
> expected. However, my new desktop doesn't have a card reader slot and so 
> I have to use a USB card reader. The SD card is readable with a file 
> manager but /dev/mmcblk0 is not created.
> 
> How can I overcome this problem?

How is this a problem?

Note that using '/dev/<disk device name>' is somewhat depreciated, at least 
for disks with actual file systems on them.  There are other 
device-independent methods using labels, UUIDs, and so on.

Yes, for low-level mucking around -- eg (re-)partitioning and making new file
systems on (new) partitions or otherwise doing direct low-level access to the
raw bare device, one does end up using raw device names, but since you are
talking about something that shows up with a file-manager window, this is not
the level you are working at. Or is it?

As to your 'problem': appearently directly connected SD card interface devices 
use a device driver that uses the /dev/mmcblk<Mumble> device file(s).  OTOH, 
the standard USB mass storage sub-system, used by *all* USB-based mass storage 
devices, including thumb drives, USB <=> SATA, USB <=> PATA, and USB <=> Card 
Readers, uses the SCSI disk abstraction devices (/dev/sd<Mumble>.  Ultimately, 
the device abstraction layer and the device files used have to do with how the 
device driver for the partitular hardware is written.  Since USB has a 
standard device class for devices that implement USB Mass Storage, there is a 
single driver that works with all such devices and that driver uses the SCSI 
disk abstraction driver.

I *guess* it might be possible to write a clever UDEV rule that did a rename 
to /dev/mmcblk<Mumble>, for USB mass storage device(s) that matched the 
Vendor ID/Product ID of your USB card reader(s), if there is some really 
pressing reason why you absolutely, positively, must have your SD cards show 
up as /dev/mmcblk<Mumble>.

-- 
Robert Heller             -- 978-544-6933
Deepwoods Software        -- Custom Software Services
http://www.deepsoft.com/  -- Linux Administration Services
heller at deepsoft.com       -- Webhosting Services
                                                                                               




More information about the ubuntu-users mailing list