changing card in a reader (revisited)
hoe-waa at hawaii.rr.com
hoe-waa at hawaii.rr.com
Mon Aug 23 20:16:42 PDT 2004
From: Anish Mistry <mistry.7 at osu.edu>
Date: Monday, August 23, 2004 7:41 am
> I started to get this too, and just got an answer on the CURRENT
> list. What
> you need to do the rescan the GEOM structure is:
> cat /dev/null > /dev/da0
> cat /dev/null > /dev/da1
> etc...
> This worked for me. Apparently camcontrol was doing stuff before
> is wasn't
> "supposed to." Hope this helps.
> - --
> Anish Mistry
Aloha Anish and thanks for the info.
I was beginning to wonder if this was only my problem.
I still have an anomaly even with this procedure. Are
you running this as root?
Here is what I found.
I have a 32MB card in the reader. I start a terminal as a normal user
and verify permissions on the device. da2 and da2s1 are set perm in
/etc/devfs.conf
%pwd
/usr/home/robert
%ls -l /dev/da*
crw-r----- 1 root operator 4, 30 Aug 23 16:50 /dev/da0
crw-r----- 1 root operator 4, 31 Aug 23 16:50 /dev/da1
crw-rw---- 1 root operator 4, 32 Aug 23 16:50 /dev/da2
crw-rw---- 1 root operator 4, 34 Aug 23 16:50 /dev/da2s1
crw-r----- 1 root operator 4, 33 Aug 23 16:50 /dev/da3
%
%mount_msdosfs /dev/da2s1 ~/camera
%ls -l camera/dcim/100olymp/
total 6752
-r-xr-xr-x 1 robert robert 680523 Jan 1 2000 p1010074.jpg
-r-xr-xr-x 1 robert robert 672166 Jun 5 07:19 p6050002.jpg
-r-xr-xr-x 1 robert robert 677171 Jun 5 07:19 p6050003.jpg
-r-xr-xr-x 1 robert robert 684658 Jun 5 07:23 p6050004.jpg
-r-xr-xr-x 1 robert robert 664210 Jun 5 07:23 p6050005.jpg
-r-xr-xr-x 1 robert robert 663849 Jun 5 07:24 p6050006.jpg
-r-xr-xr-x 1 robert robert 689533 Jun 5 07:37 p6050009.jpg
-r-xr-xr-x 1 robert robert 697084 Jun 5 07:37 p6050010.jpg
-r-xr-xr-x 1 robert robert 691391 Jun 5 07:59 p6050011.jpg
-r-xr-xr-x 1 robert robert 695390 Jun 5 07:59 p6050012.jpg
%
%umount camera
I can mount and display the photos so then I umount and change to
a 128MB card. After doing the folowing command as suggested, the
permissions on da2s1 have changed.
%cat /dev/null > /dev/da2
%mount_msdosfs /dev/da2s1 ~/camera
mount_msdosfs: /dev/da2s1: Permission denied
%ls -l /dev/da*
crw-r----- 1 root operator 4, 30 Aug 23 16:50 /dev/da0
crw-r----- 1 root operator 4, 31 Aug 23 16:50 /dev/da1
crw-rw---- 1 root operator 4, 32 Aug 23 16:50 /dev/da2
crw-r----- 1 root operator 4, 35 Aug 23 16:50 /dev/da2s1
crw-r----- 1 root operator 4, 33 Aug 23 16:50 /dev/da3
I have to then su to root and change the permissions back to 660.
It then mounts fine.
%su
Password:
frankie# chmod 660 /dev/da2s1
frankie# exit
exit
%mount_msdosfs /dev/da2s1 ~/camera
%ls -l camera/dcim/100olymp/
total 2048
-rwxr-xr-x 1 robert robert 684889 Jan 1 2000 p1010001.jpg
-rwxr-xr-x 1 robert robert 687084 Jan 1 2000 p1010002.jpg
-rwxr-xr-x 1 robert robert 712401 Jan 1 2000 p1010003.jpg
%
Is there something that I am missing? Why am I losing the w for
group operator?
Either way, this is better than unplugging the USB cable or running
fdisk -i on the slice.
Robert
More information about the freebsd-questions
mailing list