LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Suse/Novell
User Name
Password
Suse/Novell This Forum is for the discussion of Suse Linux.

Notices


Reply
 
Search this Thread
Old 03-05-2011, 01:47 PM   #1
tkmbe
Member
 
Registered: Jun 2005
Location: Obera, Argentina
Distribution: OpenSuse 10.3, Debian 4.0, Debian 3.1
Posts: 36

Rep: Reputation: 15
udev rule to rename /dev/sdx as /dev/sdr does not work :-( on OS 11.2


Hello

I'm trying to get my usb cardreader to apear as /dev/sdr instead of /dev/sdc on Opensuse 11.2
What I read about udev a rule like
Code:
UBSYSTEM=="usb", ATTRS{idVendor}=="11b0", ATTRS{idProduct}=="6108", NAME="sdr", SYMLINK="cfreader",GROUP="storage"
should work or not?
My device still appears as /dev/sdc and /dev/sdr and symlink /dev/cfreader are created BUT /dev/sdr has not same mayor/minor number as /dev/sdc and of course is not accessible.

What is wrong?

Any hints from the udev gurus?
 
Old 03-06-2011, 07:17 PM   #2
aus9
Guru
 
Registered: Oct 2003
Posts: 5,060

Rep: Reputation: Disabled
hi

since no-one else has replied as yet.....your rule makes no mention of what to do with sdc ok?

I gather you have a sda and sdb?

why not create an udev rule so accept sdc but the udev rule creates a symlink from it to /dev/cfreader and no need to mention /dev/sdr

something like this assuming your ids are correct


------------------------copy between dashes-----
ACTION!="add", GOTO="cfreader_End"

SUBSYSTEMS=="usb", ACTION==”add”, ATTRS{idProduct}=="6108", GOTO="cfreader"

LABEL="cfreader"
RUN+="/bin/ln -s /dev/sdc /dev/cfreader"

LABEL="cfreader_End"

--------------------------------------

using root powers run
Code:
udevadm control --reload-rules
which is safer than rebooting as you want to see if there is any error

Last edited by aus9; 03-06-2011 at 07:19 PM. Reason: codebox
 
Old 05-10-2012, 01:53 AM   #3
jimbeam
LQ Newbie
 
Registered: Jan 2009
Posts: 4

Rep: Reputation: 0
In case anybody wonders onto this thread, I think the OP was almost correct.
However, I think you need to add a + before the = in the SYMLINK command, and I don't think specifying the name is necessary as the device name sdr can change depending on what udev/the kernel want. You already identify the vendor and product.

So you get something like this:
Code:
SUBSYSTEM=="usb", ATTRS{idVendor}=="11b0", ATTRS{idProduct}=="6108", SYMLINK+="cfreader",GROUP="storage"
See e.g. http://manpages.ubuntu.com/manpages/...n7/udev.7.html
 
  


Reply


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
/dev/sdx question Fill Linux - Newbie 3 10-05-2007 06:31 AM
Is there something similar to a udev rule in solaris express dev. ed. crisostomo_enrico Solaris / OpenSolaris 2 08-17-2007 07:18 AM
what udev rule to create /dev/inet/tcp? bbeers Slackware 2 02-21-2007 04:55 PM
/dev/cdrom1,/dev/cdrw1 symlinks made at each boot by udev which i dont want deepclutch Linux - Software 2 01-04-2007 07:39 AM
why has udev swapped /dev/hdc and /dev/hdd ? chaosbear Linux - Hardware 2 08-09-2006 03:23 AM


All times are GMT -5. The time now is 02:57 PM.

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