# Installing an external USB drive in FreeBSD?



## Deleted member 2077 (Jan 21, 2010)

I thought I seen a doc for this once (handbook maybe?), but can't seem to locate it.

Basically, I have a USB external hard drive.  I want it to work under a FreeBSD 6.4 system.  How do I go about it?  Thanks.


----------



## aragon (Jan 21, 2010)

Erm.  Plug it in?

What specifically are you struggling with?


----------



## Deleted member 2077 (Jan 22, 2010)

aragon said:
			
		

> Erm.  Plug it in?
> 
> What specifically are you struggling with?



ok, it's plugged in.  What does it show up under /dev/???

Nothing is disabled in dmesgs about a new device.


----------



## aragon (Jan 22, 2010)

You should see a new umass(4) device notification in /var/log/messages followed by a new da(4) device notification.  For example:

```
Jan 22 11:46:08 <user.notice> igor root: Unknown USB device: vendor 0x054c product 0x02a5 bus uhub3
Jan 22 11:46:08 <kern.crit> igor kernel: ugen3.4: <Sony> at usbus3
Jan 22 11:46:08 <kern.crit> igor kernel: umass0: <Sony Storage Media, class 0/0, rev 2.00/1.00, addr 4> on usbus3
Jan 22 11:46:08 <kern.crit> igor kernel: umass0:  SCSI over Bulk-Only; quirks = 0x0000
Jan 22 11:46:09 <kern.crit> igor kernel: umass0:7:0:-1: Attached to scbus7
Jan 22 11:46:10 <kern.crit> igor kernel: (probe0:umass-sim0:0:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0 
Jan 22 11:46:10 <kern.crit> igor kernel: (probe0:umass-sim0:0:0:0): CAM Status: SCSI Status Error
Jan 22 11:46:10 <kern.crit> igor kernel: (probe0:umass-sim0:0:0:0): SCSI Status: Check Condition
Jan 22 11:46:10 <kern.crit> igor kernel: (probe0:umass-sim0:0:0:0): UNIT ATTENTION asc:28,0
Jan 22 11:46:10 <kern.crit> igor kernel: (probe0:umass-sim0:0:0:0): Not ready to ready change, medium may have changed
Jan 22 11:46:10 <kern.crit> igor kernel: (probe0:umass-sim0:0:0:0): Retrying Command (per Sense Data)
Jan 22 11:46:10 <kern.crit> igor kernel: da0 at umass-sim0 bus 0 scbus7 target 0 lun 0
Jan 22 11:46:10 <kern.crit> igor kernel: da0: <Sony Storage Media 0100> Removable Direct Access SCSI-0 device 
Jan 22 11:46:10 <kern.crit> igor kernel: da0: 40.000MB/s transfers
Jan 22 11:46:10 <kern.crit> igor kernel: da0: 495MB (1014784 512 byte sectors: 64H 32S/T 495C)
```

And the da(4) device should appear in /dev, ready for mounting.


----------



## SirDice (Jan 22, 2010)

If you use KDE, GNOME or XFCE have a look at the HAL FAQ. When it's set up properly your external HD will pop up automatically on your desktop.

http://www.freebsd.org/gnome/docs/halfaq.html


----------



## code7395 (Jan 24, 2010)

As ARAGON said,
for example the device that appeared when you plugged your drive in was da1 then, do this:

```
mkdir /mnt/usb
mount -t msdosfs -o m=644 /dev/da1s1 /mnt/usb
```


----------



## code7395 (Jan 24, 2010)

remember that if u wish to allow other users mounting devices you should add this to /etc/rc.conf

```
usbd_enable="YES"
devfs_system_ruleset="localrules"
```
also add the next line to /etc/sysctl.conf

```
vfs.usermount=1
```
then,

```
mkdir /mnt/usb
chmod <user>:<group> /mnt/usb
```


----------



## trasz@ (Feb 5, 2010)

Note that the line with "usbd" is not required and actually doesn't do anything - usbd(8) was obsoleted years ago in favor of devd(8).  Which isn't needed in this case either.


----------

