Hi!
After struggling for hours and only getting further away from my goal, I turn to you - masters of Linux.
Background: As part of an embedded system, running Debian on a Raspberry Pi 5, I have an SD Card reader connected via USB. The reader will always have the same VID (0424) and PID (2240), and only one will be connected at the same time.
The card reader shows up as a block device (sda). When no card is connected, only the block device is "connected" (shows up using lsblk). When a card is inserted, a partition is added (sda1). This partition is the file system of the card.
I am able to both mount and umount the partition to /mnt/sdcard manually (/mnt/sdcard already exists, of course). And, using a combination of udev rules and systemd .mount routines I am able to mount the card, but not able to unmount the card automatically.
What would be the correct approach to achieve this result? Any pointers and ideas would be greatly appreciated!
[link] [comments]