changing cards in a reader
hoe-waa at hawaii.rr.com
hoe-waa at hawaii.rr.com
Sat Jun 26 22:28:13 PDT 2004
On Saturday, June 26, 2004 12:56 pm Scott Mitchell <scott+freebsd at fishballoon.org>
responded thusly
> On Sat, Jun 26, 2004 at 11:39:25AM -1000, hoe-waa at hawaii.rr.com wrote:
> > Aloha
> >
> > Hopefully this is a simple question. FreeBSD does not support my
> > Olympus C-3000 Zoom camera so I bought a card reader (usb). It has
> > 4 slots and when I boot or just plug it in I get 4 drives
> > (da0, da1, da2, & da3). If I have a SmartMedia card installed I
> > also see da2s1.
> >
> > da2s1 mounts fine and I am able to see and use all of the photo
> files.>
> > I have additional SM cards and would like to change the installed
> card at
> > will. If I do a umount and replace the card and try to mount
> again I
> > get an error "mount_msdosfs: /dev/da2s1: Invalid argument". I
> should> say that the cards are different sizes. In order to mount
> another card
> > I have to unplug the usb cable and re-plug it in with the new
> card in
> > the slot.
> >
> > I have read man camcontrol and do not see an option I can use.
> >
> > Is there a way to do this without unplugging and re-plugging the
> cable?
> Try this (as root):
>
> # camcontrol devlist
>
> to find out which CAM device da2 belongs to. On this machine I get:
>
> <337 COMB > at scbus1 target 0 lun 0
> (pass0,da2)<DMI MultiFlash 3.00> at scbus2 target 0
> lun 0 (pass1,da4)
> <DMI MultiFlash 3.00> at scbus2 target 0 lun 1
> (da5,pass2)<DMI MultiFlash 3.00> at scbus2 target 0
> lun 2 (da6,pass3)
> <DMI MultiFlash 3.00> at scbus2 target 0 lun 3
> (da7,pass4)
> My SmartMedia slot happens to be da5, which is device 2:0:1. After
> unmounting the card, you should be able to:
>
> # camcontrol eject 2:0:1
>
> using the appropriate device number for your system, of course.
> Then swap
> cards and do:
>
> # camcontrol rescan 2:0:1
>
> which should generate some lines in /var/log/messages telling you
> about the
> size of the new card.
>
> You might want to look into setting up the automounter to do the
> rescan and
> eject automatically when cards are mounted and unmounted,
> respectively.
> Cheers,
>
> Scott
>
Aloha Scott and thanks for staying awake and responding.
I thought I had tried all of that camcontrol stuff
before I posted but I am getting old so I tried what
you suggested. Alas, it did not seem to help. Here is
the output of the attempt:
Boot with 128MB card installed.
hp# ls -l /dev/da*
crw-r----- 1 root operator 4, 20 Jun 26 18:50 /dev/da0
crw-r----- 1 root operator 4, 21 Jun 26 18:50 /dev/da1
crw-r----- 1 root operator 4, 22 Jun 26 18:50 /dev/da2
crw-r----- 1 root operator 4, 24 Jun 26 18:50 /dev/da2s1
crw-r----- 1 root operator 4, 23 Jun 26 18:50 /dev/da3
hp# mount_msdosfs /dev/da2s1 /mnt/olympus
hp# ls -l /mnt/olympus
total 16
drwxr-xr-x 1 root wheel 16384 Jan 13 2003 dcim
hp# camcontrol devlist
<USB2.0 CardReader CF RW 0814> at scbus0 target 0 lun 0 (da0,pass0)
<USB2.0 CardReader SD RW 0814> at scbus0 target 0 lun 1 (da1,pass1)
<USB2.0 CardReader SM RW 0814> at scbus0 target 0 lun 2 (da2,pass2)
<USB2.0 CardReader MS RW 0814> at scbus0 target 0 lun 3 (da3,pass3)
hp# umount /mnt/olympus
hp# camcontrol eject 0:0:2
Unit stopped successfully, Media ejected
Remove 128MB card and insert 8MB card
hp# camcontrol rescan 0:0:2
Re-scan of 0:0:2 was successful
hp# mount_msdosfs /dev/da2s1 /mnt/olympus
mount_msdosfs: /dev/da2s1: Invalid argument
Unplug and replug usb cable and then
hp# ls -l /mnt/olympus
total 16
drwxr-xr-x 1 root wheel 8192 Jun 26 14:24 dcim
drwxr-xr-x 1 root wheel 8192 Jan 1 1980 imolym
Any other suggestions. (I hope :o))
Robert
More information about the freebsd-questions
mailing list