LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-26-2006, 06:57 PM   #1
Toods
Member
 
Registered: Dec 2005
Location: UK
Distribution: Slackware 12.1
Posts: 249

Rep: Reputation: 32
Checking UDEV


I have done quite a bit of reading in the forums about UDEV and would like to try to make best use of this.

First of all, could someone please tell me how I can simply test if UDEV is actually functioning on my Slackware?.

I have built the 2.6.16 kernel with the required components but just need a test to see if it is working.

Many thanks.
 
Old 04-26-2006, 07:56 PM   #2
patfins
LQ Newbie
 
Registered: Mar 2004
Posts: 21

Rep: Reputation: 15
Watch /dev/sd* devices and connect an usb-stick or something like that. Is there a new /dev/sdX (dev/sdX1) device afterwards?
 
Old 04-26-2006, 09:03 PM   #3
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,440
Blog Entries: 7

Rep: Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551
It is also extremely important that you include "sysfs" support in your kernel build and that you create a directory at the top of your tree called "/sys".

You can tell that udev is working by the existence of /dev/.udev.tdb

If this file isn't there, then udev isn't running.
 
Old 04-26-2006, 09:19 PM   #4
MMYoung
Member
 
Registered: Apr 2004
Location: Arkansas
Distribution: Ubuntu 8.10
Posts: 365

Rep: Reputation: 30
Also, make sure the /etc/rc.d/rc.udev is executable. I think the default if for it not to be since Slackware comes with a 2.4 kernel and udev doesn't work with a 2.4 kernel.

Later,
MMYoung
 
Old 04-27-2006, 03:54 AM   #5
Toods
Member
 
Registered: Dec 2005
Location: UK
Distribution: Slackware 12.1
Posts: 249

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by patfins
Watch /dev/sd* devices and connect an usb-stick or something like that. Is there a new /dev/sdX (dev/sdX1) device afterwards?
When I plug in my digital camera I get the following 2 entries created: /dev/sda and /dev/sda1.
Is this indicative of correct 'udev' functioning?

Quote:
Originally Posted by rkelsen
It is also extremely important that you include "sysfs" support in your kernel build and that you create a directory at the top of your tree called "/sys".

You can tell that udev is working by the existence of /dev/.udev.tdb
A '/sys' directory exists and also '/dev/.udev.tdb' exists.

Quote:
Originally Posted by MMYoung
Also, make sure the /etc/rc.d/rc.udev is executable.
'rc.dev' is NOT executable. But as my 'udevd' process is running, is this not because of the presence of '/etc/hotplug.d/default/10-udev.hotplug'. I understood that this is a symlink to '/sbin/udevsend' which starts 'udevd' if it is not already running.

So in summary, I guess my udev is running but I now ask the question: Is it's start-up configured correctly or should I take note of the recent references in the 'Changelog' for 'Slackware-Current'?. Also, do I need to disable the 'normal' Hotplug to get a more 'pure' udev function?.

Thank you.
 
Old 04-27-2006, 04:00 AM   #6
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,440
Blog Entries: 7

Rep: Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551
Quote:
Originally Posted by Toods
So in summary, I guess my udev is running but I now ask the question: Is it's start-up configured correctly or should I take note of the recent references in the 'Changelog' for 'Slackware-Current'?.
Are you running slackware-current? If so, I wouldn't expect it to be completely bug free just yet. Pat has only just put that new stuff in, so there could still be problems with it.

If you're not running slackware-current, then you should ignore that changelog because it doesn't apply to anything else.
 
Old 04-27-2006, 04:04 AM   #7
Toods
Member
 
Registered: Dec 2005
Location: UK
Distribution: Slackware 12.1
Posts: 249

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by rkelsen
Are you running slackware-current? If so, I wouldn't expect it to be completely bug free just yet. Pat has only just put that new stuff in, so there could still be problems with it.

If you're not running slackware-current, then you should ignore that changelog because it doesn't apply to anything else.
No, I am not running 'Current' but I noted in the changelog some specific references about UDEV and HOTPLUG and how the start up of these is to be improved. Presumable such 'script' changes can easily be applied manually to Slackware 10.2 if really neccessary?.
 
Old 04-27-2006, 04:15 AM   #8
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,440
Blog Entries: 7

Rep: Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551
Quote:
Originally Posted by Toods
No, I am not running 'Current' but I noted in the changelog some specific references about UDEV and HOTPLUG and how the start up of these is to be improved. Presumable such 'script' changes can easily be applied manually to Slackware 10.2 if really neccessary?.
They probably could be, but the stock Slackware 10.2 setup works fine for me here. It sounds like you have everything working properly too. You might want to look into setting up 'autofs' if you're interested in auto mounting.

If you don't mind getting your hands dirty it might pay to grab the udev & hotplug packages from -current and have a play...
 
Old 04-27-2006, 11:03 AM   #9
Toods
Member
 
Registered: Dec 2005
Location: UK
Distribution: Slackware 12.1
Posts: 249

Original Poster
Rep: Reputation: 32
Update

I decided to go ahead and install the new 'hotplug' and 'udev-0.71' updates mentioned recently in the 'changelog' of Slackware-Current.

The only thing that I had to do that was not done with the standard Slackware 10.2 configuration, was to make 'rc.udev' executable. This wasn't needed before presumably because of the 'symlink' to '/sbin/udevsend' in the 'etc/hotplug.d/default' directory.

Now the /dev directory doesn't have the many unnecessary devices that I had previously.
 
Old 04-27-2006, 05:50 PM   #10
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,440
Blog Entries: 7

Rep: Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551
Quote:
Originally Posted by Toods
I decided to go ahead and install the new 'hotplug' and 'udev-0.71' updates mentioned recently in the 'changelog' of Slackware-Current.
Does it boot faster?
 
Old 04-28-2006, 01:03 AM   #11
Toods
Member
 
Registered: Dec 2005
Location: UK
Distribution: Slackware 12.1
Posts: 249

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by rkelsen
Does it boot faster?
I can't really tell, because it is fairly quick booting to the 'prompt' anyway. I will time it and compare with my identical PC which still has the 'stock' Slackware 10.2 hotplug and udev.

Just like previous, there is a short pause of a second or two in the boot sequence when it gets to the part about detecting hardware with the command to start 'rc.hotplug'. Presumably, 'hotplug' is still being used along with 'udev'in this configuration. I guess to make it run with a pure 'udev' I would have to make rc.hotplug non-executable and probably also use some of Piter Punk's modified packages. Am I correct?.
 
Old 04-28-2006, 06:23 AM   #12
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,440
Blog Entries: 7

Rep: Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551
Quote:
Originally Posted by Toods
Presumably, 'hotplug' is still being used along with 'udev'in this configuration. I guess to make it run with a pure 'udev' I would have to make rc.hotplug non-executable and probably also use some of Piter Punk's modified packages. Am I correct?.
I was under the impression that the new scripts skipped hotplug altogether unless you're running 2.4... Might be wrong about that though.
 
Old 04-28-2006, 07:00 AM   #13
Toods
Member
 
Registered: Dec 2005
Location: UK
Distribution: Slackware 12.1
Posts: 249

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by rkelsen
I was under the impression that the new scripts skipped hotplug altogether unless you're running 2.4... Might be wrong about that though.
I would really like to know this myself.

I am not familiar enough with coding to understand what the commands are actually achieving in the various script files.

Looking at the new 'rc.hotplug' script, it 'suggests' to me that for kernels new than 2.4, udev will be initialized (see clip below), but I am not clear if the old 'hotplug' is also started in the remainder of the script.

Code:
# For kernels newer than 2.4, tell the kernel to use for /sbin/udevsend for
        # hotplug events, and then run udevstart one more time.
        if [ -x /etc/rc.d/rc.udev -a -x /sbin/udevsend -a ! "$(uname -r | cut -f 1,2 -d .)" = "2.4" ]; then
          echo "/sbin/udevsend" > /proc/sys/kernel/hotplug
          if [ -x /sbin/udevstart ]; then
            /sbin/udevstart
          fi
        fi
The 'rc.s' script still remains the same as previous and my simple understanding of that script is that 'hotplug' will be started if 'rc.hotplug' is executable.

These are my questions at the moment:
1.) How can I determine if the 'old' hotplug is running?
2.) Should I be making rc.hotplug 'NON-executable to make udev work alone?

It would be good if someone with understanding of the scripts could look at the new 'rc.hotplug' in Slackware current and tell me what it achieves in terms of starting hotplug and udev.

Thank you.
 
Old 04-28-2006, 07:13 PM   #14
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,440
Blog Entries: 7

Rep: Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551
Quote:
Originally Posted by Toods
It would be good if someone with understanding of the scripts could look at the new 'rc.hotplug' in Slackware current and tell me what it achieves in terms of starting hotplug and udev.
This is the meat of the script:
Code:
for RC in /etc/hotplug/*.rc
	do
	    $RC $1
	done
        # For kernels newer than 2.4, tell the kernel to use for /sbin/udevsend for
        # hotplug events, and then run udevstart one more time.
        if [ -x /etc/rc.d/rc.udev -a -x /sbin/udevsend -a ! "$(uname -r | cut -f 1,2 -d .)" = "2.4" ]; then
          echo "/sbin/udevsend" > /proc/sys/kernel/hotplug
          if [ -x /sbin/udevstart ]; then
            /sbin/udevstart
          fi
        fi
	touch /var/lock/subsys/hotplug
This part of the script tells hotplug to start. The first 4 lines makes it look to me that hotplug is still being run on bootup, then the 2.4 test is done and "udevstart" is passed to /proc/sys/kernel/hotplug. Some things I would try:

1. chmod -x /etc/hotplug/*.rc
2. chmod -x /etc/rc.d/rc.hotplug

I'd only do the second one if the first one caused borkage.

Have fun.
 
  


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
just upgraded udev for >2.6.12 darksmiley Linux - General 0 11-28-2005 10:18 AM
Udev LinxNew Mandriva 1 05-01-2005 02:47 PM
Udev anyone? yanik Debian 5 01-05-2005 09:02 AM
Help with udev sls Debian 4 12-28-2004 02:06 PM
udev ... I think element Debian 4 05-27-2004 03:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:56 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
Open Source Consulting | Domain Registration