0

Suppose I run sudo mount -a after setting /etc/fstab to:

 /dev/usbhd1 /path/to/mount/point ntfs rw,auto,nofail 0 1 

Yesterday, upon asking what steps our architect and I should do next after a SanDisk USB disconnect on an Ubuntu Linux 16.04 operating system installed from a Live CD on a Lenovo Thinkstation quad-core desktop, I was instructed by Serge, meuh and Julie Pelletier to implement the following steps:

"If you are going to connect and disconnect your HD regularly,then set up udev rule to mount it upon insertion at expected location. you could omit fstab entry in this case"

How do I set up a udev rule to automatically mount and unmount the SanDisk Cruzer USB upon insertion and removal of the same USB in order to eliminate an fstab entry? I would like this udev rule to apply to reboots also.

How do I make udev and fstab rules to differentiate between 2 identical SanDisk Cruzer 8 Gigabyte USB drives I purchased from BestBuy?

Any help is greatly appreciated.  
  • How do I share this question with the community? – Frank May 26 '16 at 9:07
  • Julie Pelletier told me yesterday that each USB has in unique UUID. Could that attribute replace the product attribute in the udev rule? Thank you. – Frank May 26 '16 at 13:47
  • I read in Evi Nemeth's Unix and Linux System Administration Handbook , 4th Edition, Page 715, that "when you list the contents of an automounted filesystem's parent directory , the directory appears empty and you cannot browse the automounts in a GUI filesystem browser such as Nautilus and that the photos filesystem is automounted under /portal . It's accessible through its' full pathname". But, that is not why I observe. Instead when I cd to /portal/photos the kernel says "no such filename or directory" Furthermore , I cannot login to my home directory. How do I fix this erroneous mistake? – Frank May 26 '16 at 20:33
0

This is the solution to my requirement below, "How do I make udev and fstab rules to differentiate between 2 identical SanDisk Cruzer 8 Gigabyte USB drives I purchased from BestBuy?" because identical USB drives have the same serial number.

udev rule for assigning known symlinks for identical usb serial devices

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.