Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Nov 2012 20:10:10 +0100
From:      Matthias Apitz <guru@unixarea.de>
To:        Fernando =?iso-8859-1?Q?Apestegu=EDa?= <fernando.apesteguia@gmail.com>
Cc:        Mike Clarke <jmc-freebsd2@milibyte.co.uk>, freebsd-questions@freebsd.org
Subject:   Re: Mounting SD card.
Message-ID:  <20121115191009.GA1191@tiny.Sisis.de>
In-Reply-To: <CAGwOe2Y1FhCWM7=3EFj%2BLOYt2o1eDFMY0_yaBJbod6grTovV1A@mail.gmail.com>
References:  <CAGwOe2bDa2rYpVie3L_E-6=d%2B9uKkoeOHJE9bboAivM5X5rWhw@mail.gmail.com> <201211142058.18913.jmc-freebsd2@milibyte.co.uk> <alpine.BSF.2.00.1211141904580.57127@wonkity.com> <CAGwOe2Y1FhCWM7=3EFj%2BLOYt2o1eDFMY0_yaBJbod6grTovV1A@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
El día Thursday, November 15, 2012 a las 05:57:45PM +0100, Fernando Apesteguía escribió:

> On Thu, Nov 15, 2012 at 3:06 AM, Warren Block <wblock@wonkity.com> wrote:
> > On Wed, 14 Nov 2012, Mike Clarke wrote:
> >
> >> On Wednesday 14 November 2012 19:43:30 Fernando Apesteguía wrote:
> >>
> >>> If I boot the system and plug the SD card in, the green led
> >>> doesn't even switch on and there is only a /dev/da0 that I can not
> >>> mount. If I boot the system with the card plugged in, the green led is
> >>> on and there is a /dev/da0s1 device that I can't still mount because
> >>> mount_msdosfs returns an Input/Output error after some time.
> >>
> >>
> >> I think that's pretty much standard behaviour. The solution appears to be
> >> to "wake" it up with the following incantation:
> >>
> >>     dd if=/dev/null of=/dev/da0 count=0
> >>
> >> That's what works here. See the thread starting with
> >>
> >> <http://lists.freebsd.org/pipermail/freebsd-questions/2010-February/212109.html>;
> >
> >
> > true > /dev/da0
> 
> That doesn't work for me, but the dd operation does. What can be the difference?

Both commands open the file /dev/da0 for:

open("/dev/da0",O_WRONLY|O_CREAT|O_TRUNC,0666)   = 3

without writing any myte to it; you can proof this with:

# truss dd if=/dev/null of=/dev/da0 count=0

and

# truss sh <<EOF
true > /dev/da0
EOF

	matthias

-- 
Sent from my FreeBSD netbook

Matthias Apitz               |  - No system with backdoors like Apple/Android
E-mail: guru@unixarea.de     |  - No HTML/RTF in E-mail
WWW: http://www.unixarea.de/ |  - No proprietary attachments
phone: +49-170-4527211       |  - Respect for open standards



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