From owner-freebsd-stable@FreeBSD.ORG Wed Nov 16 10:12:04 2005 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 20F0416A41F for ; Wed, 16 Nov 2005 10:12:04 +0000 (GMT) (envelope-from b.candler@pobox.com) Received: from thorn.pobox.com (thorn.pobox.com [208.210.124.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id B9AD143D49 for ; Wed, 16 Nov 2005 10:12:03 +0000 (GMT) (envelope-from b.candler@pobox.com) Received: from thorn (localhost [127.0.0.1]) by thorn.pobox.com (Postfix) with ESMTP id 65C4B9A for ; Wed, 16 Nov 2005 05:03:02 -0500 (EST) Received: from mappit.local.linnet.org (212-74-113-67.static.dsl.as9105.com [212.74.113.67]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by thorn.sasl.smtp.pobox.com (Postfix) with ESMTP id 3CFA9438 for ; Wed, 16 Nov 2005 05:03:02 -0500 (EST) Received: from brian by mappit.local.linnet.org with local (Exim 4.54 (FreeBSD)) id 1EcKGm-0000k5-Sd for freebsd-stable@freebsd.org; Wed, 16 Nov 2005 10:12:01 +0000 Date: Wed, 16 Nov 2005 10:12:00 +0000 From: Brian Candler To: freebsd-stable@freebsd.org Message-ID: <20051116101200.GA2823@uk.tiscali.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Subject: CF card and /dev filesystem entries X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Nov 2005 10:12:04 -0000 Running FreeBSD 6.0 here. I have a USB-attached floppy/CF/SD combo reader. On powerup it is detected and I get /dev/da0 as the CF slot: da0 at umass-sim0 bus 0 target 0 lun 0 da0: Removable Direct Access SCSI-0 device da0: 1.000MB/s transfers da0: Attempt to query device size failed: NOT READY, Medium not present da1 at umass-sim0 bus 0 target 0 lun 1 da1: Removable Direct Access SCSI-0 device da1: 1.000MB/s transfers da1: Attempt to query device size failed: NOT READY, Medium not present However, when I insert a CF card with normal partioning I need /dev/da0s1, and this is not present in the /dev filesystem because the partition table has not been read. # mount -t msdos /dev/da0s1 /mnt/cf mount_msdosfs: /dev/da0s1: No such file or directory Just reading the first block is not sufficient: # dd if=/dev/da0 of=/dev/null count=1 1+0 records in 1+0 records out 512 bytes transferred in 0.040984 secs (12493 bytes/sec) # mount -t msdos /dev/da0s1 /mnt/cf mount_msdosfs: /dev/da0s1: No such file or directory The only way I can see to *force* the superblock to be read is to attempt to mount the whole device as if it were unpartitioned. This is sufficient to cause the /dev/da0s1 entry to appear in the /dev filesystem. # mount /dev/da0 /mnt/cf mount: /dev/da0 on /mnt/cf: incorrect super block # mount -t msdos /dev/da0s1 /mnt/cf # At this point, everything works as expected. My question is: is there an easier or more direct way to cause the partition table of the CF card to be read and the /dev filesystem to update? Thanks, Brian Candler.