We have a device (actually two of them) running Debian 8.4, largely preconfigured by the vendor. There is a slot for an SD card, which (if present) is automatically mounted at boot.Question is: after I manually unmount the card in order to fsck it, how can I mount it again? I can manually mount it again, but since it was mounted automatically at boot, it seems to me there should be a way to make the system mount it the same way again. I can simply reboot the system, but that doesn't seem an optimal solution.Since systemctl | grep mmc includes this:media-sd\x2dmmcblk0p1.mount          loaded active mounted   /media/sd-mmcblk0p1it seems to me it was systemd that mounts the card at boot. But after umount that entry disappears. Systemd still is largely a mystery to me, so that knowledge doesn't help me much.Edit: I forgot to say: there's nothing about the SD card in /etc/fstabEdit: After boot, systemctl status 'media-sd\x2dmmcblk0p1.mount' says:? media-sd\x2dmmcblk0p1.mount - /media/sd-mmcblk0p1   Loaded: loaded (/proc/self/mountinfo)   Active: active (mounted) since Fri 2016-04-15 11:47:52 UTC; 3h 2min ago    Where: /media/sd-mmcblk0p1     What: /dev/mmcblk0p1After umount, it says:? media-sd\x2dmmcblk0p1.mount   Loaded: not-found (Reason: No such file or directory)   Active: inactive (dead)systemctl cat 'media-sd\x2dmmcblk0p1.mount' says nothing in both cases.
How to mount/unmount SD card that was automatically mounted at boot?
debian;mount;systemd
I think I found it.Contrary to what I first thought, the SD card is mounted at boot by udev, not by systemd. It turns out there's a rule /etc/udev/rules.d/11-media-by-label-auto-mount.rules containing:KERNEL!=mmcblk[0-9]p[0-9], GOTO=media_by_label_auto_mount_end# Import FS infosIMPORT{program}=/sbin/blkid -o udev -p %N# Get a label if present, otherwise specify oneENV{ID_FS_LABEL}!=, ENV{dir_name}=%E{ID_FS_LABEL}ENV{ID_FS_LABEL}==, ENV{dir_name}=sd-%k# Global mount optionsACTION==add, ENV{mount_options}=relatime# Filesystem-specific mount optionsACTION==add, ENV{ID_FS_TYPE}==vfat|ntfs, ENV{mount_options}=$env{mount_options},utf8,gid=100,umask=002# Mount the deviceACTION==add, RUN+=/bin/mkdir -p /media/%E{dir_name}, RUN+=/bin/mount -o $env{mount_options} /dev/%k /media/%E{dir_name}# Clean up after removalACTION==remove, ENV{dir_name}!=, RUN+=/bin/umount -l /media/%E{dir_name}, RUN+=/bin/rmdir /media/%E{dir_name}# ExitLABEL=media_by_label_auto_mount_endSo I can mount the SD card with something like:sudo udevadm trigger -c add -y mmcblk*Still a bit cryptic for something simple (I think), but it works.