LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-25-2009, 08:05 PM   #1
Robert S
Member
 
Registered: Oct 2006
Location: Canberra
Distribution: gentoo, debian
Posts: 63

Rep: Reputation: 15
How do I set up/debug new udev rules without rebooting?


I recently added a Huawei E220 on to my Linux box. That broke my backup because it used /dev/cdrom -> /dev/hdc, which got changed to /dev/sr0 I've altered /etc/udev/rules.d/70-persistent-cd.rules thus:
Code:
# Mass_Storage ()
SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{ID_SERIAL}=="HUAWEI_Mass_Storage-0:0", SYMLINK+="huawei", ENV{GENERATED}="1"
I've had to reboot after making these changes. In the past I've been able to run 'udevstart', but this no longer exists on my system. How can I recreate/debug my udev without rebooting? udev seems to be a bit of a moving target.

I use udev-146-r1 on Gentoo.
 
Old 12-25-2009, 08:24 PM   #2
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
Yes, udev is a moving target for sure; however you should still have a udev tool on the system, or a related script, which will do one or more of several things, including stopping, starting/restarting udevd, as well as things like reloading rules and/or force-reloading the rules and repopulating /dev.

I'm not familiar with Gentoo, but on my Slackware system, I use an rc script called rc.udev. I don't believe you have such a script, so look for a binary called "udevadm" which IIRC does similar things. There may also be a binary called "udevmonitor" or "udev-monitor" which is intended to give you console output of udev events while you are debugging.

What I would do, is use `find` or `locate` to locate any/all udev* binaries and scripts on your machine, probably in /bin or /sbin or /usr/sbin or /usr/bin or /lib/udev or wherever, and then check out the man page for each tool (they do actually have man pages for the binary tools) and go from there.

Best regards,
Sasha
 
Old 12-25-2009, 11:51 PM   #3
Robert S
Member
 
Registered: Oct 2006
Location: Canberra
Distribution: gentoo, debian
Posts: 63

Original Poster
Rep: Reputation: 15
Thanks. After a while I discovered:
Code:
# udevadm control --reload-rules
# udevadm trigger
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to edit "/etc/udev/rules.d/40-basic-permissions.rules" file cygan Linux - Newbie 11 03-09-2009 05:22 AM
cat: /etc/udev/rules.d/70-persistent-net.rules: No such file or directory rcg1984 Linux From Scratch 2 09-17-2008 07:02 AM
slackware-current, udev 0.96, and custom udev rules not working rignes Slackware 6 08-10-2006 03:43 AM
need help fixing my udev rules or ivman rules hedpe Linux - Hardware 2 03-18-2006 10:07 AM
iptables rules lost upon rebooting tigerflag Slackware 4 10-13-2003 12:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:05 AM.

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
Open Source Consulting | Domain Registration