mounting digital camera as block device? (kernel 2.6)

mounting digital camera as block device? (kernel 2.6)

Post by Jule » Thu, 07 Jul 2005 08:17:08



OK, this is driving me nuts! :)

What do I need to compile into a 2.6 kernel in order to be able to mount a
digital camera (Canon Powershot G5) as a block device?

So far attempts to build anything that'll give me a SCSI device to mount
have met with no success - however I *can* access the camera fine
using Gphoto2.

My system's using a SCSI controller already - possibly some sort of
conflict?

Anyway, I've built a kernel with the following (and various combinations
thereof):

Automatic kernel module loading
SCSI generic support
SCSI disk support
IDE support (even though I have no IDE devices)
SCSI emulation support (for IDE)
USB device filesystem
EHCI HCD
UHCI HCD
USB mass storage support
FAT & VFAT support

... but whilst according to dmesg the USB system's found the camera (and
hotplug's happy to report it under /proc/bus/usb/...) I don't get any
/dev/sdx device that corresponds to the camera, and nor is the camera
showing up according to anything under /proc/scsi/...

I've tried forcing loading of usb_storage.ko, ide-scsi.ko etc. with no
luck (and disabling hotplug completely)

Any pointers? Maybe my assumption that all digital cameras can be accessed
as block devices is wrong? (Although I'm sure I've had this working a year
or so ago).

So far I've tried kernel 2.6.11.7 and 2.6.12.2

cheers

Jules
 
 
 

mounting digital camera as block device? (kernel 2.6)

Post by dogdo » Tue, 12 Jul 2005 00:31:08


I setup my fstab file to mount my USB camera like this.

/dev/sda1 /mnt/camera vfat
noauto,sync,nosuid,user,unhide 0 0

The /dev/sda1 is my block device and I always thought that sda stood
for the scsi device, I.E It treats the usb as a scsi. I've found
this with cdrecord to, where you use the scanbus option for DVD/CD
burners connected to a USB (but thats on sun).

Also, I setup my auto.misc like this so the automounter picks it up.
camera -fstype=vfat,rw,nosuid,nodev :/dev/sda1

I'm using a 2.4 kernel but I cant imagine it would be different.
I just plug in my camera and an icon appears on the screen that
its mounted. I didnt really do anything with the kernel, and never
even thought of doing what you have.

Sorry if this doesnt help
dogdog

 
 
 

mounting digital camera as block device? (kernel 2.6)

Post by Jule » Tue, 12 Jul 2005 02:10:39


Yep, that's what all the bits of info out there say should work. I'm just
not getting any extra SCSI device automagically appearing for the
camera device - just the SCSI devices corresponding to the SCSI
hardware hooked up to the pair of Adaptec boards I have in the
machine.

It looks like either something's broken in 2.6, or there's some new
module that needs to be loaded for it to work which doesn't seem to be
documented anywhere :-(

I've borrowed a USB Compact-flash reader from someone so I'll give
that a go and at least rule out that it's not a problem with Linux
talking 'raw' to the camera...

cheers

Jules
 
 
 

mounting digital camera as block device? (kernel 2.6)

Post by Andy Frase » Thu, 14 Jul 2005 21:09:09

In comp.os.linux.setup, Jules uttered the immortal words:


It's not that strange at all. Not all cameras are USB storage devices. My
Kodak, for example, works perfectly with gphoto2 but isn't a USB storage
device and even needs a driver to work with Windows.

--
Andy.
 
 
 

mounting digital camera as block device? (kernel 2.6)

Post by Jule » Thu, 14 Jul 2005 21:51:13


Well the USB reader worked fine! So it appears that for some reason Linux
can't talk to my camera as a raw block device, yet it's perfectly able to
do so via Gphoto2. Strange, but at least I've recovered the deleted data
I wanted so I'm not likely to need to go through this again in a hurry!

cheers

Jules
 
 
 

mounting digital camera as block device? (kernel 2.6)

Post by Michael He » Thu, 14 Jul 2005 23:59:20

In comp.os.linux.setup Andy Fraser < XXXX@XXXXX.COM >:



Ops, was lucky then, thought any cam would just be some USB
mass-storage device. Mine (Nikon) works fine, even if I usually
prefer to use some USB card reader, which is more comfortable
then fiddling with cable. Tested out gphoto but had not much
usage for it.

--
Michael Heiming (X-PGP-Sig > GPG-Key ID: EDD27B94)
mail: echo XXXX@XXXXX.COM | perl -pe 'y/a-z/n-za-m/'
#bofh excuse 316: Elves on strike. (Why do they call EMAG
Elf Magic)
 
 
 

mounting digital camera as block device? (kernel 2.6)

Post by Andy Frase » Fri, 15 Jul 2005 00:19:03

In comp.os.linux.setup, Michael Heiming uttered the immortal words:


The Kodak was the best camera I could get in my price range due to it being
on offer. Before buying it I checked that it would work with gphoto2. If it
had worked as a USB mass storage device that would just be a bonus. Like
you, I usually use a card reader anyway so I might've still bought the
Kodak even if I couldn't access it directly under Linux.

--
Andy.
 
 
 

mounting digital camera as block device? (kernel 2.6)

Post by dogdo » Thu, 08 Dec 2005 07:46:46


I setup my fstab file to mount my USB camera like this.

/dev/sda1 /mnt/camera vfat noauto,sync,nosuid,user,unhide 0 0

The /dev/sda1 is my block device and I always thought that sda stood
for the scsi device, I.E It treats the usb as a scsi. I've found
this with cdrecord to, where you use the scanbus option for DVD/CD
burners connected to a USB (but thats on sun).

Also, I setup my auto.misc like this so the automounter picks it up.
camera -fstype=vfat,rw,nosuid,nodev :/dev/sda1

I'm using a 2.4 kernel but I cant imagine it would be different.
I just plug in my camera and an icon appears on the screen that
its mounted. I didnt really do anything with the kernel, and never
even thought of doing what you have.

Sorry if this doesnt help
dogdog