This is the initial “/etc/udev/rules.d/99-nv-ufs-mount.rules
”:
# Mount UFS card when detected.
ACTION=="add", KERNEL=="sd[a-z][0-9]", SUBSYSTEM=="block", RUN{program}+="/usr/bin/systemd-mount --no-block --automount=yes --collect $devnode /media/%E{ID_FS_UUID}"
# Unmount UFS card when removed.
ACTION=="remove", KERNEL=="sd[a-z][0-9]", SUBSYSTEM=="block", RUN{program}+="/usr/bin/systemd-umount /media/%E{ID_FS_UUID}"
I am not doing this on an actual Jetson, so steps could be wrong. However, examine this edit to and see what happens:
# Mount UFS card when detected.
ACTION=="add", KERNEL=="sd[a-z][0-9]", SUBSYSTEM=="block", RUN{program}+="/usr/bin/systemd-mount --no-block --automount=yes --collect $devnode /media/%E{ID_FS_UUID}, SYMLINK+='myusbstick'"
# Unmount UFS card when removed.
ACTION=="remove", KERNEL=="sd[a-z][0-9]", SUBSYSTEM=="block", RUN{program}+="/usr/bin/systemd-umount /media/%E{ID_FS_UUID}, SYMLINK-='myusbstick'"
(I’m not sure yet about remove, but see what happens…you might need to manually “sudo rm /media/myusbstick
” between tests, but it should use normal rules and then add symbolic link “/media/myusbstick
” pointing at the UUID naming)
EDIT: The main flaw in this is that it would use “myusbstick” on every “/dev/sda#” and every “/dev/sdb#”. If you have multiple devices of the sda prefix, then all would attempt to use the same symbolic link. Each would still properly mount on its UUID location.