USB key device nodes

Boris Samorodov bsam at ipt.ru
Sun Apr 15 10:16:38 UTC 2007


On Sat, 14 Apr 2007 19:18:01 -0400 Michael W. Lucas wrote:

> This strikes me as odd.  I have a 1GB USB pocketknife that doesn't
> give me the right device nodes until after I try to mount it.  The
> mount attempt seems to create the proper device nodes.

> The USB drive shows up on insertion like so:

> Apr 14 19:09:41 stretchlimo kernel: umass0: <SWISSBIT Victorinox 2.0, class 0/0, rev 2.00/2.00, addr 2> on uhub4
> Apr 14 19:09:41 stretchlimo root: Unknown USB device: vendor 0x1370 product 0x2168 bus uhub4
> Apr 14 19:09:41 stretchlimo kernel: da1 at umass-sim0 bus 0 target 0 lun 0
> Apr 14 19:09:41 stretchlimo kernel: da1: <SWISSBIT Victorinox 2.0 2.00> Removable Direct Access SCSI-2 device 
> Apr 14 19:09:41 stretchlimo kernel: da1: 40.000MB/s transfers
> Apr 14 19:09:41 stretchlimo kernel: da1: Attempt to query device size failed: UNIT ATTENTION, Not ready to ready change,

> Disklabel tells me that it has a single DOS partition on it:

> # fdisk /dev/da1 
> ******* Working on device /dev/da1 *******
> parameters extracted from in-core disklabel are:
> cylinders=998 heads=64 sectors/track=32 (2048 blks/cyl)

> parameters to be used for BIOS calculations are:
> cylinders=998 heads=64 sectors/track=32 (2048 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 6 (0x06),(Primary 'big' DOS (>= 32MB))
>     start 32, size 2043871 (997 Meg), flag 80 (active)
>         beg: cyl 0/ head 1/ sector 1;
>         end: cyl 996/ head 63/ sector 32
> The data for partition 2 is:
> <UNUSED>
> The data for partition 3 is:
> <UNUSED>
> The data for partition 4 is:
> <UNUSED>

> But the only device node I get upon insertion is:

> # ls /dev/da*
> /dev/da1
> #

This is almost a FAQ. You may do here:

# true > /dev/da1

...and than look at /dev/da1*

> I try to mount it, and immediately check the device nodes:

> # mount_msdosfs /dev/da1 /media
> mount_msdosfs: /dev/da1: : Invalid argument
> # ls /dev/da*
> /dev/da1        /dev/da1s1
> #

> Of course, at this point I can mount_msdosfs /dev/da1s1.

> Is this behavior normal?  I'm trying to configure devd to automount a
> USB device, but the lack of a proper device node appearing the first
> time around kiboshes that.

> This is a 7.x i386 system.


WBR
-- 
Boris Samorodov (bsam)
Research Engineer, http://www.ipt.ru Telephone & Internet SP
FreeBSD committer, http://www.FreeBSD.org The Power To Serve


More information about the freebsd-questions mailing list