How do I mount and use a USB pen or hard disk under OpenBSD operating systems?
OpenBSD does supports USB storage devices such as pen and hard disk via emulated SCSI drives.
First, insert your your USB flash drive in USB socket.
Next type the following command to create a directory (mount point), enter:
# mkdir /mnt/pen
Mount the flash drive using mount command at /mnt/pen, enter:
# mount /dev/sd0i /mnt/pen
You may need to replace /dev/sd0i with actual device name.
Now you can access the files at /mnt/pen:
# cd /mnt/pen
# ls -l
# cp filename /path/to/dir
Finally, unmount the flash filesystem using the following command:
# umount /mnt/pen
Featured Articles:
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- My 10 UNIX Command Line Mistakes
- Linux: 20 Iptables Examples For New SysAdmins

- 25 PHP Security Best Practices For Sys Admins
- The Novice Guide To Buying A Linux Laptop
- 10 Greatest Open Source Software Of 2009
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- Top 20 OpenSSH Server Best Security Practices
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Linux Video Editor Software
Facebook it - Tweet it - Print it -


{ 5 comments… read them below or add one }
“You may need to replace /dev/sd0i with actual device name.”
For people new to OpenBSD, how do you find the actual device name?
Use dmesg. The device shows up in dmesg output after plugging it in. You can also use usbdevs.
How did you know the ‘i’ in sd0i? Dmesg only shows ‘sd0′ with no ending.
Answering my own question:
$ disklabel sd0
At the end, you will see the partitions. The i-label denotes a partition.
another way
# sysctl hw.disknames
will show (example)
$ sysctl hw.disknames
hw.disknames=wd0,wd1,cd0