Page 9 of 9 FirstFirst ... 789
Results 81 to 84 of 84

Thread: Create your own udev rules to control removable devices

  1. #81
    Join Date
    Dec 2006
    Beans
    57

    Re: Create your own udev rules to control removable devices

    Quote Originally Posted by Nattereri View Post
    mattydee:
    Yes I want it to automagically mount after pluggin it in. I did not read about fstab and maybe I should investigate it. I knew about the drives failing on boot and that is why I went with the udev route. But maybe I could use a combination of the two to eliminate the root mounting problem and just execute mount -a. A more elegant solution and less files laying around to secure.
    You could probably use a combination of the udev rules that detect and then execute the mount command, based on the UUID. Then in your fstab, you would have the proper entry for that device with an option like "user" which allows users to mount that particular device. I would stay away from a mount -a (mount all)command, since that could very well lead to unforeseen problems!!!

    EDIT:
    So an overview
    1. your fstab would have an entry of the form
    Code:
    UUID=1234  /folder/mydevice  ntfs-3g  nofail,user,{other options} 0  0
    2. You would have udev rules that detects a device that has UUID 1234 being plugged in to execute "mount /folder/mydevice"

    EDIT2:
    You might not even have to use the UUID in your udev rule. Only in the fstab
    Last edited by mattydee; October 1st, 2012 at 03:35 AM.

  2. #82
    Join Date
    Jan 2013
    Beans
    2

    Re: Create your own udev rules to control removable devices

    Hi Shreepads,

    In Ubuntu 12.04.01 LTS you can use the nobootwait (instead of nofail) option in /etc/fstab to stop the 'S to skip' message when the USB drive is not connected while booting.

  3. #83
    Join Date
    Jul 2011
    Beans
    2

    Re: Create your own udev rules to control removable devices

    Your post is good and top of my Google "ubuntu udev rules" search, but I think that:

    BUS is now deprecated, we're supposed to use "SUBSYSTEM" instead.
    SYSFS is deprecated, we're supposed to use "ATTR" now (probably means "attribute").

    See: https://bugs.launchpad.net/ubuntu/+s...sd/+bug/512464

    Maybe someone else can be bothered to post exactly when (version) the old keywords won't work.

  4. #84
    Join Date
    Jun 2006
    Location
    UK
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Create your own udev rules to control removable devices

    Indeed. This tutorial has long been obsolete.

    Moved to Outdated Tutorials & Tips

    Please do not PM me about your forum account unless you have been asked to. The correct place to contact an admin about your account is here.

Page 9 of 9 FirstFirst ... 789

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •