[svlug] usb device automounting on linux

Joe Brenner doom at kzsu.stanford.edu
Mon Jun 4 16:22:45 PDT 2007


Tim Utschig <tim at tetro.net> wrote:

> Joe Brenner wrote:
> > So: any clues as to what's going on here?  
> 
> My guess is it's simply not a USB Mass Storage device, and uses some
> alternative or proprietary protocol, which gphoto2 happens to know how
> to speak.

And it turns out your guess is correct.  I was falling back on testing
with the camera (because I was sure it worked), but screwed up in
assuming it was the same type of device. 

> What exactly shows up if you "tail -f /var/log/kern.log" while plugging
> in the device?

If anyone's interested, when plugging in a Cannon PowerShot camera,
I just get the one line:

Jun  4 10:54:11 localhost kernel: [5789163.005306] usb 1-7: new full speed USB device using ohci_hcd and address 37


Plugging in a Verbatim thumb drive, however, I see some more encouraging
messages involving "SCSI" devices: 

Jun  4 16:05:54 localhost kernel: [5807832.998402] usb 1-7: new full speed USB device using ohci_hcd and address 39
Jun  4 16:05:54 localhost kernel: [5807833.722140] scsi6 : SCSI emulation for USB Mass Storage devices
Jun  4 16:05:54 localhost kernel: [5807833.722271] usb-storage: device found at 39
Jun  4 16:05:54 localhost kernel: [5807833.722273] usb-storage: waiting for device to settle before scanning
Jun  4 16:05:59 localhost kernel: [5807838.152977]   Vendor: VBTM      Model: Store 'n' Go      Rev: 5.00
Jun  4 16:05:59 localhost kernel: [5807838.152992]   Type:   Direct-Access                      ANSI SCSI revision: 00
Jun  4 16:06:00 localhost kernel: [5807839.149288] SCSI device sde: 2013184 512-byte hdwr sectors (1031 MB)
Jun  4 16:06:00 localhost kernel: [5807839.156270] sde: Write Protect is off
Jun  4 16:06:00 localhost kernel: [5807839.156274] sde: Mode Sense: 23 00 00 00
Jun  4 16:06:00 localhost kernel: [5807839.156278] sde: assuming drive cache: write through
Jun  4 16:06:00 localhost kernel: [5807839.182229] SCSI device sde: 2013184 512-byte hdwr sectors (1031 MB)
Jun  4 16:06:00 localhost kernel: [5807839.189215] sde: Write Protect is off
Jun  4 16:06:00 localhost kernel: [5807839.189219] sde: Mode Sense: 23 00 00 00
Jun  4 16:06:00 localhost kernel: [5807839.189223] sde: assuming drive cache: write through
Jun  4 16:06:00 localhost kernel: [5807839.189227]  sde: sde1
Jun  4 16:06:00 localhost kernel: [5807839.199249] sd 6:0:0:0: Attached scsi removable disk sde
Jun  4 16:06:00 localhost kernel: [5807839.199294] sd 6:0:0:0: Attached scsi generic sg4 type 0
Jun  4 16:06:00 localhost kernel: [5807839.199898] usb-storage: device scan complete

And at that point, a "sudo fdisk -l" returns a listing including:

Disk /dev/sde: 1030 MB, 1030750208 bytes
16 heads, 32 sectors/track, 3932 cylinders
Units = cylinders of 512 * 512 = 262144 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1   *           1        3932     1006576    e  W95 FAT16 (LBA)

Which is the sort of thing I was looking for.






More information about the svlug mailing list