From owner-freebsd-questions@FreeBSD.ORG Fri Nov 16 05:40:52 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 549EC4E6 for ; Fri, 16 Nov 2012 05:40:52 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) by mx1.freebsd.org (Postfix) with ESMTP id 0A6028FC08 for ; Fri, 16 Nov 2012 05:40:51 +0000 (UTC) Received: from r56.edvax.de (port-92-195-8-72.dynamic.qsc.de [92.195.8.72]) by mx01.qsc.de (Postfix) with ESMTP id A90CD3CA5D; Fri, 16 Nov 2012 06:40:44 +0100 (CET) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id qAG5ei1a002032; Fri, 16 Nov 2012 06:40:44 +0100 (CET) (envelope-from freebsd@edvax.de) Date: Fri, 16 Nov 2012 06:40:44 +0100 From: Polytropon To: Shane Ambler Subject: Re: Mounting SD card. Message-Id: <20121116064044.f416fc01.freebsd@edvax.de> In-Reply-To: <50A5AB20.1080305@ShaneWare.Biz> References: <201211142058.18913.jmc-freebsd2@milibyte.co.uk> <201211150943.42772.jmc-freebsd2@milibyte.co.uk> <20121115105350.3c65aedf.freebsd@edvax.de> <50A5AB20.1080305@ShaneWare.Biz> Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Polytropon , freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 05:40:52 -0000 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, ...