From owner-freebsd-questions@FreeBSD.ORG Thu Jan 4 02:44:56 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org 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 46CE916A403 for ; Thu, 4 Jan 2007 02:44:56 +0000 (UTC) (envelope-from ajm91qw@sbcglobal.net) Received: from smtp105.sbc.mail.mud.yahoo.com (smtp105.sbc.mail.mud.yahoo.com [68.142.198.204]) by mx1.freebsd.org (Postfix) with SMTP id 15CE213C44C for ; Thu, 4 Jan 2007 02:44:56 +0000 (UTC) (envelope-from ajm91qw@sbcglobal.net) Received: (qmail 30050 invoked from network); 4 Jan 2007 02:44:55 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=sbcglobal.net; h=Received:X-YMail-OSG:Date:From:To:Subject:Message-ID:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:User-Agent; b=Ci5zYE5pgfos4n+WXg7My6ieIReVraUQKAvooccSQ2g7I8s2W7/IycFjOL0JHL5Y2Mf21x5gcaG3iSz1b2+3REnD7fpWRYkedgnRaEQ2d5YeJ3BGKTI0+B+0E5GFDHsvOO3M9MY5Fzg0bA/rDcgWGZ1ktLjCHygs2075luhGm+Q= ; Received: from unknown (HELO localhost) (ajm91qw@sbcglobal.net@75.50.244.226 with plain) by smtp105.sbc.mail.mud.yahoo.com with SMTP; 4 Jan 2007 02:44:55 -0000 X-YMail-OSG: ljry.MAVM1nmGJ23ZKut0HxvWtScBR89VIWSxzp8WNzaoy.87Ut5lDuUi_snLdoQXWu3lfEQIKm.D.P7AxsiYSoM8BwVeZBy7YpBOIXRdqY7_hdaOUgnIbqOzbIOd1rVxuqKzil..1e4Kt2f3Cx_MYCqVKGMsld1z3U- Date: Wed, 3 Jan 2007 20:43:46 -0600 From: ajm To: freebsd-questions@freebsd.org Message-ID: <20070104024346.GA725@powerfull.bsd> References: <200701012217.l01MHciY000672@oak.pohoyda.family> <44sles6jpp.fsf@be-well.ilk.org> <200701032106.l03L64pr000540@oak.pohoyda.family> <459C1EC2.7030000@ywave.com> <200701032154.l03Ls8a5001539@oak.pohoyda.family> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200701032154.l03Ls8a5001539@oak.pohoyda.family> User-Agent: Mutt/1.5.13 (2006-08-11) Subject: Re: Problem with built-in USB memory card reader X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jan 2007 02:44:56 -0000 On Wed, Jan 03, 2007 at 10:54:08PM +0100, Alexander Pohoyda wrote: > Micah wrote: > > > Alexander Pohoyda wrote: > > > > > Lowell Gilbert writes: > > > > > >> Alexander Pohoyda writes: > > >> > > >>> Everything works perfect if the system is started with a memory card > > >>> inserted into the reader. > > >>> > > >>> The problem arises when the system is started without the memory card > > >>> inserted. Since the reader is built-in (permanently attached to the > > >>> motherboard), it is detected by the system at startup and no umass > > >>> device is created. Inserting a memory card at some later time has no > > >>> visible effect whatsoever. > > >>> > > >>> I'm using the 5.4 release. Is there a solution for this? > > >> USB handling would be better in a more recent release of FreeBSD, but > > >> I think you should be getting the basic da(4) device, just not the > > >> slices (which aren't there yet) if the medium isn't available at > > >> boot. Is that the case? [I haven't done this in a while, and don't > > >> have access to a card reader at the moment.] > > > > > > Yes, exactly. If no memory cards were inserted at the boot, only > > > da(4) devices are created and inserting/removing memory cards > > > afterwards has no visible effect. This behavior is well known also > > > for external USB card readers, but those are easily > > > detached/re-attached which triggers their re-scanning. > > > > > > I'm asking because Ms Windows somehow gets the insertion event and > > > mounts the memory card automatically. So that is be possible. > > > > > > Does anybody know how that is done? > > > > > > > There is a hack, but I can't quite remember it. I think it was "true > > > /dev/da0" to get devfs to reread the partitions and create the dev > > entires. I haven't been able to get to a reader to test it > > though. Test on a junk media card just in case I'm totally off base. > > After some experiments in FreeBSD 4.9, I found out that just running > the fdisk on da(4) device will enable to mount partitions on it: > > $ fdisk /dev/da0 > ******* Working on device /dev/da0 ******* > parameters extracted from in-core disklabel are: > cylinders=495 heads=2 sectors/track=16 (32 blks/cyl) > > parameters to be used for BIOS calculations are: > cylinders=495 heads=2 sectors/track=16 (32 blks/cyl) > > Media sector size is 512 > Warning: BIOS sector numbering starts with sector 1 > Information from DOS bootblock is: > The data for partition 1 is: > sysid 1,(Primary DOS with 12 bit FAT) > start 25, size 15783 (7 Meg), flag 80 (active) > beg: cyl 0/ head 1/ sector 10; > end: cyl 493/ head 1/ sector 16 > The data for partition 2 is: > > The data for partition 3 is: > > The data for partition 4 is: > > $ mount /dev/da0s1 > <> > > This should be automatically done by the system, I suppose. > > On this list I have found the following two examples: ( considering /dev/da0 is your target ) ( as root or su to root ) # cat /dev/null > /dev/da0 -- OR -- # dd if=/dev/null of=/dev/da0 count=0 It is best to put one of the above in a script. -- Alexander FreeBSD 6.0-RELEASE i386