LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 12-09-2009, 06:18 PM   #1
niknak
LQ Newbie
 
Registered: Apr 2009
Posts: 7

Rep: Reputation: 0
Help writing a Udev rule


Hi all

i need some help with writing a udev rule.

Overview:

I run a ubuntu box headless. On it, I run some scripts detecting various media types inserted and then I import or export content.

I have a card reader wired to onboard USB. Normally on boot this shows up as /dev/sdb and then when a card is inserted it lists /dev/sdb1 etc.

I also insert a usb drive which shows up as /dev/sdc1 etc.

All of my scripts are fixed to those /dev points

problem: If i have a USB HDD plugged in and i reboot, the usb hdd gets pulled in first and lands at /dev/sdb then the card reader at /dev/sdc - i.e. the reverse of how all of my scripts expect them to be.

So, I need some help in writing a udev rule that would ensure that they both always get the same /dev point.

I can pull all of the ids etc no problem with sysinfo etc, just need a clear pointer as to what my udev rule should look like. I have spent some time with the man pages, just having trouble with specifics.

thanks in advance
 
Old 12-09-2009, 08:22 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,785

Rep: Reputation: 311Reputation: 311Reputation: 311Reputation: 311
How about a HOWTO called "Writing UDEV Rules": http://www.reactivated.net/writing_udev_rules.html

PS: www.google.com/linux is a great help in the search for instructions, howtos, etc.
 
  


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
First UDEV Rule, Not quite there ... orbit Slackware 7 02-22-2009 10:08 PM
udev rule: need help DPenguin Linux - Hardware 0 08-04-2008 07:29 PM
Udev Rule Help Please Toods Slackware 1 11-23-2007 08:55 AM
need help with udev rule hussam Linux - Software 2 12-05-2006 03:30 AM
udev rule for usbstick Steve50 Slackware 5 10-13-2006 05:53 AM


All times are GMT -5. The time now is 02:23 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration