Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 05-05-2015, 08:23 AM   #1
LQ Newbie
Registered: May 2015
Posts: 2

Rep: Reputation: Disabled
Udev doesn't create symlink


I would like to make a symlink and run a bash-script if a user attaches a new pendrive in a specific port.

Here is my udev rule file:

ACTION=="add", SUBSYSTEM=="usb", KERNEL=="1-1.4:1.0", DRIVER=="usb-storage", SYMLINK+="/dev/ext0"
ACTION=="add", SUBSYSTEM=="usb", KERNEL=="1-1.4:1.0", DRIVER=="usb-storage", RUN+="/mybin/usbhandler/"

My shell-script runs without any problem, but the symlink doesn't created. Have you any idea, what is my mistake?
(I tried them to put in one line, but it didn't work either.)

Thank you for your help. Have a nice day!

Ps.: I am using the newest Raspbian.
Old 05-05-2015, 09:40 AM   #2
Registered: Nov 2010
Location: Germany
Distribution: Gentoo
Posts: 286

Rep: Reputation: 91
Just from a quick look at an existing rules file: You have to leave out the "/dev/" from the path:

Also: What udev version, and is there anything in any log file after the script has run?
Old 05-06-2015, 02:16 AM   #3
LQ Newbie
Registered: May 2015
Posts: 2

Original Poster
Rep: Reputation: Disabled
Hy Cepheus11,
I removed the "/dev/" part, but it's still wrong.
The output of "udevadm --version" command is 175.

I run the "udevadm --debug monitor" command and reconnect my pendrive. My output is:

KERNEL[619.401786] add      /devices/platform/bcm2708_usb/usb1/1-1/1-1.4 (usb)
KERNEL[619.402976] add      /devices/platform/bcm2708_usb/usb1/1-1/1-1.4/1-1.4:1.0 (usb)
KERNEL[619.404078] add      /devices/platform/bcm2708_usb/usb1/1-1/1-1.4/1-1.4:1.0/host4 (scsi)
KERNEL[619.404561] add      /devices/platform/bcm2708_usb/usb1/1-1/1-1.4/1-1.4:1.0/host4/scsi_host/host4 (scsi_host)
UDEV  [619.406400] add      /devices/platform/bcm2708_usb/usb1/1-1/1-1.4 (usb)
UDEV  [619.433349] add      /devices/platform/bcm2708_usb/usb1/1-1/1-1.4/1-1.4:1.0 (usb)
UDEV  [619.435217] add      /devices/platform/bcm2708_usb/usb1/1-1/1-1.4/1-1.4:1.0/host4 (scsi)
UDEV  [619.437323] add      /devices/platform/bcm2708_usb/usb1/1-1/1-1.4/1-1.4:1.0/host4/scsi_host/host4 (scsi_host)
KERNEL[620.402447] add      /devices/platform/bcm2708_usb/usb1/1-1/1-1.4/1-1.4:1.0/host4/target4:0:0 (scsi)
KERNEL[620.402730] add      /devices/platform/bcm2708_usb/usb1/1-1/1-1.4/1-1.4:1.0/host4/target4:0:0/4:0:0:0 (scsi)
KERNEL[620.403044] add      /devices/platform/bcm2708_usb/usb1/1-1/1-1.4/1-1.4:1.0/host4/target4:0:0/4:0:0:0/scsi_disk/4:0:0:0 (scsi_disk)
KERNEL[620.403225] add      /devices/platform/bcm2708_usb/usb1/1-1/1-1.4/1-1.4:1.0/host4/target4:0:0/4:0:0:0/scsi_device/4:0:0:0 (scsi_device)
KERNEL[620.403950] add      /devices/platform/bcm2708_usb/usb1/1-1/1-1.4/1-1.4:1.0/host4/target4:0:0/4:0:0:0/scsi_generic/sg4 (scsi_generic)
KERNEL[620.404317] add      /devices/platform/bcm2708_usb/usb1/1-1/1-1.4/1-1.4:1.0/host4/target4:0:0/4:0:0:0/bsg/4:0:0:0 (bsg)
UDEV  [620.404756] add      /devices/platform/bcm2708_usb/usb1/1-1/1-1.4/1-1.4:1.0/host4/target4:0:0 (scsi)
KERNEL[620.410445] add      /devices/virtual/bdi/8:64 (bdi)
UDEV  [620.413313] add      /devices/virtual/bdi/8:64 (bdi)
UDEV  [620.417502] add      /devices/platform/bcm2708_usb/usb1/1-1/1-1.4/1-1.4:1.0/host4/target4:0:0/4:0:0:0 (scsi)
UDEV  [620.421668] add      /devices/platform/bcm2708_usb/usb1/1-1/1-1.4/1-1.4:1.0/host4/target4:0:0/4:0:0:0/scsi_device/4:0:0:0 (scsi_device)
UDEV  [620.422272] add      /devices/platform/bcm2708_usb/usb1/1-1/1-1.4/1-1.4:1.0/host4/target4:0:0/4:0:0:0/scsi_disk/4:0:0:0 (scsi_disk)
KERNEL[620.424314] add      /devices/platform/bcm2708_usb/usb1/1-1/1-1.4/1-1.4:1.0/host4/target4:0:0/4:0:0:0/block/sde (block)
KERNEL[620.424528] add      /devices/platform/bcm2708_usb/usb1/1-1/1-1.4/1-1.4:1.0/host4/target4:0:0/4:0:0:0/block/sde/sde1 (block)
UDEV  [620.425969] add      /devices/platform/bcm2708_usb/usb1/1-1/1-1.4/1-1.4:1.0/host4/target4:0:0/4:0:0:0/bsg/4:0:0:0 (bsg)
UDEV  [620.427314] add      /devices/platform/bcm2708_usb/usb1/1-1/1-1.4/1-1.4:1.0/host4/target4:0:0/4:0:0:0/scsi_generic/sg4 (scsi_generic)
UDEV  [620.517249] add      /devices/platform/bcm2708_usb/usb1/1-1/1-1.4/1-1.4:1.0/host4/target4:0:0/4:0:0:0/block/sde (block)
UDEV  [620.589815] add      /devices/platform/bcm2708_usb/usb1/1-1/1-1.4/1-1.4:1.0/host4/target4:0:0/4:0:0:0/block/sde/sde1 (block)
I can't see any debug or warning message, I also checked the syslog, but nothing.

Have a nice day!


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
udev: symlink for my meizu m6 eantoranz Linux - Hardware 16 01-03-2008 02:15 PM
Making udev create a /dev/floppy symlink Yalla-One Slackware 7 07-06-2007 08:37 AM
udev doesn't create scd* device nodes for scsi cdrom kejava Slackware 3 09-15-2005 02:04 PM
udev takes long time to create /dev/usbhd symlink Yalla-One Slackware 4 04-04-2005 03:27 AM
udev doesn't create /dev/pktcdvd/0 logout_login Linux - Software 1 04-03-2005 11:29 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:54 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration