Card reader question - solved

Robert Heller heller at deepsoft.com
Wed Jul 15 13:49:30 UTC 2015


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

> 
> On 15/07/15 11:58, Robert Heller wrote:
> > 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>.
> >
> 
> I jumped in too quickly with my question. The SD card, on my system, is 
> sde1 and sde2. So problem solved.

Don't depend on that! Which /dev/sd<mumble>N you get depends on what else is
happening on your system. If the card shows up as /dev/sdeN, then you have 4
other mass storage devices using the SCSI abstraction driver. I'm guessing you
have 4 SATA hard drives? Or 2 SATA hard drives and two thumb drives? Or any
number of possible variations. And if for some reason you happen to stick
another USB thumb drive in *before* the card reader, your SD card will show up
as /dev/sdf1 and /dev/sdf2. Of if you unplug your external USB drive, it might
show up as /dev/sdd1 and /dev/sdd2... You USB card reader is NOT hard coded to 
/dev/sde! That just happens to be the next available device index *at this 
time*.

> 

-- 
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