Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
04-26-2006, 06:57 PM
|
#1
|
Member
Registered: Dec 2005
Location: UK
Distribution: Slackware 12.1
Posts: 249
Rep:
|
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.
|
|
|
04-26-2006, 07:56 PM
|
#2
|
LQ Newbie
Registered: Mar 2004
Posts: 21
Rep:
|
Watch /dev/sd* devices and connect an usb-stick or something like that. Is there a new /dev/sdX (dev/sdX1) device afterwards?
|
|
|
04-26-2006, 09:03 PM
|
#3
|
Senior Member
Registered: Sep 2004
Distribution: slackware
Posts: 4,756
|
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.
|
|
|
04-26-2006, 09:19 PM
|
#4
|
Member
Registered: Apr 2004
Location: Arkansas
Distribution: Ubuntu 8.10
Posts: 365
Rep:
|
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
|
|
|
04-27-2006, 03:54 AM
|
#5
|
Member
Registered: Dec 2005
Location: UK
Distribution: Slackware 12.1
Posts: 249
Original Poster
Rep:
|
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.
|
|
|
04-27-2006, 04:00 AM
|
#6
|
Senior Member
Registered: Sep 2004
Distribution: slackware
Posts: 4,756
|
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.
|
|
|
04-27-2006, 04:04 AM
|
#7
|
Member
Registered: Dec 2005
Location: UK
Distribution: Slackware 12.1
Posts: 249
Original Poster
Rep:
|
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?.
|
|
|
04-27-2006, 04:15 AM
|
#8
|
Senior Member
Registered: Sep 2004
Distribution: slackware
Posts: 4,756
|
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...
|
|
|
04-27-2006, 11:03 AM
|
#9
|
Member
Registered: Dec 2005
Location: UK
Distribution: Slackware 12.1
Posts: 249
Original Poster
Rep:
|
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.
|
|
|
04-27-2006, 05:50 PM
|
#10
|
Senior Member
Registered: Sep 2004
Distribution: slackware
Posts: 4,756
|
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?
|
|
|
04-28-2006, 01:03 AM
|
#11
|
Member
Registered: Dec 2005
Location: UK
Distribution: Slackware 12.1
Posts: 249
Original Poster
Rep:
|
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?.
|
|
|
04-28-2006, 06:23 AM
|
#12
|
Senior Member
Registered: Sep 2004
Distribution: slackware
Posts: 4,756
|
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.
|
|
|
04-28-2006, 07:00 AM
|
#13
|
Member
Registered: Dec 2005
Location: UK
Distribution: Slackware 12.1
Posts: 249
Original Poster
Rep:
|
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.
|
|
|
04-28-2006, 07:13 PM
|
#14
|
Senior Member
Registered: Sep 2004
Distribution: slackware
Posts: 4,756
|
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.
|
|
|
All times are GMT -5. The time now is 04:23 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|