How to determine what device to mount for digital cam.
MandrivaThis Forum is for the discussion of Mandriva (Mandrake) Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How to determine what device to mount for digital cam.
Using Mandriva 2006
To be able to access my digital cam it seems I need to edit /etc/rc.d/rc.local and add the following two instructions:
/etc/init.d/usb restart
/sbin/modprobe usb-storage
By the way, does the cam have to be plugged in before these instructions are executed at boot time? If it is not plugged in, do I have to plug it in and then execute the above commands manually?
It seems I also have to mount the device using:
mount -t vfat /dev/????????? /mnt/camera
How do I go about finding out what the device is that is to be mounted at /mnt/camera.
Your question assumes that the make/model of your camera uses the USB Mass Storage interface protocol. As such, it will probably show up as an emulated SCSI device in /dev/sda, or /dev/sdb, ... The device index will depend on existing prior devices like other SCSI drives, flash disks, or SATA hard drives. Assuming you have already loaded the usb-storage module, you can power up the camera and plug in the USB interface. Then inspect dmesg, and look for a reference to the camera.
Here is a sample:
Code:
usb-storage: device found at 6
usb-storage: waiting for device to settle before scanning
Vendor: MATSHITA Model: DMC-FZ10 Rev: 0100
Type: Direct-Access ANSI SCSI revision: 02
SCSI device sdb: 29120 512-byte hdwr sectors (15 MB)
sdb: Write Protect is off
sdb: Mode Sense: 04 00 00 00
sdb: assuming drive cache: write through
SCSI device sdb: 29120 512-byte hdwr sectors (15 MB)
sdb: Write Protect is off
sdb: Mode Sense: 04 00 00 00
sdb: assuming drive cache: write through
sdb: sdb1
Attached scsi removable disk sdb at scsi6, channel 0, id 0, lun 0
usb-storage: device scan complete
This shows a camera at /dev/sdb1, which makes sense, since /dev/sda is a pre-existing SATA drive.
Once you know the device name, you can mount it just as you describe. It may not be formatted as a VFAT filesystem. Mine is a FAT16.
If your camera uses PTP (or a fairly long list of other proprietary protocols) protocol, the gphoto2 library/application might be what you want. 'gthumb' is a nicer GUI frontend for gphoto2.
sdb is the overall device. sdb1 is a logical partition within the device (remember, this thing is emulating a disk drive). Use the logical partition. Sorry, I accidentally trimmed off a line in the dmesg sample that shows it as type "FAT". It also shows it being mounted as type vfat, so perhaps vfat works as a correct superset of FAT. Hmmm. Perhaps fdisk can display the type of filesystem. I think I might have tried that; can't remeber for sure and I don't have the camera right now to try. If I don't hear of success from you, I will give it a try in about 10 hours time.
I understand I could use the PTP methodology, but I was just trying to get the mass storage way working. I thought it was more convenient -- at least when it was working.
thought I still had a problem -- the camera kept getting disconnected and turning off. However, it kept turning off when it was no longer connected to the computer. It seems the batteries are shot. At least it is not more software problems.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.