How to see my digital camera from OpenBSD
I needed to attach a Compact Flash reader device to an OpenBSD box (I installed version 3.9 on my old Presario 700 portable), because I want to write a mini-OpenBSD system on a CF memory card which will then be placed in a soekris 4501 which in turn will act as a router behind my Freebox in order to provide a better means to control incoming and outgoing traffic.
However, I don’t have a CF reader/writer and I don’t want to buy yet another one-time gadget. Well, the Thinkpad X22 does actually have a CF slot, but I didn’t want to install OpenBSD on it.
So, I had to find another solution. Finally, I thought of my “old” digital camera, a Nikon Coolpix 885 which I connect to a computer via a USB cable and which acts like a CF device, i.e. I can read from and write to it.
I was impressed that OpenBSD recognized the device automatically when I switched the camera on (showing a 128 MB memory card):
umass0 at uhub0 port 1 configuration 1 interface 0
umass0: Nikon Nikon Digital Camera ????, rev. 1.10/1.00, add 3
umass0: using SCSI over Bulk-Only
scscibus1 at umass0: 2 targets
sd0 at scsibus1 targ 1 lun 0:
The problem I couldn’t solve immediately was how to mount a USB drive in OpenBSD world. A little search for openbsd mount usb returned very quickly (first hit) a useful result, i.e. a post to the openbsd misc mailing list “Re: Mount USB Drive“:
USB drives generally show up as (emulated) SCSI:
mount /dev/sd0i /mnt
will mount most USB hard drives/flash drives. I would expect that would work
with a USB DVD as well.(sd0i is usually the first partition - for example, I have a USB HDD which has
a bootable ReiserFS partition, a swap space and a FAT partition - so on
OpenBSD, I use ‘mount /dev/sd0k /mnt’ to mount the FAT partition)
So, following this advice, I now manage to mount my camera read/writable using this command:
# mount /dev/sd0i /mnt/usb/
Now, I can go ahead to the next stage to actually write the OpenBSD operating system to a 128MB SiliconDrive CF card …