I am trying to setup a raspberry pi to automatically copy SD card contents when it's inserted. I have managed to manually mount the cards fine using the mount command but usbmount has so far not worked at all.
At the moment I get this logged when I plug in a new device:
Apr 20 07:43:11 pi3testbench mtp-probe[839]: checking bus 1, device 9: "/sys/devices/platform/soc/"
Apr 20 07:43:11 pi3testbench mtp-probe[839]: bus: 1, device: 9 was not an MTP device
Apr 20 07:43:11 pi3testbench mtp-probe[840]: checking bus 1, device 9: "/sys/devices/platform/soc/"
Apr 20 07:43:11 pi3testbench mtp-probe[840]: bus: 1, device: 9 was not an MTP device
Apr 20 07:43:13 pi3testbench systemd-udevd[844]: sdc: Process '/usr/share/usbmount/usbmount add' failed with exit code 2.
Apr 20 07:43:13 pi3testbench usbmount[870]: /dev/sdd does not contain a filesystem or disklabel
Apr 20 07:43:13 pi3testbench systemd-udevd[846]: sdd: Process '/usr/share/usbmount/usbmount add' failed with exit code 1.I can see the drive using lsblk fine:
pi@pi3testbench:~ $ lsblk -fp
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINT
/dev/sdb
└─/dev/sdb1 exfat 1.0and as I said I can manually mount it and see the files.
(the following might be best as a second question but I'll put it here anyway)
I have previously seen usbmount run mount commands but the drive contents never appears. I tried running exactly the same mount commands and they work fine but they don't work when run by usbmount. This was alos with a "not an MTP device" error so perhaps this issue will be resolved when the MTP device issue is fixed.
I did try some suggestions I found such as modifying the /etc/usbmount/usbmount.conf and changing the options used for different file systems but that didn't help.
I have tried several different usb sticks and SD cards from different manufacturers but they all have the same problem.
1 Answer
/dev/sdb1 exfat 1.0
You need to find an exfat filesystem, $ sudo apt install exfat-fuse will probably be suitable.
With that installed you will be able to mount the SD-card.
It might even mount automatically as you insert it in your reader. => /media/$USER/
Then you will be able to look into the DCIM/ folder on it to find your images.
NOTE: MTP = Media Type Protocol, is most often used against a device over an USB cable, common amongst digital cameras nowadays(?). Old Nikon D300's come up as a FAT device, later models e.g D700 and D850, has the MTP type connection only (I use a card reader for the SD/CF/... -cards from these).
2