[solved] thunar and udev rules

I want to hide my windows paritions (sda1 and sda2) in thunar.
But even if i set udev rules... they still appear.
→ cat /etc/udev/rules.d/10-hide-partitions.rules
KERNEL=="sda1",ENV{UDISKS_PRESENTATION_HIDE}="1"
KERNEL=="sda2",ENV{UDISKS_PRESENTATION_HIDE}="1"
→ udevadm info --query=all -n /dev/sda1 |grep PRESENTATION
E: UDISKS_PRESENTATION_HIDE=1
E: UDISKS_PRESENTATION_NOPOLICY=0
What am i doing wrong ?
Last edited by xinit (2012-04-26 19:05:49)

ty
works

Similar Messages

  • Curious thunar - autofs - udev rules behavior

    I've just set up autofs and udev ruls to get my usb devices automounting, and everything automounts fine.  The only issue I'm having is that my w800 doesn't automatically show up in the thunar sidebar (but it does automount).  All other devices automount, and show up in the sidebar.
    It's worth noting that my w800 memory stick is wonky as all getout, and sometimes when I plug it in, dmesg tells me:
    scsi 29:0:0:0: Direct-Access Sony Eri Memory Stick 0000 PQ: 0 ANSI: 0
    sd 29:0:0:0: [sdc] 8005632 512-byte hardware sectors (4099 MB)
    sd 29:0:0:0: [sdc] Write Protect is off
    sd 29:0:0:0: [sdc] Mode Sense: 00 6a 00 00
    sd 29:0:0:0: [sdc] Assuming drive cache: write through
    sd 29:0:0:0: [sdc] 8005632 512-byte hardware sectors (4099 MB)
    sd 29:0:0:0: [sdc] Write Protect is off
    sd 29:0:0:0: [sdc] Mode Sense: 00 6a 00 00
    sd 29:0:0:0: [sdc] Assuming drive cache: write through
    sdc:
    and there's no /dev/sdc to be found.  damn thing's partitioned anyway.
    Anyway, my files are as follows:
    /etc/udev/rules.d/10-user.rules
    BUS=="usb", ATTRS{serial}=="356554005531070_0", KERNEL=="sd?1", NAME="%k", SYMLINK+="w800", GROUP="storage"
    BUS=="usb", ATTRS{serial}=="00000000-00000000-3878b387-c905fa0c-00000000", ATTR{size}=="15666600", KERNEL=="sd?1", NAME="%k", SYMLINK+="sansa", GROUP="storage"
    BUS=="usb", ATTRS{serial}=="00000000-00000000-3878b387-c905fa0c-00000000", KERNEL=="sd?1", NAME="%k", SYMLINK+="sansa_card", GROUP="storage"
    # Symlink USB keys
    SUBSYSTEMS=="usb", ATTRS{serial}=="0000000000017D", KERNEL=="sd?", NAME="%k", SYMLINK+="shazam", GROUP="storage"
    SUBSYSTEMS=="usb", KERNEL=="sd?1", NAME="%k", SYMLINK+="usbstorage", GROUP="storage"
    /etc/autofs/
    shazam -fstype=auto,async,nodev,nosuid,umask=000 :/dev/shazam
    w800 -fstype=auto,async,nodev,nosuid,umask=000 :/dev/w800
    sansa -fstype=auto,async,nodev,nosuid,umask=000 :/dev/sansa
    sansa_card -fstype=auto,async,nodev,nosuid,umask=000 :/dev/sansa_card
    usbstorage -fstype=auto,async,nodev,nosuid,umask=000 :/dev/usbstorage
    /etc/fstab (to allow easy umounting from thunar or whereever):
    /dev/shazam /media/shazam vfat rw,user,noauto,group,flush,quiet,nodev,nosuid,noexec,noatime,dmask=000,fmask=111 0 0
    /dev/sansa /media/sansa vfat rw,user,noauto,group,flush,quiet,nodev,nosuid,noexec,noatime,dmask=000,fmask=111 0 0
    /dev/sansa_card /media/sansa_card vfat rw,user,noauto,group,flush,quiet,nodev,nosuid,noexec,noatime,dmask=000,fmask=111 0 0
    /dev/w800 /media/w800 vfat rw,user,noauto,group,flush,quiet,nodev,nosuid,noexec,noatime,dmask=000,fmask=111 0 0i
    p
    /dev/usbstorage /media/usbstorage vfat rw,user,noauto,group,flush,quiet,nodev,nosuid,noexec,noatime,dmask=000,fmask=111 0 0
    Is there anything I appear to be doing wrong, or is it just my w800 being a crapweasel?  I like having this automounting while not having to use a DE.  I really don't use my w800 much anyway, due to the crappy memory card thing, but this is hurting my geek pride.
    Thanks!

    While I have no personal experience with it, I do know that there is a pkg specifically for mounting and/or making removable media visible to thunar. It's called thunar-volman, available here:: http://archlinux.org/packages/12374/
    FWIW, I got ALL the above by doing a pkg search at archlinux.org, for: thunar

  • UDev rules not working for MidiSport 2x2 usb midi device

    I installed arch a couple of months ago and am loving it so far.  Any problems I've had so far have already been solved in the forums, but this one's really got me.  I have a MidiSport 2x2 that I want the firmware to be loaded on everytime I plug it in.  I installed (there's not an arch package) a package that is supposed to do just that.  (It's called midisport-firmware-1.2.tar.gz).  However, the package seems to be out of date (2006) and I even had to modify a couple places in the configure script to get it to work with current program revisions.  However, once installed, it does nothing.  It installed firmware files and udev rules for the device into a couple of directories.  When I run the command that is supposed to load the firmware, it works fine.  But for some reason, (I even checked the udev kernel log) it's like the event isn't even being triggered.  Here's part of the original file that came with the package that's supposed to load the firmware:
    # midisport-firmware.rules - udev rules for loading firmware into MidiSport devices
    # DEVPATH=="/*.0" selects interface 0 only
    # (some udev versions don't work with SYSFS{bInterfaceNumber})
    # MidiSport 2x2
    ACTION=="add", SUBSYSTEM=="usb", DEVPATH=="/*.0", ENV{PRODUCT}=="763/1001/*", RUN+="/sbin/fxload -s /usr/local/share/usb/maudio/MidiSportLoader.ihx -I /usr/local/share/usb/maudio/MidiSport2x2.ihx"
    # vim: ft=conf
    And here's what I modified it to in an attempt to make it work:
    # MidiSport 2x2
    ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0763", ATTR{idProduct}=="1001", RUN+="/sbin/fxload -D /dev/%k -s /usr/local/share/usb/maudio/MidiSportLoader.ihx -I /usr/local/share/usb/maudio/MidiSport2x2.ihx"
    I would really appreciate help from anyone who knows about this kind of thing, as I can't figure out what's going wrong.  If it's something wrong with the config, please let me know.  Actually, some HAL events popped up when I was testing this out.  Is it possible HAL is blocking  the udev event somehow?

    Hi,
    The firmware files must be put in /lib/firmware so they can be found by the kernel. Are they being put there?

  • Udev rules and group / permission errors [solved] [outdated]

    Latest udev is a miracle to me. It ignores every group ore permission settings. Anyone else having same experiences?
    Last edited by Moo-Crumpus (2008-09-29 05:17:40)

    Let's assume that you have two files with udev rules. The basic udev.rules and 00.udev.rules (with custom rules).
    Udev first reads all rules from 00 file and then rules from the basic file.
    This means that if you have a custom rule for a given device you should copy all rules that apply to it from the basic file to the 00 file (not only lines with GROUP). This is because with OPTIONS="last_rule" udev will stop processing rules for this device.
    All rules are read and then applied in the order from the top to bottom except SUBSYTEM which is applied as the last rule (kind of held in a buffer). This is the reason why my cd burner /dev/hdc had permissions for disk group and not optical.
    This is my 00.udev.rules (it still needs some cosmetic changes but it works and of course I don't have all the devices):
    SUBSYSTEM="video4linux", GROUP="users"
    SUBSYSTEM="sound", GROUP="users"
    SUBSYSTEM="printer", GROUP="users"
    SUBSYSTEM="block", GROUP="disk"
    BUS="ide", KERNEL="hd[a-z]", PROGRAM="/etc/udev/cdsymlinks.sh %k", SYMLINK="%c{1} %c{2} %c{3} %c{4} %c{5} %c{6}"
    BUS="ide", KERNEL="hd*", PROGRAM="/etc/udev/ide-devfs.sh %k %b %n", SYMLINK="%c{1} %c{2}"
    BUS="ide", KERNEL="hdc", SYSFS{removable}="1", PROGRAM="/bin/cat /proc/ide/%k/media", RESULT="cdrom*", NAME="%k", GROUP="users", SYMLINK="nagrywarka dvd cdrw", OPTIONS="last_rule"
    BUS="ide", KERNEL="hd[a-z]", SYSFS{removable}="1", PROGRAM="/bin/cat /proc/ide/%k/media", RESULT="cdrom*", NAME="%k", GROUP="users", OPTIONS="last_rule"
    BUS="ide", KERNEL="hd*", PROGRAM="/etc/udev/ide-floppy.sh %k", RESULT="floppy", NAME{all_partitions}="%k", GROUP="users", OPTIONS="last_rule"
    BUS="scsi", KERNEL="sr[0-9]*", PROGRAM="/etc/udev/cdsymlinks.sh %k", SYMLINK="%c{1} %c{2} %c{3} %c{4} %c{5} %c{6}"
    BUS="scsi", KERNEL="scd[0-9]*", PROGRAM="/etc/udev/cdsymlinks.sh %k", SYMLINK="%c{1} %c{2} %c{3} %c{4} %c{5} %c{6}"
    BUS="scsi", KERNEL="sr[0-9]*", SYSFS{type}="5", NAME="scd%n", GROUP="users", OPTIONS="last_rule"
    BUS="scsi", KERNEL="sg[0-9]*", SYSFS{type}="5", NAME="%k", GROUP="users", OPTIONS="last_rule"
    KERNEL="fd[0-9]*", NAME="fd%n", GROUP="users", SYMLINK="floppy/%n fd%nu1440 fd%nu720 fd%nh1200 fd%nu360", OPTIONS="last_rule"
    BUS="usb", SYSFS{serial}="CN16J1Q3HWSX", KERNEL="lp[0-9]*", NAME="usb/%k", GROUP="users", SYMLINK="drukarka_hp_845c drukarka", OPTIONS="last_rule"
    BUS="usb", KERNEL="sd*", PROGRAM="/etc/udev/usb-storage.sh %k", RESULT="1", NAME="%k", GROUP="users", OPTIONS="last_rule"
    KERNEL="rtc", NAME="misc/%k", SYMLINK="%k", GROUP="users", MODE="0664", OPTIONS="last_rule"
    KERNEL="agpgart", NAME="misc/%k", SYMLINK="%k" GROUP="users", OPTIONS="last_rule"
    KERNEL="nvidia*", GROUP="users", OPTIONS="last_rule"
    KERNEL="fb[0-9]*", NAME="fb/%n", GROUP="users", SYMLINK="%k", OPTIONS="last_rule"
    KERNEL="card[0-9]*", NAME="dri/%k", GROUP="users", OPTIONS="last_rule"
    KERNEL="3dfx*", NAME="%k", GROUP="users", OPTIONS="last_rule"
    KERNEL="dvb*", PROGRAM="/etc/udev/dvb.sh %k", NAME="%c", GROUP="users", OPTIONS="last_rule"
    KERNEL="video[0-9]*", NAME="v4l/video%n", GROUP="users", SYMLINK="%k", OPTIONS="last_rule"
    KERNEL="radio[0-9]*", NAME="v4l/radio%n", GROUP="users", SYMLINK="radio%e", OPTIONS="last_rule"
    KERNEL="vbi[0-9]*", NAME="v4l/vbi%n", GROUP="users", SYMLINK="%k", OPTIONS="last_rule"
    KERNEL="vtx[0-9]*", NAME="v4l/vtx%n", GROUP="users", SYMLINK="%k", OPTIONS="last_rule"
    KERNEL="controlC[0-9]*", NAME="snd/%k", OPTIONS="last_rule"
    KERNEL="hw[CD0-9]*", NAME="snd/%k", OPTIONS="last_rule"
    KERNEL="pcm[CD0-9cp]*", NAME="snd/%k", OPTIONS="last_rule"
    KERNEL="midi[CD0-9]*", NAME="snd/%k", OPTIONS="last_rule"
    KERNEL="timer", NAME="snd/%k", OPTIONS="last_rule"
    KERNEL="seq", NAME="snd/%k", OPTIONS="last_rule"
    KERNEL="audio*", NAME="sound/%k", SYMLINK="%k", OPTIONS="last_rule"
    KERNEL="dmmidi*", NAME="sound/%k", SYMLINK="%k", OPTIONS="last_rule"
    KERNEL="admmidi*", NAME="sound/%k", SYMLINK="%k", OPTIONS="last_rule"
    KERNEL="dsp*", NAME="sound/%k", SYMLINK="%k", OPTIONS="last_rule"
    KERNEL="adsp*", NAME="sound/%k", SYMLINK="%k", OPTIONS="last_rule"
    KERNEL="midi*", NAME="sound/%k", SYMLINK="%k", OPTIONS="last_rule"
    KERNEL="amidi*", NAME="sound/%k", SYMLINK="%k", OPTIONS="last_rule"
    KERNEL="mixer*", NAME="sound/%k", SYMLINK="%k", OPTIONS="last_rule"
    KERNEL="sequencer*", NAME="sound/%k", SYMLINK="%k", OPTIONS="last_rule"
    KERNEL="pktcdvd", NAME="pktcdvd/control", GROUP="users", MODE="0660", OPTIONS="last_rule"
    KERNEL="pktcdvd[0-9]*", NAME="pktcdvd/pktcdvd%n", GROUP="users", MODE="0660", OPTIONS="last_rule"
    The problem with /dev/hdc was that first udev (version 057) was reading a rule from my 00 file (BUS="ide", KERNEL="hdc"...) with GROUP=users. Then it was reading SUBSYSTEM="block", GROUP="disk" rule from the basic file (but it wasn't executed at that time). And then it was reading BUS="ide", KERNEL="hd[a-z]", SYSFS{removable}="1"... with GROUP=optical. Then it was executing SUBSYTEM rule (hdc is a block device). That's why only disk group had an access to /dev/hdc (with OPTIONS="last_rule" in the basic file in the GROUP="optical" line it would ignore SUBSYSTEM rule).
    There are also other rules that you should add (IMO) to your custom rules if  you are changing something. In my case it's for example BUS="ide", KERNEL="hd[a-z]", PROGRAM="/etc/udev/cdsymlinks.sh %k"... which creates symlinks for cd drives. This rule must be above other rules (the number of the symlinks is now unlimited - previously it was 5 IIRC).
    So now the rules are mixed together in the lexical order (except SUBSYTEM rules which are executed at the end) unless OPTIONS="last_rule" is used or second (and other) rule has a NAME filed (only one rule for a given device can have NAME filed. Every other rule for the same device with NAME field is ignored IIRC). It also means you can now split rules for a device into several rules - only one of them can have NAME filed and the last should have OPTIONS="last_rule".
    Since in your case you have custom rules only for a well defined usb devices (not /dev/sd*) IMO it should work as you think (only add OPTIONS="last_rule").
    I hope it's now perfectly clear  8) 

  • [SOLVED]system fails to boot since adding udev rules for automounting

    Hello
    I have recently been trying to use udev rules to automount, and putting together stuff from the wiki, forums and general googling around have produced the following set of rules:
    # automounts usb hdd and pendrives as usbhd-sdx; no messing around with
    # volume labels or other confusing stuff
    # matches all sdx devices except the internal hdd, sda
    KERNEL=="sd[b-z]", NAME="%k", SYMLINK+="usbhd-%k", GROUP="users", OPTIONS="last_rule"
    # imports filesystem information
    ACTION=="add", IMPORT{program}="/sbin/blkid -o udev -p %N"
    # creates mount points and sets up symlinks
    ACTION=="add", KERNEL=="sd[b-z][0-9]", SYMLINK+="usbhd-%k", GROUP="users", NAME="%k"
    ACTION=="add", KERNEL=="sd[b-z][0-9]", RUN+="/bin/mkdir -p /media/usbhd-%k"
    ACTION=="add", KERNEL=="sd[b-z][0-9]", RUN+="/bin/ln -s /media/usbhd-%k /mnt/usbhd-%k"
    # global mount options
    ACTION=="add", ENV{mount_options}="relatime"
    # filesystem-specific mount options (777/666 dir/file perms for ntfs/vfat)
    ACTION=="add", ENV{ID_FS_TYPE}=="vfat|ntfs", ENV{mount_options}="$env{mount_options},gid=100,dmask=000,fmask=111,utf8"
    # automount ntfs filesystem with ntfs-3g driver
    ACTION=="add", KERNEL=="sd[b-z][0-9]", ENV{ID_FS_TYPE}=="ntfs", RUN+="/bin/mount -t ntfs-3g -o %E{mount_options} /dev/%k /media/usbhd-%k", OPTIONS="last_r$
    # automount all other file systems
    ACTION=="add", KERNEL=="sd[b-z][0-9]", ENV{ID_FS_TYPE}!="ntfs", RUN+="/bin/mount -t auto -o %E{mount_options} /dev/%k /media/usbhd-%k", OPTIONS="last_rule"
    # unmounts and removes the mount points
    ACTION=="remove", KERNEL=="sd[b-z][0-9]", RUN+="/bin/rm -f /mnt/usbhd-%k"
    ACTION=="remove", KERNEL=="sd[b-z][0-9]", RUN+="/bin/umount -l /media/usbhd-%k"
    ACTION=="remove", KERNEL=="sd[b-z][0-9]", RUN+="/bin/rmdir /media/usbhd-%k", OPTIONS="last_rule"
    This seemed to be working very well unitl I tried to boot this morning and the boot process stopped at "processing UDev events" with the following message:
    iTCO_wdt: Unexpected close, not stopping watchdog!
    It pauses at this point for 10-15 seconds and then reboots.
    Having searched a bit, I found the following similar post on the forums:  http://bbs.archlinux.org/viewtopic.php?pid=459375
    Which suggests that the problem might lie with this line:
    ACTION=="add", IMPORT{program}="/sbin/blkid -o udev -p %N"
    I have renamed the file so that it no longer has the udev .rules extension and now the system boots fine.  Does anyone have any suggestions as to why the above rules might be causing this behaviour and how I might go about fixing it?
    Thanks
    Last edited by useradded (2010-07-02 22:58:14)

    Hey falconindy
    That was the final kick up the logical a$$ that I needed to get some kind of grip on udev rules.  I now have a fully functional rule that applies only to /dev/sdxy and not to everything else as well, so no more boot trauma, THANK YOU.
    I will mark this thread as solved and post my new rule for the benefit of anyone who might read this.
    New rule (no boot problems):
    # automounts usb hdd and pendrives as label or as usbhd-sdxy if no label present
    # ensures the following is _only_ run for sdxy devices excluding internal hdd, sda
    KERNEL!="sd[b-z][0-9]", GOTO="personal_usb_automount_settings_end"
    # imports filesystem information
    # provides access to following variables:
    # ID_FS_UUID; ID_FS_UUID_ENC; ID_FS_VERSION; ID_FS_TYPE; ID_FS_VERSION; ID_FS_LABEL
    # accessible via ENV{variable}; $env{variable}|%E{variable}
    IMPORT{program}="/sbin/blkid -o udev -p %N"
    # Get a label if present, otherwise name usbhd-%k
    ENV{ID_FS_LABEL}!="", ENV{dir_name}="%E{ID_FS_LABEL}"
    ENV{ID_FS_LABEL}=="", ENV{dir_name}="usbhd-%k"
    # creates mount points and sets up symlinks
    ACTION=="add", SYMLINK+="%E{dir_name}", GROUP="users", NAME="%k"
    ACTION=="add", RUN+="/bin/mkdir -p /media/%E{dir_name}"
    ACTION=="add", RUN+="/bin/ln -s /media/%E{dir_name} /mnt/%E{dir_name}"
    # global mount options
    ACTION=="add", ENV{mount_options}="relatime"
    # filesystem-specific mount options (777/666 dir/file perms for ntfs/vfat)
    ACTION=="add", ENV{ID_FS_TYPE}=="vfat|ntfs", ENV{mount_options}="$env{mount_options},gid=100,dmask=000,fmask=111,utf8"
    # automount ntfs filesystem with ntfs-3g driver
    ACTION=="add", ENV{ID_FS_TYPE}=="ntfs", RUN+="/bin/mount -t ntfs-3g -o %E{mount_options} /dev/%k /media/%E{dir_name}", OPTIONS="last_rule"
    # automount all other file systems
    ACTION=="add",ENV{ID_FS_TYPE}!="ntfs", RUN+="/bin/mount -t auto -o %E{mount_options} /dev/%k /media/%E{dir_name}", OPTIONS="last_rule"
    # unmounts and removes the mount points
    ACTION=="remove", RUN+="/bin/rm -f /mnt/%E{dir_name}"
    ACTION=="remove", RUN+="/bin/umount -l /media/%E{dir_name}"
    ACTION=="remove", RUN+="/bin/rmdir /media/%E{dir_name}", OPTIONS="last_rule"
    # exit
    LABEL=="personal_usb_automount_settings_end"
    Last edited by useradded (2010-07-02 22:59:20)

  • [SOLVED] udev rule no longer working

    I have a udev rule set up to automatically mount an ext4 filesystem when I plug a certain thumb drive in.  It was working fine until yesterday (probably due to updates).  Here is the rule, in file /etc/udev/rules.d/99-gfk.rules:
    KERNEL=="sd?2", SUBSYSTEM=="block", ATTRS{idVendor}=="0930", ATTRS{idProduct}=="6545", ATTRS{serial}=="1C6F654E4041ED601910053F", SYMLINK+="gfshare"
    ACTION=="add", KERNEL=="sd?2", SUBSYSTEM=="block", ATTRS{idVendor}=="0930", ATTRS{idProduct}=="6545", ATTRS{serial}=="1C6F654E4041ED601910053F", RUN+="/bin/mkdir /media/gfshare"
    ACTION=="add", KERNEL=="sd?2", SUBSYSTEM=="block", ATTRS{idVendor}=="0930", ATTRS{idProduct}=="6545", ATTRS{serial}=="1C6F654E4041ED601910053F", RUN+="/bin/mount -t ext4 -o ro,nosuid,nodev,noexec,noatime /dev/gfshare /media/gfshare"
    The symlink and the mkdir command are both working fine, but the mount command is not being run for some reason.  If I manually run the mount command it works fine.  Some possibly helpful output:
    # pacman -Qo $(which udevadm)
    /usr/bin/udevadm is owned by systemd 212-1
    # dmesg |tail -16
    [26458.120628] usb 7-1.3: new high-speed USB device number 7 using ehci-pci
    [26458.223059] usb-storage 7-1.3:1.0: USB Mass Storage device detected
    [26458.223825] scsi10 : usb-storage 7-1.3:1.0
    [26459.311607] scsi 10:0:0:0: Direct-Access Kingston DataTraveler 2.0 PMAP PQ: 0 ANSI: 4
    [26460.834081] sd 10:0:0:0: [sdd] 15240576 512-byte logical blocks: (7.80 GB/7.26 GiB)
    [26460.834931] sd 10:0:0:0: [sdd] Write Protect is off
    [26460.834935] sd 10:0:0:0: [sdd] Mode Sense: 23 00 00 00
    [26460.835617] sd 10:0:0:0: [sdd] No Caching mode page found
    [26460.835621] sd 10:0:0:0: [sdd] Assuming drive cache: write through
    [26460.839455] sd 10:0:0:0: [sdd] No Caching mode page found
    [26460.839460] sd 10:0:0:0: [sdd] Assuming drive cache: write through
    [26460.860579] sdd: sdd1 sdd2
    [26460.867111] sd 10:0:0:0: [sdd] No Caching mode page found
    [26460.867115] sd 10:0:0:0: [sdd] Assuming drive cache: write through
    [26460.867118] sd 10:0:0:0: [sdd] Attached SCSI removable disk
    [26461.041982] EXT4-fs (sdd2): mounted filesystem with ordered data mode. Opts: (null)
    # udevadm test /sys/bus/usb/devices/7-1.3
    calling: test
    version 212
    This program is for debugging only, it does not run any program
    specified by a RUN key. It may show incorrect results, because
    some values may be different, or not available at a simulation run.
    load module index
    timestamp of '/etc/systemd/network' changed
    timestamp of '/usr/lib/systemd/network' changed
    Parsed configuration file /usr/lib/systemd/network/99-default.link
    Created link configuration context
    timestamp of '/etc/udev/rules.d' changed
    Skipping overridden file: /usr/lib/udev/rules.d/80-net-setup-link.rules.
    read rules file: /usr/lib/udev/rules.d/10-dm.rules
    read rules file: /usr/lib/udev/rules.d/11-dm-lvm.rules
    read rules file: /etc/udev/rules.d/12-android.rules
    read rules file: /usr/lib/udev/rules.d/13-dm-disk.rules
    read rules file: /usr/lib/udev/rules.d/40-hpet-permissions.rules
    read rules file: /usr/lib/udev/rules.d/40-usb-media-players.rules
    read rules file: /usr/lib/udev/rules.d/42-usb-hid-pm.rules
    read rules file: /usr/lib/udev/rules.d/50-firmware.rules
    read rules file: /usr/lib/udev/rules.d/50-udev-default.rules
    read rules file: /usr/lib/udev/rules.d/51-android.rules
    read rules file: /usr/lib/udev/rules.d/60-cdrom_id.rules
    read rules file: /usr/lib/udev/rules.d/60-drm.rules
    read rules file: /usr/lib/udev/rules.d/60-keyboard.rules
    read rules file: /usr/lib/udev/rules.d/60-pcmcia.rules
    read rules file: /usr/lib/udev/rules.d/60-persistent-alsa.rules
    read rules file: /usr/lib/udev/rules.d/60-persistent-input.rules
    read rules file: /usr/lib/udev/rules.d/60-persistent-serial.rules
    read rules file: /usr/lib/udev/rules.d/60-persistent-storage-tape.rules
    read rules file: /usr/lib/udev/rules.d/60-persistent-storage.rules
    read rules file: /usr/lib/udev/rules.d/60-persistent-v4l.rules
    read rules file: /usr/lib/udev/rules.d/60-vboxdrv.rules
    read rules file: /usr/lib/udev/rules.d/61-accelerometer.rules
    read rules file: /usr/lib/udev/rules.d/63-md-raid-arrays.rules
    read rules file: /usr/lib/udev/rules.d/64-btrfs.rules
    read rules file: /usr/lib/udev/rules.d/64-md-raid-assembly.rules
    read rules file: /usr/lib/udev/rules.d/69-cd-sensors.rules
    read rules file: /usr/lib/udev/rules.d/69-dm-lvm-metad.rules
    read rules file: /usr/lib/udev/rules.d/69-libmtp.rules
    read rules file: /usr/lib/udev/rules.d/70-infrared.rules
    read rules file: /usr/lib/udev/rules.d/70-power-switch.rules
    read rules file: /usr/lib/udev/rules.d/70-uaccess.rules
    read rules file: /usr/lib/udev/rules.d/71-seat.rules
    read rules file: /usr/lib/udev/rules.d/73-seat-late.rules
    read rules file: /usr/lib/udev/rules.d/75-net-description.rules
    read rules file: /usr/lib/udev/rules.d/75-probe_mtd.rules
    read rules file: /usr/lib/udev/rules.d/75-tty-description.rules
    read rules file: /usr/lib/udev/rules.d/78-sound-card.rules
    read rules file: /usr/lib/udev/rules.d/80-drivers.rules
    read rules file: /etc/udev/rules.d/80-net-setup-link.rules
    read rules file: /usr/lib/udev/rules.d/80-udisks.rules
    read rules file: /usr/lib/udev/rules.d/80-udisks2.rules
    read rules file: /usr/lib/udev/rules.d/85-usbmuxd.rules
    read rules file: /usr/lib/udev/rules.d/90-alsa-restore.rules
    read rules file: /usr/lib/udev/rules.d/95-cd-devices.rules
    read rules file: /usr/lib/udev/rules.d/95-dm-notify.rules
    read rules file: /usr/lib/udev/rules.d/95-udev-late.rules
    read rules file: /usr/lib/udev/rules.d/95-upower-battery-recall-dell.rules
    read rules file: /usr/lib/udev/rules.d/95-upower-battery-recall-fujitsu.rules
    read rules file: /usr/lib/udev/rules.d/95-upower-battery-recall-gateway.rules
    read rules file: /usr/lib/udev/rules.d/95-upower-battery-recall-ibm.rules
    read rules file: /usr/lib/udev/rules.d/95-upower-battery-recall-lenovo.rules
    read rules file: /usr/lib/udev/rules.d/95-upower-battery-recall-toshiba.rules
    read rules file: /usr/lib/udev/rules.d/95-upower-csr.rules
    read rules file: /usr/lib/udev/rules.d/95-upower-hid.rules
    read rules file: /usr/lib/udev/rules.d/95-upower-wup.rules
    read rules file: /etc/udev/rules.d/99-gfk.rules
    read rules file: /usr/lib/udev/rules.d/99-systemd.rules
    read rules file: /usr/lib/udev/rules.d/kino.rules
    rules contain 98304 bytes tokens (8192 * 12 bytes), 22360 bytes strings
    10092 strings (88570 bytes), 8317 de-duplicated (67986 bytes), 1776 trie nodes used
    IMPORT builtin 'usb_id' /usr/lib/udev/rules.d/50-udev-default.rules:9
    IMPORT builtin 'hwdb' /usr/lib/udev/rules.d/50-udev-default.rules:9
    MODE 0664 /usr/lib/udev/rules.d/50-udev-default.rules:37
    GROUP 1002 /usr/lib/udev/rules.d/51-android.rules:387
    MODE 0660 /usr/lib/udev/rules.d/51-android.rules:387
    RUN '/usr/share/virtualbox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass} vboxusers' /usr/lib/udev/rules.d/60-vboxdrv.rules:6
    PROGRAM '/usr/lib/udev/mtp-probe /sys/devices/pci0000:00/0000:00:1a.7/usb7/7-1/7-1.3 7 7' /usr/lib/udev/rules.d/69-libmtp.rules:1204
    starting '/usr/lib/udev/mtp-probe /sys/devices/pci0000:00/0000:00:1a.7/usb7/7-1/7-1.3 7 7'
    '/usr/lib/udev/mtp-probe /sys/devices/pci0000:00/0000:00:1a.7/usb7/7-1/7-1.3 7 7'(out) '0'
    '/usr/lib/udev/mtp-probe /sys/devices/pci0000:00/0000:00:1a.7/usb7/7-1/7-1.3 7 7' [24644] exit with return code 0
    IMPORT builtin 'path_id' /usr/lib/udev/rules.d/71-seat.rules:43
    RUN 'uaccess' /usr/lib/udev/rules.d/73-seat-late.rules:15
    handling device node '/dev/bus/usb/007/007', devnum=c189:774, mode=0660, uid=0, gid=1002
    preserve permissions /dev/bus/usb/007/007, 020660, uid=0, gid=1002
    preserve already existing symlink '/dev/char/189:774' to '../bus/usb/007/007'
    ACTION=add
    BUSNUM=007
    DEVNAME=/dev/bus/usb/007/007
    DEVNUM=007
    DEVPATH=/devices/pci0000:00/0000:00:1a.7/usb7/7-1/7-1.3
    DEVTYPE=usb_device
    DRIVER=usb
    ID_BUS=usb
    ID_DRIVE_THUMB=1
    ID_FOR_SEAT=usb-pci-0000_00_1a_7-usb-0_1_3
    ID_MODEL=DataTraveler_2.0
    ID_MODEL_ENC=DataTraveler\x202.0
    ID_MODEL_FROM_DATABASE=Kingston DataTraveler 102 Flash Drive / HEMA Flash Drive 2 GB / PNY Attache 4GB Stick
    ID_MODEL_ID=6545
    ID_PATH=pci-0000:00:1a.7-usb-0:1.3
    ID_PATH_TAG=pci-0000_00_1a_7-usb-0_1_3
    ID_REVISION=0100
    ID_SERIAL=Kingston_DataTraveler_2.0_1C6F654E4041ED601910053F
    ID_SERIAL_SHORT=1C6F654E4041ED601910053F
    ID_USB_INTERFACES=:080650:
    ID_VENDOR=Kingston
    ID_VENDOR_ENC=Kingston
    ID_VENDOR_FROM_DATABASE=Toshiba Corp.
    ID_VENDOR_ID=0930
    MAJOR=189
    MINOR=774
    PRODUCT=930/6545/100
    SUBSYSTEM=usb
    TAGS=:seat:uaccess:
    TYPE=0/0/0
    USEC_INITIALIZED=26452326568
    adb_user=yes
    run: '/usr/share/virtualbox/VBoxCreateUSBNode.sh 189 774 00 vboxusers'
    run: 'uaccess'
    unload module index
    Unloaded link configuration context
    # udevadm test /sys/bus/usb/devices/7-1.3:1.0
    calling: test
    version 212
    This program is for debugging only, it does not run any program
    specified by a RUN key. It may show incorrect results, because
    some values may be different, or not available at a simulation run.
    load module index
    timestamp of '/etc/systemd/network' changed
    timestamp of '/usr/lib/systemd/network' changed
    Parsed configuration file /usr/lib/systemd/network/99-default.link
    Created link configuration context
    timestamp of '/etc/udev/rules.d' changed
    Skipping overridden file: /usr/lib/udev/rules.d/80-net-setup-link.rules.
    read rules file: /usr/lib/udev/rules.d/10-dm.rules
    read rules file: /usr/lib/udev/rules.d/11-dm-lvm.rules
    read rules file: /etc/udev/rules.d/12-android.rules
    read rules file: /usr/lib/udev/rules.d/13-dm-disk.rules
    read rules file: /usr/lib/udev/rules.d/40-hpet-permissions.rules
    read rules file: /usr/lib/udev/rules.d/40-usb-media-players.rules
    read rules file: /usr/lib/udev/rules.d/42-usb-hid-pm.rules
    read rules file: /usr/lib/udev/rules.d/50-firmware.rules
    read rules file: /usr/lib/udev/rules.d/50-udev-default.rules
    read rules file: /usr/lib/udev/rules.d/51-android.rules
    read rules file: /usr/lib/udev/rules.d/60-cdrom_id.rules
    read rules file: /usr/lib/udev/rules.d/60-drm.rules
    read rules file: /usr/lib/udev/rules.d/60-keyboard.rules
    read rules file: /usr/lib/udev/rules.d/60-pcmcia.rules
    read rules file: /usr/lib/udev/rules.d/60-persistent-alsa.rules
    read rules file: /usr/lib/udev/rules.d/60-persistent-input.rules
    read rules file: /usr/lib/udev/rules.d/60-persistent-serial.rules
    read rules file: /usr/lib/udev/rules.d/60-persistent-storage-tape.rules
    read rules file: /usr/lib/udev/rules.d/60-persistent-storage.rules
    read rules file: /usr/lib/udev/rules.d/60-persistent-v4l.rules
    read rules file: /usr/lib/udev/rules.d/60-vboxdrv.rules
    read rules file: /usr/lib/udev/rules.d/61-accelerometer.rules
    read rules file: /usr/lib/udev/rules.d/63-md-raid-arrays.rules
    read rules file: /usr/lib/udev/rules.d/64-btrfs.rules
    read rules file: /usr/lib/udev/rules.d/64-md-raid-assembly.rules
    read rules file: /usr/lib/udev/rules.d/69-cd-sensors.rules
    read rules file: /usr/lib/udev/rules.d/69-dm-lvm-metad.rules
    read rules file: /usr/lib/udev/rules.d/69-libmtp.rules
    read rules file: /usr/lib/udev/rules.d/70-infrared.rules
    read rules file: /usr/lib/udev/rules.d/70-power-switch.rules
    read rules file: /usr/lib/udev/rules.d/70-uaccess.rules
    read rules file: /usr/lib/udev/rules.d/71-seat.rules
    read rules file: /usr/lib/udev/rules.d/73-seat-late.rules
    read rules file: /usr/lib/udev/rules.d/75-net-description.rules
    read rules file: /usr/lib/udev/rules.d/75-probe_mtd.rules
    read rules file: /usr/lib/udev/rules.d/75-tty-description.rules
    read rules file: /usr/lib/udev/rules.d/78-sound-card.rules
    read rules file: /usr/lib/udev/rules.d/80-drivers.rules
    read rules file: /etc/udev/rules.d/80-net-setup-link.rules
    read rules file: /usr/lib/udev/rules.d/80-udisks.rules
    read rules file: /usr/lib/udev/rules.d/80-udisks2.rules
    read rules file: /usr/lib/udev/rules.d/85-usbmuxd.rules
    read rules file: /usr/lib/udev/rules.d/90-alsa-restore.rules
    read rules file: /usr/lib/udev/rules.d/95-cd-devices.rules
    read rules file: /usr/lib/udev/rules.d/95-dm-notify.rules
    read rules file: /usr/lib/udev/rules.d/95-udev-late.rules
    read rules file: /usr/lib/udev/rules.d/95-upower-battery-recall-dell.rules
    read rules file: /usr/lib/udev/rules.d/95-upower-battery-recall-fujitsu.rules
    read rules file: /usr/lib/udev/rules.d/95-upower-battery-recall-gateway.rules
    read rules file: /usr/lib/udev/rules.d/95-upower-battery-recall-ibm.rules
    read rules file: /usr/lib/udev/rules.d/95-upower-battery-recall-lenovo.rules
    read rules file: /usr/lib/udev/rules.d/95-upower-battery-recall-toshiba.rules
    read rules file: /usr/lib/udev/rules.d/95-upower-csr.rules
    read rules file: /usr/lib/udev/rules.d/95-upower-hid.rules
    read rules file: /usr/lib/udev/rules.d/95-upower-wup.rules
    read rules file: /etc/udev/rules.d/99-gfk.rules
    read rules file: /usr/lib/udev/rules.d/99-systemd.rules
    read rules file: /usr/lib/udev/rules.d/kino.rules
    rules contain 98304 bytes tokens (8192 * 12 bytes), 22360 bytes strings
    10092 strings (88570 bytes), 8317 de-duplicated (67986 bytes), 1776 trie nodes used
    IMPORT builtin 'hwdb' /usr/lib/udev/rules.d/50-udev-default.rules:11
    RUN 'kmod load $env{MODALIAS}' /usr/lib/udev/rules.d/80-drivers.rules:5
    ACTION=add
    DEVPATH=/devices/pci0000:00/0000:00:1a.7/usb7/7-1/7-1.3/7-1.3:1.0
    DEVTYPE=usb_interface
    DRIVER=usb-storage
    ID_MODEL_FROM_DATABASE=Kingston DataTraveler 102 Flash Drive / HEMA Flash Drive 2 GB / PNY Attache 4GB Stick
    ID_VENDOR_FROM_DATABASE=Toshiba Corp.
    INTERFACE=8/6/80
    MODALIAS=usb:v0930p6545d0100dc00dsc00dp00ic08isc06ip50in00
    PRODUCT=930/6545/100
    SUBSYSTEM=usb
    TYPE=0/0/0
    USEC_INITIALIZED=452326811
    run: 'kmod load usb:v0930p6545d0100dc00dsc00dp00ic08isc06ip50in00'
    unload module index
    Unloaded link configuration context
    Last edited by bentglasstube (2014-04-03 20:51:36)

    I see.  That is somewhat aggravating but I will find another way to achieve what I wanted I suppose.
    Thank you.  Should I mark this is solved or unsolvable or something?  Sorry, I'm new to posting on these forums.
    Edit:  I was able to achieve what I wanted with udevil as recommended by the wiki.
    Last edited by bentglasstube (2014-04-03 20:55:45)

  • [SOLVED]Udevd fails to recognize rules in /lib/udev/rules.d

    I've been having a few crashes since the update of udev earlier this week (so far only on my laptop where the Xserver hangs and requires a hard reboot to get anything working again).  While investigating the logs, I ran across the following errors:
    Oct 26 04:39:54 lswest-CULV [ 0.836513] udevd[74]: starting version 173
    Oct 26 04:39:54 lswest-CULV [ 17.450369] udevd[260]: starting version 174
    Oct 26 04:46:04 lswest-CULV [ 0.839752] udevd[74]: starting version 173
    Oct 26 04:46:04 lswest-CULV [ 8.778232] udevd[259]: starting version 174
    Oct 26 11:00:48 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/42-qemu-usb.rules': No such file or directory
    Oct 26 11:00:48 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/50-firmware.rules': No such file or directory
    Oct 26 11:00:48 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/50-udev-default.rules': No such file or directory
    Oct 26 11:00:48 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/60-cdrom_id.rules': No such file or directory
    Oct 26 11:00:48 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/60-persistent-alsa.rules': No such file or directory
    Oct 26 11:00:48 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/60-persistent-input.rules': No such file or directory
    Oct 26 11:00:48 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/60-persistent-serial.rules': No such file or directory
    Oct 26 11:00:48 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/60-persistent-storage-tape.rules': No such file or directory
    Oct 26 11:00:48 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/60-persistent-storage.rules': No such file or directory
    Oct 26 11:00:48 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/60-persistent-v4l.rules': No such file or directory
    Oct 26 11:00:48 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/61-accelerometer.rules': No such file or directory
    Oct 26 11:00:48 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/70-udev-acl.rules': No such file or directory
    Oct 26 11:00:48 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/75-net-description.rules': No such file or directory
    Oct 26 11:00:48 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/75-probe_mtd.rules': No such file or directory
    Oct 26 11:00:48 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/75-tty-description.rules': No such file or directory
    Oct 26 11:00:48 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/78-sound-card.rules': No such file or directory
    Oct 26 11:00:48 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/80-drivers.rules': No such file or directory
    Oct 26 11:01:16 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/42-qemu-usb.rules': No such file or directory
    Oct 26 11:01:16 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/50-firmware.rules': No such file or directory
    Oct 26 11:01:16 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/50-udev-default.rules': No such file or directory
    Oct 26 11:01:16 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/60-cdrom_id.rules': No such file or directory
    Oct 26 11:01:16 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/60-persistent-alsa.rules': No such file or directory
    Oct 26 11:01:16 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/60-persistent-input.rules': No such file or directory
    Oct 26 11:01:16 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/60-persistent-serial.rules': No such file or directory
    Oct 26 11:01:16 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/60-persistent-storage-tape.rules': No such file or directory
    Oct 26 11:01:16 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/60-persistent-storage.rules': No such file or directory
    Oct 26 11:01:16 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/60-persistent-v4l.rules': No such file or directory
    Oct 26 11:01:16 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/61-accelerometer.rules': No such file or directory
    Oct 26 11:01:16 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/70-udev-acl.rules': No such file or directory
    Oct 26 11:01:16 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/75-net-description.rules': No such file or directory
    Oct 26 11:01:16 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/75-probe_mtd.rules': No such file or directory
    Oct 26 11:01:16 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/75-tty-description.rules': No such file or directory
    Oct 26 11:01:16 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/78-sound-card.rules': No such file or directory
    Oct 26 11:01:16 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/80-drivers.rules': No such file or directory
    Oct 26 11:01:16 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/81-arch.rules': No such file or directory
    Oct 26 11:01:16 lswest-CULV udevd[259]: can not find '/lib/udev/rules.d/95-keyboard-force-release.rules': No such file or directory
    These errors have appeared since the 24th of October (the last marked update day for the udev package).  I'm also slightly concerned about the first 4 lines, where udevd "starts" version 173 and then version 174.  According to pacman -Q udev, only version 174 is installed.
    Upon investigating the folder, I find that all the "missing" files are present:
    [lswest@lswest-CULV: rules.d]% ls
    total 652K
    drwxr-xr-x 2 root root 4.0K Oct 26 11:01 ./
    drwxr-xr-x 5 root root 4.0K Oct 26 11:01 ../
    -r--r--r-- 1 root root 6.4K Aug 20 02:32 10-dm.rules
    -rw-r--r-- 1 root root 505 Aug 16 19:06 10-vboxdrv.rules
    -r--r--r-- 1 root root 1.3K Jul 7 2010 11-dm-lvm.rules
    -r--r--r-- 1 root root 1011 Nov 13 2009 13-dm-disk.rules
    -rw-r--r-- 1 root root 159K Nov 28 2010 40-gphoto.rules
    -rw-r--r-- 1 root root 26K Oct 4 11:56 40-usb-media-players.rules
    -rw-r--r-- 1 root root 764 Oct 19 23:43 42-qemu-usb.rules
    -rw-r--r-- 1 root root 1.8K Jul 30 18:31 45-libnjb.rules
    -rw-r--r-- 1 root root 219 Oct 19 23:43 50-firmware.rules
    -rw-r--r-- 1 root root 3.5K Oct 19 23:43 50-udev-default.rules
    -rw-r--r-- 1 root root 52K Jun 13 13:04 52-libmtp.rules
    -rw-r--r-- 1 root root 104K Oct 5 23:42 53-sane.rules
    -rw-r--r-- 1 root root 584 Oct 19 23:43 60-cdrom_id.rules
    -rw-r--r-- 1 root root 1.1K Aug 3 18:54 60-pcmcia.rules
    -rw-r--r-- 1 root root 616 Oct 19 23:43 60-persistent-alsa.rules
    -rw-r--r-- 1 root root 2.4K Oct 19 23:43 60-persistent-input.rules
    -rw-r--r-- 1 root root 947 Oct 19 23:43 60-persistent-serial.rules
    -rw-r--r-- 1 root root 6.0K Oct 19 23:43 60-persistent-storage.rules
    -rw-r--r-- 1 root root 1.4K Oct 19 23:43 60-persistent-storage-tape.rules
    -rw-r--r-- 1 root root 770 Oct 19 23:43 60-persistent-v4l.rules
    -rw-r--r-- 1 root root 46 Feb 9 2011 60-rfkill.rules
    -rw-r--r-- 1 root root 166 Oct 19 23:43 61-accelerometer.rules
    -rw-r--r-- 1 root root 369 Oct 17 15:34 61-gnome-bluetooth-rfkill.rules
    -rw-r--r-- 1 root root 2.2K Sep 14 09:07 64-md-raid.rules
    -rw-r--r-- 1 root root 40 Aug 12 18:32 65-kvm.rules
    -rw-r--r-- 1 root root 4.0K Oct 4 09:34 69-cd-sensors.rules
    -rw-r--r-- 1 root root 233 Jul 17 18:06 70-infrared.rules
    -rw-r--r-- 1 root root 2.6K Oct 19 23:43 70-udev-acl.rules
    -rw-r--r-- 1 root root 642 Oct 19 23:43 75-net-description.rules
    -rw-r--r-- 1 root root 254 Oct 19 23:43 75-probe_mtd.rules
    -rw-r--r-- 1 root root 642 Oct 19 23:43 75-tty-description.rules
    -rw-r--r-- 1 root root 3.3K Aug 3 10:00 77-mm-ericsson-mbm.rules
    -rw-r--r-- 1 root root 11K Aug 3 10:00 77-mm-longcheer-port-types.rules
    -rw-r--r-- 1 root root 379 Aug 3 10:00 77-mm-pcmcia-device-blacklist.rules
    -rw-r--r-- 1 root root 510 Aug 3 10:00 77-mm-platform-serial-whitelist.rules
    -rw-r--r-- 1 root root 1.6K Aug 3 10:00 77-mm-simtech-port-types.rules
    -rw-r--r-- 1 root root 3.0K Aug 3 10:00 77-mm-usb-device-blacklist.rules
    -rw-r--r-- 1 root root 1.6K Aug 3 10:00 77-mm-x22x-port-types.rules
    -rw-r--r-- 1 root root 9.3K Aug 3 10:00 77-mm-zte-port-types.rules
    -rw-r--r-- 1 root root 284 Sep 20 09:26 77-nm-olpc-mesh.rules
    -rw-r--r-- 1 root root 4.2K Oct 19 23:43 78-sound-card.rules
    -rw-r--r-- 1 root root 559 Oct 19 23:43 80-drivers.rules
    -rw-r--r-- 1 root root 667 Aug 3 10:00 80-mm-candidate.rules
    -rw-r--r-- 1 root root 9.3K Aug 26 18:47 80-udisks.rules
    -rw-r--r-- 1 root root 372 Oct 19 23:43 81-arch.rules
    -rw-r--r-- 1 root root 335 Apr 4 2011 85-regulatory.rules
    -rw-r--r-- 1 root root 602 Aug 4 17:39 85-usbmuxd.rules
    -rw-r--r-- 1 root root 131 Aug 17 09:43 90-alsa-restore.rules
    -rw-r--r-- 1 root root 83 Jan 10 2011 90-hal.rules
    -rw-r--r-- 1 root root 1.9K Aug 9 15:18 90-libgpod.rules
    -rw-r--r-- 1 root root 2.0K Oct 20 17:26 90-pulseaudio.rules
    -rw-r--r-- 1 root root 847 Oct 4 09:34 95-cd-devices.rules
    -r--r--r-- 1 root root 492 Nov 1 2009 95-dm-notify.rules
    -rw-r--r-- 1 root root 3.0K Oct 19 23:43 95-keyboard-force-release.rules
    -rw-r--r-- 1 root root 11K Oct 19 23:43 95-keymap.rules
    -rw-r--r-- 1 root root 155 Oct 19 23:43 95-udev-late.rules
    -rw-r--r-- 1 root root 2.8K Oct 3 13:17 95-upower-battery-recall-dell.rules
    -rw-r--r-- 1 root root 1.2K Oct 3 13:17 95-upower-battery-recall-fujitsu.rules
    -rw-r--r-- 1 root root 1020 Oct 3 13:17 95-upower-battery-recall-gateway.rules
    -rw-r--r-- 1 root root 1.6K Oct 3 13:17 95-upower-battery-recall-ibm.rules
    -rw-r--r-- 1 root root 774 Oct 3 13:17 95-upower-battery-recall-lenovo.rules
    -rw-r--r-- 1 root root 1.1K Oct 3 13:17 95-upower-battery-recall-toshiba.rules
    -rw-r--r-- 1 root root 1.6K Oct 3 13:17 95-upower-csr.rules
    -rw-r--r-- 1 root root 6.0K Oct 3 13:17 95-upower-hid.rules
    -rw-r--r-- 1 root root 354 Oct 3 13:17 95-upower-wup.rules
    -rw-r--r-- 1 root root 1.4K Aug 1 12:20 97-bluetooth-hid2hci.rules
    -rw-r--r-- 1 root root 28 Oct 7 2010 99-fuse.rules
    Can anyone confirm this?  If I get confirmation that this is indeed present for other users (and a bug, not a "feature"), I'll open a bug report for the udev package.
    Also, semi-related, in the post-install message from the udev package they refer you to the folder /etc/udev.d/rules, however, that directory structure doesn't exist on my system, and the old /etc/udev/rules.d is still present.
    I'd appreciate any information or input.  If any further information is required, I'll gladly supply it.
    Last edited by lswest (2011-10-26 09:54:58)

    Since the upgrade to 174, thunar doesn't mount anymore external hdd or usb. I removed my user from storage group.
    Searching for solutions I find out that I have the same errors in the logs that lswest has.
    /var/log/messages.log:
    Oct 29 10:29:46 localhost udevd[75]: starting version 174
    while /var/log/errors.log:
    Oct 29 11:42:14 localhost udevd[75]: can not find '/lib/udev/rules.d/42-qemu-usb.rules': No such file or directory
    Oct 29 11:42:14 localhost udevd[75]: can not find '/lib/udev/rules.d/50-firmware.rules': No such file or directory
    Oct 29 11:42:14 localhost udevd[75]: can not find '/lib/udev/rules.d/50-udev-default.rules': No such file or directory
    Oct 29 11:42:14 localhost udevd[75]: can not find '/lib/udev/rules.d/60-cdrom_id.rules': No such file or directory
    Oct 29 11:42:14 localhost udevd[75]: can not find '/lib/udev/rules.d/60-persistent-alsa.rules': No such file or directory
    Oct 29 11:42:14 localhost udevd[75]: can not find '/lib/udev/rules.d/60-persistent-input.rules': No such file or directory
    Oct 29 11:42:14 localhost udevd[75]: can not find '/lib/udev/rules.d/60-persistent-serial.rules': No such file or directory
    Oct 29 11:42:14 localhost udevd[75]: can not find '/lib/udev/rules.d/60-persistent-storage-tape.rules': No such file or directory
    Oct 29 11:42:14 localhost udevd[75]: can not find '/lib/udev/rules.d/60-persistent-storage.rules': No such file or directory
    Oct 29 11:42:14 localhost udevd[75]: can not find '/lib/udev/rules.d/60-persistent-v4l.rules': No such file or directory
    Oct 29 11:42:14 localhost udevd[75]: can not find '/lib/udev/rules.d/61-accelerometer.rules': No such file or directory
    Oct 29 11:42:14 localhost udevd[75]: can not find '/lib/udev/rules.d/70-udev-acl.rules': No such file or directory
    Oct 29 11:42:14 localhost udevd[75]: can not find '/lib/udev/rules.d/75-net-description.rules': No such file or directory
    Oct 29 11:42:14 localhost udevd[75]: can not find '/lib/udev/rules.d/75-probe_mtd.rules': No such file or directory
    Oct 29 11:42:14 localhost udevd[75]: can not find '/lib/udev/rules.d/75-tty-description.rules': No such file or directory
    Oct 29 11:42:14 localhost udevd[75]: can not find '/lib/udev/rules.d/78-sound-card.rules': No such file or directory
    Oct 29 11:42:14 localhost udevd[75]: can not find '/lib/udev/rules.d/80-drivers.rules': No such file or directory
    Oct 29 11:42:14 localhost udevd[75]: can not find '/lib/udev/rules.d/81-arch.rules': No such file or directory
    Oct 29 11:42:14 localhost udevd[75]: can not find '/lib/udev/rules.d/95-keyboard-force-release.rules': No such file or directory
    Oct 29 11:42:14 localhost udevd[75]: can not find '/lib/udev/rules.d/95-keymap.rules': No such file or directory
    Edit: a fresh installation of udev seems stopping error message flooding in errors.log, but I still can't automount drives and reboot/shutdown with dbus-send method.
    Last edited by oceans11 (2011-10-29 10:29:48)

  • [solved] /etc/udev/rules.d/10-network.rules ignored

    Hi.
    I have 4 nics (eth0, eth1, eth2, eth3) mapped to MAC addresses in  /etc/udev/rules.d/10-network.rules.
    Some months ago, I had to symlink /etc/udev/rules.d/80-net-name-slot.rules to /dev/null in order to use these static names.
    Now it doesn't work anymore (again and again and again) after a full update (kernel and I assume systemd).  The "nic-names" are completely wrong.  You call this "predictable". I call this "unpredictable". The only thing which is predictable is that after a kernel update, the network will stop working. It has been that way for months and months ... fortunately I don't update other machines anymore.
    Was this non sense really necessary?
    Anyway, if you could tell me what to do now to get my network rules applied again, I would really appreciate.
    Right now all ethX/MAC are wrong and none of them gets an IP (had to set an IP manually to post here).
    * I know what "predictable Network Interface Names" is about. I don't want this bullshit. It's much worse as it used to be. Keep it simple, folks!
    Last edited by Agnelo de la Crotche (2013-03-27 07:14:05)

    tomegun wrote:To narrow down the problem you are experiencing: What do you mean when you say that the names are "wrong"? Are they still eth0, eth1,... just in the wrong order, or are you actually seeing the "weird" new names given by udev?
    To answer this question more precisely.
    * with  /etc/udev/rules.d/80-net-name-slot.rules => /dev/nul and /etc/udev/rules.d/10-network.rules posted earlier  (in #4)
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT qlen 1000
    link/ether 00:0a:XX:XX:XX:XX brd ff:ff:ff:ff:ff:ff
    3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT qlen 1000
    link/ether 00:06:XX:XX:XX:XX brd ff:ff:ff:ff:ff:ff
    4: eth2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT qlen 1000
    link/ether 00:24:XX:XX:XX:XX brd ff:ff:ff:ff:ff:ff
    5: eth3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT qlen 1000
    link/ether 00:1b:XX:XX:XX:XX brd ff:ff:ff:ff:ff:ff
    6: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT
    link/ether 66:64:b3:6a:26:61 brd ff:ff:ff:ff:ff:ff
    The rules are ignored.
    * after deleting   /etc/udev/rules.d/80-net-name-slot.rules
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    2: enp6s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT qlen 1000
    link/ether 00:0a:XX:XX:XX:XX brd ff:ff:ff:ff:ff:ff
    3: enp6s1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT qlen 1000
    link/ether 00:06:XX:XX:XX:XX brd ff:ff:ff:ff:ff:ff
    4: enp2s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT qlen 1000
    link/ether 00:24:XX:XX:XX:XX brd ff:ff:ff:ff:ff:ff
    5: enp4s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT qlen 1000
    link/ether 00:1b:XX:XX:XX:XX brd ff:ff:ff:ff:ff:ff
    6: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT
    link/ether a2:ee:ec:d1:65:2d brd ff:ff:ff:ff:ff:ff
    The rules don't apply.
    * with  /etc/udev/rules.d/80-net-name-slot.rules => /dev/nul and after replacing eth0, eth1, eth2, eth3 with arbitrary names net0, net1, net2, net3 in  /etc/udev/rules.d/10-network.rules
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    2: net1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT qlen 1000
    link/ether 00:24:XX:XX:XX:XX brd ff:ff:ff:ff:ff:ff
    3: net3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT qlen 1000
    link/ether 00:0a:XX:XX:XX:XX brd ff:ff:ff:ff:ff:ff
    4: net2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT qlen 1000
    link/ether 00:06:XX:XX:XX:XX brd ff:ff:ff:ff:ff:ff
    5: net0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT qlen 1000
    link/ether 00:1b:XX:XX:XX:XX brd ff:ff:ff:ff:ff:ff
    6: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT
    link/ether ea:63:09:b7:1b:1b brd ff:ff:ff:ff:ff:ff
    But the rules were applied in this case!
    It solved the problem described originally.  I think I was hit by the race condition after upgrating to kernel 3.8.4-1. This was actually my first 3.8 kernel.
    With kernel 3.7, the rules were working even if the devices were named eth0, eth1, etc.
    Those names don't work anymore, at least in my case.
    Further I  created this file for static ips:
    # cat /etc/systemd/system/network.service
    [Unit]
    Description=Wired Static IP Connectivity
    Wants=network.target
    Before=network.target
    BindsTo=sys-subsystem-net-devices-net0.device
    After=sys-subsystem-net-devices-net0.device
    [Service]
    Type=oneshot
    RemainAfterExit=yes
    ExecStart=/sbin/ip link set dev net0 up
    ExecStart=/sbin/ip addr add 192.168.101.9/24 dev net0
    ExecStart=/sbin/ip link set dev net1 up
    ExecStart=/sbin/ip addr add 192.168.102.9/24 dev net1
    ExecStart=/sbin/ip link set dev net2 up
    ExecStart=/sbin/ip addr add 192.168.104.9/24 dev net2
    ExecStart=/sbin/ip link set dev net3 up
    ExecStart=/sbin/ip addr add 192.168.105.9/24 dev net3
    ExecStart=/sbin/ip route add default via 192.168.101.1
    ExecStop=/sbin/ip addr flush dev net0
    ExecStop=/sbin/ip link set dev net0 down
    ExecStop=/sbin/ip addr flush dev net1
    ExecStop=/sbin/ip link set dev net1 down
    ExecStop=/sbin/ip addr flush dev net2
    ExecStop=/sbin/ip link set dev net2 down
    ExecStop=/sbin/ip addr flush dev net3
    ExecStop=/sbin/ip link set dev net3 down
    [Install]
    WantedBy=multi-user.target
    I disabled netcfg and enabled network.service.
    Problem is solved now.

  • [SOLVED] udev rule launch graphical app

    How can I make a udev rule launch a graphical application, like, for instance, feh?
    I've tried creating a rule detects when a specific mass storage device is connected and executes a script (/root/.scripts/feh-camera.sh). The script exports DISPLAY and XAUTHORITY and everything seems to work.
    However when I restarted a black screen appeared right after Loading Modules (that appears after Starting udev events). Removing the udev rule solved the problem, so I must be doing something wrong.
    What's the right way of doing this?
    Thanks in advance.
    Last edited by Vieira (2010-05-06 22:38:49)

    Device was not connected at boot but I'll try what you suggested anyway. Thanks for your help.
    EDIT:
    It's solved. It turns out the underlying problem was that exporting DISPLAY breaks the udev environment. For future reference solved it with:
    45-foobar.rules
    ATTRS{product}=="DSLR-A330", ATTR{removable}=="1", ENV{REMOVE_CMD}="/bin/umount /media/camera", RUN+="/bin/mount <bla bla>", RUN+="/bin/su vieira -c '/etc/udev/rules.d/45-foobar.sh'"
    and the script, where the problem was, must not export anything, just set inline, i.e.
    #!/bin/sh
    HOME=/home/vieira DISPLAY=:0 /usr/bin/feh -r /mnt/camera
    Last edited by Vieira (2010-05-06 22:35:39)

  • [Solved] Auto-open a file manager after mounting with udev rules

    Hellooooo,
    I followed the udev Wiki for auto mounting USBs and it now works great.
    The only problem is: how can I automatically open a file manager of the mounted directory? I tried putting this at the end of the "ACTION=="add"," section in "/etc/udev/rules.d/11-media-by-label-auto-mount.rules" but for some reason nothing happens:
    , RUN+="/usr/bin/dolphin /media/%E{dir_name}"
    Even if I just try to open dolphin with the "ACTION=="add"," section nothing happens either way.
    So what am I doing wrong?
    Last edited by algorythm (2011-05-05 12:35:56)

    In that case, the best choice in my opinion is to use Automounting UDisks Wrappers :
    devmon is a script developed by IgnorantGuru. He left Arch Linux, but the package in AUR is still there and is the last version. For a future new release, it should be available at his blog site. The script is distro independent.
    My udisksvm script, in its default state, doesn't launch a file manager after automounting, but it is not a big thing to let the automounting be done and then manually open a file manager (a new entry in the traydevice right-click menu can also be added for that).
    If you can do without automounting, there is also the bashmount script from jnguyen.
    All these scripts don't require writing any udev rules, they use udisks instead.
    I hope you could find something you like and which will suit your wishes.

  • Writing udev rules [SOLVED]

    Hi guys.
    I'm on a mission to run win7 on QEMU, and I also want to be able to use my USB-ports. Now, archwiki tells me to do this:
    $ qemu-system-i386 -usbdevice host:vendor_id:product_id disk_image
    You can find vendor_id and product_id of your device with lsusb command.
    Note: If you encounter permission errors when running QEMU, see Udev#Writing udev rules for information on how to set permissions of the device.
    I then made a file called 10-adm.rules both in, /etc/udev/rules.d and /usr/lib/udev/rules.d
    In it I wrote:
    KERNEL=="sdc[0-9]*",  GROUP="storage"
    My user with wich i lauch QEMU is in the group storage, and my usb always turns out as sdc*.
    But it still gives me the permission erros.
    Last edited by kimbo (2014-11-28 14:06:24)

    now I renamed the files to 99 instead of 10, and I even overkilled it with the GROUP:= instead of GROUP=
    tried:
    udevadm control --reload-rules
    udevadm trigger
    But it still doesnt work
    lsusb gives me:
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 002 Device 004: ID 18a5:0302 Verbatim, Ltd Flash Drive
    Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 001 Device 002: ID 04f2:b23b Chicony Electronics Co., Ltd
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 004 Device 002: ID 04ca:3002 Lite-On Technology Corp.
    Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    And my qemu-launch-commad it:
    qemu-system-x86_64 -m 1G -enable-kvm -cpu host -usbdevice host:18a5:0302 win7
    oh, I dont really undestand what you by ' the group that /dev/sdc* ends up having'
    Last edited by kimbo (2014-11-13 23:04:47)

  • [SOLVED] udev rules: cannot run command

    I want to run a scipt everytime I plug in my external harddrive. I read the documentation and create a file called /etc/udev/rules.d/extern_hd.rules:
    SUBSYSTEMS=="usb", SYSFS{serial}=="33504D315647585A", SYMLINK+="ExternHD", RUN+="/root/scripts/test.sh"
    The symlink "ExternHD" gets created. The permissions of test.sh are rwxr-xr-x root root, but it never gets executed. What am I doing wrong?
    Last edited by Kei (2007-09-18 11:30:35)

    Solution was easy... Udev doesn't want to start anything from within /root, so I put a hardlink to /usr/local/bin/ and now everything works fine.

  • [SOLVED] automatic usb-backup with udev-rules + script

    I would like to have my usb-harddrive automatically start a backup as soon as it is plugged in.  And finally a bell is supposed to ring.
    I've created an udev-rule and a backup-script as shown below.
    However, instead of creating /dev/backup-drive first something strange is happening:
    The bell rings 3 times, followed by the backup, followed by a 4th ring.
    What's going on?
    Here's may udev-rule:
    ## /etc/udev/rules.d/95-backup.rules
    SUBSYSTEMS=="usb", ATTRS {serial}=="100", SYMLINK=="backup-drive", RUN+="/usr/local/bin/backup-thumb.sh"
    fstab:
    /dev/backup-drive    /media/backup   ext3     rw,user    0 0
    and my script:
    #!/bin/bash
    sleep 10
    rsync -vrtolgh --exclude '/.VirtualBox/' --delete /home/myhome /media/backup-drive
    aplay /usr/share/sounds/phone.wav
    Last edited by mehldutt (2007-07-03 20:28:27)

    The syntax of your udev rule is all wrong - for example after SYMLINK you should use "+=" or ":=". "==" is for comparing to some value.
    I think in rsync command line you want -H not -h (help) option. Also -v (verbose) is useless since you'll never see the output.
    Another thing which will prevent running rsync properly is /media/backup-drive while you use /media/backup in fstab.
    I suggest that you first try running rsync command from the command line "manually" and try if it works at all. After you'll make it work try the below suggestions.
    Another problem: what makes the backup drive mounted under /media/backup directory when you plug it into usb slot ? Are you doing it somehow "manually" in the 10 second period after plugging ? Do you use automounter of some kind ?
    If you intend to use ext3 as the backup drive filesystem you should also add sync command after rsync to make sure no data stays in RAM cache.
    I think you need to read udev manpage first.
    I can also advice you to read my udev rules for automounting usb devices (it's for any type of filesystem and any number of partitions):
    KERNEL=="sd[b-z]", NAME:="%k", SYMLINK+="usbhd-%k", GROUP:="users", OPTIONS="last_rule"
    ACTION=="add", KERNEL=="sd[b-z][0-9]", SYMLINK+="usbhd-%k", GROUP:="users", NAME:="%k"
    ACTION=="add", KERNEL=="sd[b-z][0-9]", RUN+="/bin/mkdir -p /media/usbhd-%k"
    ACTION=="add", KERNEL=="sd[b-z][0-9]", RUN+="/bin/ln -s /media/usbhd-%k /mnt/usbhd-%k"
    ACTION=="add", KERNEL=="sd[b-z][0-9]", PROGRAM=="/lib/udev/vol_id -t %N", RESULT=="vfat", RUN+="/bin/mount -t vfat -o rw,noauto,flush,dirsync,noexec,nodev,noatime,dmask=000,fmask=111 /dev/%k /media/
    usbhd-%k", OPTIONS="last_rule"
    ACTION=="add", KERNEL=="sd[b-z][0-9]", RUN+="/bin/mount -t auto -o rw,noauto,async,dirsync,noexec,nodev,noatime /dev/%k /media/usbhd-%k", OPTIONS="last_rule"
    ACTION=="remove", KERNEL=="sd[b-z][0-9]", RUN+="/bin/rm -f /mnt/usbhd-%k"
    ACTION=="remove", KERNEL=="sd[b-z][0-9]", RUN+="/bin/umount -l /media/usbhd-%k"
    ACTION=="remove", KERNEL=="sd[b-z][0-9]", RUN+="/bin/rmdir /media/usbhd-%k", OPTIONS="last_rule"
    I think it could be simplified and modified for your backup device like this:
    SUBSYSTEMS=="usb", ATTRS(idVendor)=="XXXX", ATTRS(idProduct)=="YYYY", KERNEL=="sd[a-z]", NAME:="%k", SYMLINK:="backupdevice", OPTIONS="last_rule"
    SUBSYSTEMS=="usb", ATTRS(idVendor)=="XXXX", ATTRS(idProduct)=="YYYY", ACTION=="add", KERNEL=="sd[a-z]1", SYMLINK:="backuppartition", GROUP:="users", NAME:="%k"
    SUBSYSTEMS=="usb", ATTRS(idVendor)=="XXXX", ATTRS(idProduct)=="YYYY", ACTION=="add", KERNEL=="sd[a-z]1", RUN+="/bin/mount -t auto -o rw,noauto,async,dirsync,noexec,nodev,noatime /dev/%k /media/backup-drive"
    SUBSYSTEMS=="usb", ATTRS(idVendor)=="XXXX", ATTRS(idProduct)=="YYYY", ACTION=="add", KERNEL=="sd[a-z]1", RUN+="/usr/local/bin/backup-thumb.sh", OPTIONS="last_rule"
    SUBSYSTEMS=="usb", ATTRS(idVendor)=="XXXX", ATTRS(idProduct)=="YYYY", ACTION=="remove", KERNEL=="sd[a-z]1", RUN+="/bin/umount -l /media/backup-drive", OPTIONS="last_rule"
    assuming that you have a single partition backup drive formatted as ext3 (or at least it's the first partition).
    Also another assumption is that idVendor and idProduct are unique to your backup drive. If not you should add some extra ATTRS parameters that will ensure this combination is unique.
    The directory /media/backup-drive must already exist (remove your fstab line - it's not needed in this case because mount command is run directly from the udev rule).
    Replace all XXXX and YYYY with the values from lsusb for your backup device - plug it in, run lsusb and copy values which look like XXXX:YYYY near to the name of your backup device.
    Anyway, you can play with different options and try to modify it yourself. The automounting rules work for me very well for some time (including flush option). The backup rules you need to test yourself :-)
    Last edited by lanrat (2007-05-05 17:20:51)

  • My /etc/udev/rules.d is empty? [SOLVED]

    The other week i installed a virtal inviroment in QEMU, i read a little bit about writing udev-rules, in order to work with USB. but for some reason.. the folder in mentioned in the topic happends to be empty.. and it just strikes me, because when gogling the problem it seems that the people it happend to before, it also ment that the system didnt work, or worked really bad, but my system works fine.. Now, as i allready mentioned, i bumped in to this problem the other week. i have been searching for some obvious noskillmistake, but.. i gave up and just turned to you guys instead.
    Last edited by kimbo (2014-11-13 18:02:04)

    That folder is empty for me too, because I haven't put anything there.  Have you created files there that disappeared?  If not, what's the issue?  You say everything is working ... so what's the question?

  • [Solved] udev rules: serial for persistent device naming disappeared

    Hello,
    since the latest upgrade of udev and kmod I cant't mount my external e-SATA hard disk with my working udev rules.
    This is my udev rule:
    $ cat /etc/udev/rules.d/66-persistent_esata.rules
    KERNEL=="sd?1", SUBSYSTEMS=="block", ENV{ID_SERIAL_SHORT}=="S1VSJ1LS301247", NAME="aluguard"
    When plugged in, I could decrypt and mount it with "sudo cryptsetup luksOpen /dev/aluguard aluguard && mount /mnt/aluguard".
    Since the update above I get "Device /dev/aluguard doesn't exist or access denied."
    While I re-checked https://wiki.archlinux.org/index.php/Ma … _with_udev, I discovered, that the serial entry in the output of udevadm has vanished:
    $ udevadm info -a -p $(udevadm info -q path -n /dev/sdg)
    Udevadm info starts with the device specified by the devpath and then
    walks up the chain of parent devices. It prints for every device
    found, all possible attributes in the udev rules key format.
    A rule to match, can be composed by the attributes of the device
    and the attributes from one single parent device.
    looking at device '/devices/pci0000:00/0000:00:09.0/host3/target3:0:0/3:0:0:0/block/sdg':
    KERNEL=="sdg"
    SUBSYSTEM=="block"
    DRIVER==""
    ATTR{range}=="16"
    ATTR{ext_range}=="256"
    ATTR{removable}=="0"
    ATTR{ro}=="0"
    ATTR{size}=="1953525168"
    ATTR{alignment_offset}=="0"
    ATTR{discard_alignment}=="0"
    ATTR{capability}=="50"
    ATTR{stat}==" 96 24 762 780 0 0 0 0 0 780 780"
    ATTR{inflight}==" 0 0"
    ATTR{events}==""
    ATTR{events_async}==""
    ATTR{events_poll_msecs}=="-1"
    looking at parent device '/devices/pci0000:00/0000:00:09.0/host3/target3:0:0/3:0:0:0':
    KERNELS=="3:0:0:0"
    SUBSYSTEMS=="scsi"
    DRIVERS=="sd"
    ATTRS{device_blocked}=="0"
    ATTRS{type}=="0"
    ATTRS{scsi_level}=="6"
    ATTRS{vendor}=="ATA "
    ATTRS{model}=="SAMSUNG HD103SI "
    ATTRS{rev}=="1AG0"
    ATTRS{state}=="running"
    ATTRS{timeout}=="30"
    ATTRS{iocounterbits}=="32"
    ATTRS{iorequest_cnt}=="0xa2"
    ATTRS{iodone_cnt}=="0x98"
    ATTRS{ioerr_cnt}=="0xc"
    ATTRS{evt_media_change}=="0"
    ATTRS{queue_depth}=="31"
    ATTRS{queue_ramp_up_period}=="120000"
    ATTRS{queue_type}=="simple"
    looking at parent device '/devices/pci0000:00/0000:00:09.0/host3/target3:0:0':
    KERNELS=="target3:0:0"
    SUBSYSTEMS=="scsi"
    DRIVERS==""
    looking at parent device '/devices/pci0000:00/0000:00:09.0/host3':
    KERNELS=="host3"
    SUBSYSTEMS=="scsi"
    DRIVERS==""
    looking at parent device '/devices/pci0000:00/0000:00:09.0':
    KERNELS=="0000:00:09.0"
    SUBSYSTEMS=="pci"
    DRIVERS=="ahci"
    ATTRS{vendor}=="0x10de"
    ATTRS{device}=="0x0554"
    ATTRS{subsystem_vendor}=="0x1849"
    ATTRS{subsystem_device}=="0x0554"
    ATTRS{class}=="0x010601"
    ATTRS{irq}=="23"
    ATTRS{local_cpus}=="00000000,00000003"
    ATTRS{local_cpulist}=="0-1"
    ATTRS{numa_node}=="0"
    ATTRS{dma_mask_bits}=="64"
    ATTRS{consistent_dma_mask_bits}=="64"
    ATTRS{enable}=="1"
    ATTRS{broken_parity_status}=="0"
    ATTRS{msi_bus}==""
    looking at parent device '/devices/pci0000:00':
    KERNELS=="pci0000:00"
    SUBSYSTEMS==""
    DRIVERS==""
    What is the reason for this strange behaviour, and how can I get back the serial entry?
    Thank in advance!
    Last edited by indianahorst (2012-01-31 13:03:20)

    $ udevadm info -q all -n /dev/sdg1
    P: /devices/pci0000:00/0000:00:09.0/host3/target3:0:0/3:0:0:0/block/sdg/sdg1
    N: sdg1
    S: disk/by-id/ata-SAMSUNG_HD103SI_S1VSJ1LS301247-part1
    S: disk/by-id/scsi-SATA_SAMSUNG_HD103SIS1VSJ1LS301247-part1
    S: disk/by-id/wwn-0x50024e900136a03e-part1
    S: disk/by-path/pci-0000:00:09.0-scsi-3:0:0:0-part1
    S: disk/by-uuid/bb024e1b-78a5-4ed0-9e80-aaa7633aa493
    E: DEVLINKS=/dev/disk/by-id/ata-SAMSUNG_HD103SI_S1VSJ1LS301247-part1 /dev/disk/by-id/scsi-SATA_SAMSUNG_HD103SIS1VSJ1LS301247-part1 /dev/disk/by-id/wwn-0x50024e900136a03e-part1 /dev/disk/by-path/pci-0000:00:09.0-scsi-3:0:0:0-part1 /dev/disk/by-uuid/bb024e1b-78a5-4ed0-9e80-aaa7633aa493
    E: DEVNAME=/dev/sdg1
    E: DEVPATH=/devices/pci0000:00/0000:00:09.0/host3/target3:0:0/3:0:0:0/block/sdg/sdg1
    E: DEVTYPE=partition
    E: ID_ATA=1
    E: ID_ATA_DOWNLOAD_MICROCODE=1
    E: ID_ATA_FEATURE_SET_AAM=1
    E: ID_ATA_FEATURE_SET_AAM_CURRENT_VALUE=254
    E: ID_ATA_FEATURE_SET_AAM_ENABLED=1
    E: ID_ATA_FEATURE_SET_AAM_VENDOR_RECOMMENDED_VALUE=254
    E: ID_ATA_FEATURE_SET_APM=1
    E: ID_ATA_FEATURE_SET_APM_ENABLED=0
    E: ID_ATA_FEATURE_SET_HPA=1
    E: ID_ATA_FEATURE_SET_HPA_ENABLED=1
    E: ID_ATA_FEATURE_SET_PM=1
    E: ID_ATA_FEATURE_SET_PM_ENABLED=1
    E: ID_ATA_FEATURE_SET_PUIS=1
    E: ID_ATA_FEATURE_SET_PUIS_ENABLED=0
    E: ID_ATA_FEATURE_SET_SECURITY=1
    E: ID_ATA_FEATURE_SET_SECURITY_ENABLED=0
    E: ID_ATA_FEATURE_SET_SECURITY_ENHANCED_ERASE_UNIT_MIN=194
    E: ID_ATA_FEATURE_SET_SECURITY_ERASE_UNIT_MIN=194
    E: ID_ATA_FEATURE_SET_SMART=1
    E: ID_ATA_FEATURE_SET_SMART_ENABLED=1
    E: ID_ATA_SATA=1
    E: ID_ATA_SATA_SIGNAL_RATE_GEN1=1
    E: ID_ATA_SATA_SIGNAL_RATE_GEN2=1
    E: ID_ATA_WRITE_CACHE=1
    E: ID_ATA_WRITE_CACHE_ENABLED=1
    E: ID_BUS=ata
    E: ID_FS_TYPE=crypto_LUKS
    E: ID_FS_USAGE=crypto
    E: ID_FS_UUID=bb024e1b-78a5-4ed0-9e80-aaa7633aa493
    E: ID_FS_UUID_ENC=bb024e1b-78a5-4ed0-9e80-aaa7633aa493
    E: ID_FS_VERSION=1
    E: ID_MODEL=SAMSUNG_HD103SI
    E: ID_MODEL_ENC=SAMSUNG\x20HD103SI\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
    E: ID_PART_ENTRY_TYPE=0x83
    E: ID_PART_TABLE_TYPE=dos
    E: ID_PATH=pci-0000:00:09.0-scsi-3:0:0:0
    E: ID_PATH_TAG=pci-0000_00_09_0-scsi-3_0_0_0
    E: ID_REVISION=1AG01131
    E: ID_SCSI_COMPAT=SATA_SAMSUNG_HD103SIS1VSJ1LS301247
    E: ID_SERIAL=SAMSUNG_HD103SI_S1VSJ1LS301247
    E: ID_SERIAL_SHORT=S1VSJ1LS301247
    E: ID_TYPE=disk
    E: ID_WWN=0x50024e900136a03e
    E: ID_WWN_WITH_EXTENSION=0x50024e900136a03e
    E: MAJOR=8
    E: MINOR=97
    E: PART_ENTRY_DISK=8:96
    E: PART_ENTRY_NUMBER=1
    E: PART_ENTRY_OFFSET=63
    E: PART_ENTRY_SCHEME=dos
    E: PART_ENTRY_SIZE=1953520002
    E: SUBSYSTEM=block
    E: UDEV_LOG=3
    E: UDISKS_PARTITION=1
    E: UDISKS_PARTITION_ALIGNMENT_OFFSET=0
    E: UDISKS_PARTITION_NUMBER=1
    E: UDISKS_PARTITION_OFFSET=32256
    E: UDISKS_PARTITION_SCHEME=mbr
    E: UDISKS_PARTITION_SIZE=1000202241024
    E: UDISKS_PARTITION_SLAVE=/sys/devices/pci0000:00/0000:00:09.0/host3/target3:0:0/3:0:0:0/block/sdg
    E: UDISKS_PARTITION_TYPE=0x83
    E: UDISKS_PRESENTATION_NOPOLICY=0
    E: USEC_INITIALIZED=6897248001
    OK, there is the serial.... but the problem persists - udev doesn't execute the rule and doesn't create /dev/aluguard.

Maybe you are looking for

  • Using of JLoox components in Swing/AWT Paint

    I am facing problem in using JLoox components in Swing/AWT Paint method.I am able to use the JLoox components in Constructor of Swing JFrame and facing problem while using the JLoox components in Paint method.If anybody used JLoox please suggest the

  • Grouping of check bok

    Hi all, We know that a set of Radio buttons can be grouped together. // Configure the radio buttons as a group by 1) assigning them all the // same name and 2) assigning values to each radio button. OAMessageRadioButtonBean appleButton = (OAMessageRa

  • How to change state of a constraint from DEFERABLE to IMMEDIATE?

    Hi, I am runnig 10gR2 and would like to change state of a constraint from DEFERABLE to IMMEDIATE without recreating it. The change is working at the session level with SET CONSTRAINT <constraint name> IMMEDIATE; But this is not visible for other user

  • How to import a flv-file (downloaded form YouTube) into iMovie?

    How to import a flv-file (downloaded form YouTube) into iMovie? It needs to be converted to which format? Suggestions how to do that? Thanks. Mattie The Netherlands

  • Printing all sprites in an LDM, including those outside the crop?

    Thanks for all the help so far. I'm not sure where to begin on this one- I've got a cropped LDM sprite which I'm essentially treating as a document object. The user can drag various items into the LDM, arrange those items, then hopefully print. The "