FreeBSD: Mounting a USB stick
Filed under: BSD
I keep forgetting basic stuff like this. So, here goes: I’ll be trying to mount a 2Gb Imation USB stick on FreeBSD 7.0-RELEASE. All of this will be done as root. Yeah, I know, evil and all that. Mounting it as an unprivileged user will be for another post.

After plugging the stick in, check dmesg(8) output. Here’s how the FreeBSD machine sees it:
umass0: <Imation Nano, class 0/0, rev 2.00/1.10, addr 2> on uhub0
da0 at umass-sim0 bus 0 target 0 lun 0
da0: <Imation Nano PMAP> Removable Direct Access SCSI-0 device
da0: 1.000MB/s transfers
da0: 1911MB (3913728 512 byte sectors: 255H 63S/T 243C)
GEOM_LABEL: Label for provider da0s1 is msdosfs/NANO.
Note the last line. It indicates what filesystem is on the stick (msdosfs) and how the hardware/device is labelled/configured by the system (da0s1).
su to root:
[mish@blah ~]$ su
Password:
[root@blah /home/mish]#
Mount the drive:
[root@blah /home/mish]# mount -t msdosfs /dev/da0s1 /mnt
[root@blah /home/mish]#
Do a listing:
[root@blah /home/mish]# ll /mnt
You’re done.
Addendum: Here’s how dmesg reports the stick’s unplugging:
umass0: at uhub0 port 1 (addr 1) disconnected
(da0:umass-sim0:0:0:0): lost device
(da0:umass-sim0:0:0:0): removing device entry
GEOM_LABEL: Label msdosfs/NANO removed.
umass0: detached
#####
References:
dmesg(8)
da(4)
mount(8)

