Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Nov 2012 06:40:44 +0100
From:      Polytropon <freebsd@edvax.de>
To:        Shane Ambler <FreeBSD@shaneware.biz>
Cc:        Polytropon <freebsd@edvax.de>, freebsd-questions@freebsd.org
Subject:   Re: Mounting SD card.
Message-ID:  <20121116064044.f416fc01.freebsd@edvax.de>
In-Reply-To: <50A5AB20.1080305@ShaneWare.Biz>
References:  <CAGwOe2bDa2rYpVie3L_E-6=d%2B9uKkoeOHJE9bboAivM5X5rWhw@mail.gmail.com> <201211142058.18913.jmc-freebsd2@milibyte.co.uk> <alpine.BSF.2.00.1211141904580.57127@wonkity.com> <201211150943.42772.jmc-freebsd2@milibyte.co.uk> <20121115105350.3c65aedf.freebsd@edvax.de> <alpine.BSF.2.00.1211150853440.62459@wonkity.com> <50A5AB20.1080305@ShaneWare.Biz>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 16 Nov 2012 13:25:28 +1030, Shane Ambler wrote:
> On 16/11/2012 02:25, Warren Block wrote:
> > On Thu, 15 Nov 2012, Polytropon wrote:
> >
> >> Is there a recommended way to automate the "GEOM re-tasting" so
> >> SD cards can be accessed without further interaction (by simply
> >> using the correct mount command)?
> >
> > Not AFAIK.  Could depend on hardware also; some card readers might not
> > need it.
> 
> I haven't tried this ---
> 
> Given that the reader is a usb device could it be added to the devd setup?
> 
> Something like -
> 
> attach 200 {
> 	device-name "da[0-9]+";
> 	match "vendor" "0x058f";
> 	match "product" "0x6362";
> 	action "/usr/bin/true > /dev/${device-name}";
> };
> 
> 
> Saved to /usr/local/etc/devd/SD.conf
> 
> vendor and product are from my internal reader that I never use as I 
> never did get it to mount a card - I have an external reader that works 
> fine. There should be a more generic way to recognise card readers.

Interesting approach, but I can already predict where it would
fail at least for my setup: I have an internal card reader for
SD, CF and other kinds of media, connected per internal USB to
the main board. The device files representing the "slots" are
present since system startup: da0, da1, da2. They do not "change"
when a card is inserted. In fact, the OS does not notice if a
card is inserted (or even removed). Using the "true > /dev/da0"
approach causes the card to be recognized, as some of the cards
can have a /dev/da0s1 "primary DOS partition" which has to be
mounted (instead of blindly trying /dev/da0).

However, this approach might work with external "35 in 1" card
readers connected to external USB _with_ the card being present
when attached to the system.

Sadly, the handling of that specific kind of removable media is
still sub-optimum, nearly near-pessimum, si se oblivisci quae
vellet. :-)



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20121116064044.f416fc01.freebsd>