How to mount an external USB storage device
In this example, we will attach an external Trust USB card reader to a FreeBSD 7.2 machine.
Our memory card is inserted into the card reader, and the card reader USB cord is then plugged in. The USB port will be probed by the generic mass storage driver and we can then fetch the device name, that can be used to mount the external file system on the memory card. We can fetch the result using the dmesg utility.
dmesg | grep sectors
In our case, the result is da0, which is very common for USB storage devices.
We can get more information about the file system from the devices.
ls /dev/da0*
This reveals, that the file system of our interest is da0s1. We can now mount the external file system. In this example we know, that the file system is MSDOS. This is a very common file system from digital cameras, such as Canon IXUS.
mkdir -p -m 0700 /mnt/usbcard
mount -t msdosfs /dev/da0s1 /mnt/usbcard
If we attach an USB storage device, such as an external harddisk, that we would like to store an external backup on, preformatted with a native file system, we could mount it without specifying the file system type.
mkdir -p -m 0700 /mnt/backup
mount /dev/da0 /mnt/backup
When we are done, we need to unmount the external devices again.
umount /mnt/backup
umount /mnt/usbcard
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
