Changing cards in a reader (new info)
Aloha I have some additional information regarding this problem. I was reading some of the man pages for the ump-teenth time and I thought I would try something with fdisk. I started with a 128MB card in the reader. hp# mount_msdosfs /dev/da2s1 /mnt/olympus/ hp# ls -l /mnt/olympus/ hp# ls -l /mnt/olympus/dcim/100olymp/ total 6752 -r-xr-xr-x 1 root wheel 680523 Jan 1 2000 p1010074.jpg -r-xr-xr-x 1 root wheel 672166 Jun 5 07:19 p6050002.jpg -r-xr-xr-x 1 root wheel 677171 Jun 5 07:19 p6050003.jpg -r-xr-xr-x 1 root wheel 684658 Jun 5 07:23 p6050004.jpg -r-xr-xr-x 1 root wheel 664210 Jun 5 07:23 p6050005.jpg -r-xr-xr-x 1 root wheel 663849 Jun 5 07:24 p6050006.jpg -r-xr-xr-x 1 root wheel 689533 Jun 5 07:37 p6050009.jpg -r-xr-xr-x 1 root wheel 697084 Jun 5 07:37 p6050010.jpg -r-xr-xr-x 1 root wheel 691391 Jun 5 07:59 p6050011.jpg -r-xr-xr-x 1 root wheel 695390 Jun 5 07:59 p6050012.jpg hp# hp# umount /mnt/olympus/ Replace the 128MB with a 8MB hp# mount_msdosfs /dev/da2s1 /mnt/olympus/ mount_msdosfs: /dev/da2s1: Invalid argument Fails to mount hp# fdisk -i da2 *** Working on device /dev/da2 *** parameters extracted from in-core disklabel are: cylinders=7 heads=64 sectors/track=32 (2048 blks/cyl) parameters to be used for BIOS calculations are: cylinders=7 heads=64 sectors/track=32 (2048 blks/cyl) Do you want to change our idea of what BIOS thinks ? [n] Media sector size is 512 Warning: BIOS sector numbering starts with sector 1 Information from DOS bootblock is: The data for partition 1 is: sysid 1 (0x01),(Primary DOS with 12 bit FAT) start 25, size 15975 (7 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 10; end: cyl 249/ head 3/ sector 16 Do you want to change it? [n] The data for partition 2 is: UNUSED Do you want to change it? [n] The data for partition 3 is: UNUSED Do you want to change it? [n] The data for partition 4 is: UNUSED Do you want to change it? [n] Partition 1 is marked active Do you want to change the active partition? [n] We haven't changed the partition table yet. This is your last chance. parameters extracted from in-core disklabel are: cylinders=7 heads=64 sectors/track=32 (2048 blks/cyl) parameters to be used for BIOS calculations are: cylinders=7 heads=64 sectors/track=32 (2048 blks/cyl) Information from DOS bootblock is: 1: sysid 1 (0x01),(Primary DOS with 12 bit FAT) start 25, size 15975 (7 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 10; end: cyl 249/ head 3/ sector 16 2: UNUSED 3: UNUSED 4: UNUSED Should we write new partition table? [n] hp# I answer no to all questions and then it mounts!! hp# mount_msdosfs /dev/da2s1 /mnt/olympus/ hp# ls -l /mnt/olympus/dcim/100olymp/ total 680 -rwxr-xr-x 1 root wheel 694158 Jul 12 18:27 p7120001.jpg hp# Of course this (fdisk) has to be done as root. If I want to mount and umount as a standard user I need to chmod 660 da2s1 each time the card is changed and fdisk -i is run. I hope this triggers some memory cells on all the experienced users on this list. Is there a better way to do this? I am sorry my posts always seem to run long but I want to include what I feel is important. Thanks for all the help I have received and all the future help I hope I get :o) Robert ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Changing cards in a reader (next step??)
Aloha I need to know where to go next. I have originated two previous threads regarding this problem. http://lists.freebsd.org/pipermail/freebsd-questions/2004-June/050819.html http://lists.freebsd.org/pipermail/freebsd-questions/2004-July/053047.html I have followed all suggestions and responded with the output of my attemps. The problem remains unresolved. I have also requested that if anyone has this working *properly* to respond but no one did. Can I *assume* that this is a bug? Is the next step filing a bug report? Being a newbie, can someone steer me in the right direction to file a bug report. Is there something else I should do? Any assistance would be appreciated. Thank You Robert ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Changing cards in a reader (next step??)
On Jul 26, 2004, at 12:26 PM, [EMAIL PROTECTED] wrote: I have followed all suggestions and responded with the output of my attemps. The problem remains unresolved. I have also requested that if anyone has this working *properly* to respond but no one did. Why not install /usr/ports/emulators/mtools/ and configure O: drive (O for Olympus) as /dev/da2s1 ? Then one does not have to be root to insert or remove the card. Just access the card with mdir, mcopy, mdel, mcd, etc ... Yank the card out any time you are not using it and insert another just as one does with tar and tapes. I'm thinking your issue is probably within mount_msdos. Mtools implement the DOS filesystem internally. Each M-command issued starts at the start of media, finds the directory and volume data, then goes to the appropriate file(s), completely from scratch each time. So there is no mount. It does tend to remember current directory. -- David Kelly N4HHE, [EMAIL PROTECTED] Whom computers would destroy, they must first drive mad. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Changing cards in a reader (next step??)
From: David Kelly [EMAIL PROTECTED] Date: Monday, July 26, 2004 7:47 am On Jul 26, 2004, at 12:26 PM, [EMAIL PROTECTED] wrote: I have followed all suggestions and responded with the output of my attemps. The problem remains unresolved. I have also requested that if anyone has this working *properly* to respond but no one did. Why not install /usr/ports/emulators/mtools/ and configure O: drive (O for Olympus) as /dev/da2s1 ? Aloha and thanks for responding. I hadn't tried mtools so I did as you reccommended. The results were less than satisfactory. The problem is when I am changing to a different size card. I start with a 128MB SmartMedia card in the reader. hp# mdir O:/dcim/100olymp Volume in drive O has no label Directory for O:/dcim/100olymp .DIR 05-30-2004 15:59 .. DIR 05-30-2004 15:59 p6050002 jpg672166 06-05-2004 7:19 p6050003 jpg677171 06-05-2004 7:19 p6050004 jpg684658 06-05-2004 7:23 p6050005 jpg664210 06-05-2004 7:23 p6050006 jpg663849 06-05-2004 7:24 p6050009 jpg689533 06-05-2004 7:37 p6050010 jpg697084 06-05-2004 7:37 p6050011 jpg691391 06-05-2004 7:59 p6050012 jpg695390 06-05-2004 7:59 p1010074 jpg680523 01-01-2000 0:00 12 files 6 815 975 bytes 124 059 648 bytes free Then I remove it and place a 8MB SM card in the reader. hp# mdir O:/dcim/100olymp init O: non DOS media Cannot initialize 'O:' If I unplug and replug the USB cable hp# mdir O:/dcim/100olymp Volume in drive O has no label Directory for O:/dcim/100olymp .DIR 06-26-2004 14:24 .. DIR 06-26-2004 14:24 p7120001 jpg694158 07-12-2004 18:27 3 files 694 158 bytes 7 446 528 bytes free The display is different using mtools but the results are the same. Thanks again for the help. I hope you have another idea or two. Robert ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: changing cards in a reader
Scott Mitchell wrote Hi Robert, Weird - that's what works for me, so I don't know how much more help I can offer, but here are a few suggestions that might help us figure out what's going on... Boot with 128MB card installed. hp# ls -l /dev/da* crw-r- 1 root operator4, 20 Jun 26 18:50 /dev/da0 crw-r- 1 root operator4, 21 Jun 26 18:50 /dev/da1 crw-r- 1 root operator4, 22 Jun 26 18:50 /dev/da2 crw-r- 1 root operator4, 24 Jun 26 18:50 /dev/da2s1 crw-r- 1 root operator4, 23 Jun 26 18:50 /dev/da3 Ah... you're running FreeBSD 5 - it was pretty late when I wrote that first reply, so I didn't notice that immediately. Unlike FreeBSD 4, where stuff in /dev/ had to be created manually, FreeBSD 5 uses devfs to create the device nodes as needed, when devices come and go. I haven't actually used my card reader on 5 yet, so I could be missing something obvious here... Remove 128MB card and insert 8MB card hp# camcontrol rescan 0:0:2 Re-scan of 0:0:2 was successful What does 'fdisk da2' give you at this point? Do you get anything in /var/log/messages when you insert the new card? It might be worth doing a 'camcontrol start' after the rescan, just in case, but I don't really think that will make any difference. Since you're running FreeBSD 5, it might be worth re-porting your question to the freebsd-current mailing list, to see if anyone there can shed some light on this. Sorry I can't be more help, Scott Aloha and mahalo Scott I had tried the camcontrol start before but I tried again without any good stuff. Fdisk seems to show the correct readings but I could use some help interpreting the output of /var/log/messages. I am traveling now so I am using my laptop which is running current. When I return to Kona (7-6) I will try on one of my desktops that are running 5.2.1 Thanks again for helping. Robert 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 hp# umount /mnt/olympus hp# camcontrol eject 0:0:2 Unit stopped successfully, Media ejected Remove 8MB card and insert 128MB card hp# camcontrol rescan 0:0:2 Re-scan of 0:0:2 was successful hp# fdisk da2 *** Working on device /dev/da2 *** parameters extracted from in-core disklabel are: cylinders=125 heads=64 sectors/track=32 (2048 blks/cyl) parameters to be used for BIOS calculations are: cylinders=125 heads=64 sectors/track=32 (2048 blks/cyl) Media sector size is 512 Warning: BIOS sector numbering starts with sector 1 Information from DOS bootblock is: The data for partition 1 is: sysid 6 (0x06),(Primary 'big' DOS (= 32MB)) start 47, size 255953 (124 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 16; end: cyl 499/ head 15/ sector 32 The data for partition 2 is: UNUSED The data for partition 3 is: UNUSED The data for partition 4 is: UNUSED Jun 27 09:01:13 hp su: robert to root on /dev/ttyp0 Jun 27 09:03:01 hp kernel: (da2:umass-sim0:0:0:2): READ CAPACITY. CDB: 25 40 0 0 0 0 0 0 0 0 Jun 27 09:03:01 hp kernel: (da2:umass-sim0:0:0:2): CAM Status: SCSI Status Error Jun 27 09:03:01 hp kernel: (da2:umass-sim0:0:0:2): SCSI Status: Check Condition Jun 27 09:03:01 hp kernel: (da2:umass-sim0:0:0:2): UNIT ATTENTION asc:28,0 Jun 27 09:03:01 hp kernel: (da2:umass-sim0:0:0:2): Not ready to ready change, medium may have changed Jun 27 09:03:01 hp kernel: (da2:umass-sim0:0:0:2): Retrying Command (per Sense Data) hp# hp# camcontrol start 0:0:2 Unit started successfully hp# mount_msdosfs /dev/da2s1 /mnt/olympus mount_msdosfs: /dev/da2s1: Invalid argument hp# ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: changing cards in a reader
On Sat, Jun 26, 2004 at 07:27:40PM -1000, [EMAIL PROTECTED] wrote: 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: Hi Robert, Weird - that's what works for me, so I don't know how much more help I can offer, but here are a few suggestions that might help us figure out what's going on... Boot with 128MB card installed. hp# ls -l /dev/da* crw-r- 1 root operator4, 20 Jun 26 18:50 /dev/da0 crw-r- 1 root operator4, 21 Jun 26 18:50 /dev/da1 crw-r- 1 root operator4, 22 Jun 26 18:50 /dev/da2 crw-r- 1 root operator4, 24 Jun 26 18:50 /dev/da2s1 crw-r- 1 root operator4, 23 Jun 26 18:50 /dev/da3 Ah... you're running FreeBSD 5 - it was pretty late when I wrote that first reply, so I didn't notice that immediately. Unlike FreeBSD 4, where stuff in /dev/ had to be created manually, FreeBSD 5 uses devfs to create the device nodes as needed, when devices come and go. I haven't actually used my card reader on 5 yet, so I could be missing something obvious here... Remove 128MB card and insert 8MB card hp# camcontrol rescan 0:0:2 Re-scan of 0:0:2 was successful What does 'fdisk da2' give you at this point? Do you get anything in /var/log/messages when you insert the new card? It might be worth doing a 'camcontrol start' after the rescan, just in case, but I don't really think that will make any difference. Since you're running FreeBSD 5, it might be worth re-porting your question to the freebsd-current mailing list, to see if anyone there can shed some light on this. Sorry I can't be more help, Scott -- === Scott Mitchell | PGP Key ID | Eagles may soar, but weasels Cambridge, England | 0x54B171B9 | don't get sucked into jet engines scott at fishballoon.org | 0xAA775B8B | -- Anon ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
changing cards in a reader
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? hp# uname -a FreeBSD hp.hawaii.rr.com 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Thu Jun 10 12:39:40 HST 2004 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/GENERIC i386 Thank You Robert ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: changing cards in a reader
On Sat, Jun 26, 2004 at 11:39:25AM -1000, [EMAIL PROTECTED] 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 -- === Scott Mitchell | PGP Key ID | Eagles may soar, but weasels Cambridge, England | 0x54B171B9 | don't get sucked into jet engines scott at fishballoon.org | 0xAA775B8B | -- Anon ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: changing cards in a reader
On Saturday, June 26, 2004 12:56 pm Scott Mitchell [EMAIL PROTECTED] responded thusly On Sat, Jun 26, 2004 at 11:39:25AM -1000, [EMAIL PROTECTED] 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 operator4, 20 Jun 26 18:50 /dev/da0 crw-r- 1 root operator4, 21 Jun 26 18:50 /dev/da1 crw-r- 1 root operator4, 22 Jun 26 18:50 /dev/da2 crw-r- 1 root operator4, 24 Jun 26 18:50 /dev/da2s1 crw-r- 1 root operator4, 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 ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]