Debian: how to see files in a camera being an "USB mass storage"?
We have a camera Sony Cybershot. In Ubuntu 10.04, we simply conect its USB cable to the computer and the system automatically mounts two "media disks" for it. There we may copy or delete the pictures stored inside it (card and internal memory).
I tried to plug this camera in a Debian 9 machine, but nothing apparently happens! The camera screen shows its expected "USB mode | Mass Storage", but I cannot see it as a mounted media or a device which I may mount with my user by clicking on it in the file manager (similar to what happens with pendrives). What should we do to access those camera files? |
I would start by seeing if the kernel has recognised the new drives. The command dmesg|tail should do it. dmesg prints out the contents of the kernel's message ring and |tail passes it through a filter that just selects and prints the last ten lines.
For example, I have a printer with a built-in disk, and when I switch the printer on, dmesg shows the lines: Code:
[18976.226295] scsi 5:0:0:0: Direct-Access HP Photosmart C4700 1.00 PQ: 0 ANSI: 5 Once you have a device name for it, you should be able to mount it. I don't know why your desktop is not mounting it automatically. Probably it is not the same desktop that you used in Ubuntu. |
Just completing the first post and adding some info after haze first replied
Just completing the first post and adding some info after haze first replied:
Before, I tried the mount command, which showed nothing new, which I found strange (since I expected it to be automatically mounted). See: Code:
$ mount| tail The window manager used in the Debian 9 machine is Mate Desktop, file manager is Caja (which is the same as Nautilus in Ubuntu 10 Gnome 2). So most things are (have been) similar in both. At least similar, very few changes I could notice. I find the situation strange because it should not need any extra driver to access that generic "USB mass Storage". That we may do when accessing this camera in Windows. |
In Debian, dmesg is not allowed to non root user. Is this normal? In Ubuntu I did it with my user (which can also use sudo, both users may use it).
dmesg has lines showing the camera being disconnected and connected again, as you pointed: Code:
[2138899.842881] usb 1-7: USB disconnect, device number 13 |
I recently installed Pardus, which is a debian distro. To get it to mount things normally I had to install "gvfs". "autofs" and "udisks2".
|
I suspect the last two disk partitions (sdc1 and sdd1) are your camera disks. You may indeed need to install extra software to get them automounted, but you shouldn't have any problems adding them to /etc/fstab so that you can mount them by hand when you need to.
|
Quote:
(: Be right back again... |
Quote:
I was about to look around exactly about that, haze. Thank you very much! |
Also note that "some devices expose the 'I am a disk drive'" protocol, while others do not. If their firmware doesn't support this, it can't be done.
|
By default debian does not AUTO mount drives. Install autofs and reboot plus other stuff. Or manually mount the storage device. I normally $(cat /proc/partitions) before and after attaching the camera to see what drive designation it got. There also gphoto2 to get pictures from cameras that act as PTP (peer-to-peer) devices. Be sure to umount the device before unplugging it.
|
Quote:
|
Quote:
Umount before unplugging is really important, since there could be pending file operations (removed, renamed, copying files). Mate is good, it even asked me about cleaning camera Trash folder - which I choose never to do, to use the whole SD card physical media as distributedly as possible. This helps maximizing its life. Now I will be looking into these: - check if I can use /etc/fstab to enable normal users manually mounting the camera; my doubt is if camera main disk will always be /dev/sdb1, which I think is not true: what if a pendrive is inserted and mounted before inserting camera? - check autofs and the other options already pointed above (: |
If you want to make sure you have the right disk specified in fstab, use the UUID and not the device name. The command ls -l /dev/disk/by-uuid will show the UUIDs of all your mounted disks.
To make the disk mountable on demand by ordinary users, just add the user,noauto options to the line. For example, I have this line in my Debian fstab: /dev/sda1 /mnt/crux ext4 user,noauto 0 0 |
I installed autofs, but did not reboot the computer. Is it really needed? I checked autofs status, seems normal:
Code:
# /etc/init.d/autofs status The only thing that I am sure now is: camera device will be different (sdb, sdc, sdd, ...) when a pendrive (or possibly other USB devices) is inserted before. So that 'ls -l /dev/disk/by-uuid' will probably be really useful. For example, it showed: Code:
$ ls -l /dev/disk/by-uuid/ Code:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND Forgot to note: the process uptime shows that is has been running since the computer last booted. But it surely was not fixed at 100% CPU, like it is now. |
Forgot to note: the process uptime shows that is has been running since the computer last booted. But it surely was not fixed at 100% CPU, like it is now.
|
All times are GMT -5. The time now is 11:43 AM. |