Skip to contentSkip to conversation

Do I want to use udev?

DISCUSSION Brian Sammon 3 participants 5 messages Jan 4, 2006

lore
Share & tools
lore
#0 lore raw

I'm trying to figure out if I should be using udev, and if so, how. I'm upgrading to a recent 2.6 kernel, and various documentation says that udev is required, but I'm not sure.

I'm not interested in having a dynamic /dev filesystem (for the moment); a static /dev filesystem has served me just fine up to this point, and I think it will continue to work for a little while longer.

So that leaves me with the other hotplug-related functionality, automatic driver loading. I can't figure out if, or how, udev does that. In particular, 99% of the hotplugging I do is USB devices, and I can't find any file in my (Debian) udev package that configures which USB drivers get loaded for which USB devices.

This leads me to wonder-- can I disable/uninstall udev altogether, or just disable the dynamic /dev filesystem and still have automatic USB driver loading?

If part/all of my problem is debian specific, I'd still appreciate general information, such as how it should be done, or information about how this works on your system.

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#1 lore raw
Quoted 10 lines · Brian Sammon

I'm trying to figure out if I should be using udev, and if so, how. I'm upgrading to a recent 2.6 kernel, and various documentation says that udev is required, but I'm not sure.

I'm not interested in having a dynamic /dev filesystem (for the moment); a static /dev filesystem has served me just fine up to this point, and I think it will continue to work for a little while longer.

So that leaves me with the other hotplug-related functionality, automatic driver loading. I can't figure out if, or how, udev does that.

The single rule:

	ENV{MODALIAS}="?*",    RUN+="/sbin/modprobe $env{MODALIAS}"

will cause udev do that.

Quoted 3 lines

In particular, 99% of the hotplugging I do is USB devices, and I can't find any file in my (Debian) udev package that configures which USB drivers get loaded for which USB devices.

That's the "magic" of the kernel driver providing a MODULE_DEVICE_TABLE() logic with the modprobe program matching up module aliases. See my very old OLS 2001 paper on the basic ideas behind the whole thing (but it's simpler now, as modprobe does the matching for us, we don't have to scan the alias tables anymore by hand.)

Quoted 3 lines

This leads me to wonder-- can I disable/uninstall udev altogether, or just disable the dynamic /dev filesystem and still have automatic USB driver loading?

You can, if you only use the one rule above :)

But if that's all that you want to have happen, stick with the old hotplug package, it still works just fine. Why would you want to use udev if you don't care about persistant names and other good stuff it provides?

Quoted 3 lines

If part/all of my problem is debian specific, I'd still appreciate general information, such as how it should be done, or information about how this works on your system.

I suggest you ask debian udev specific questions on a debian specific mailing list, you might have better luck that way :)

Hope this helps,

greg k-h

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#2 lore raw
In reply to Brian Sammon
Quoted 4 lines

But if that's all that you want to have happen, stick with the old hotplug package, it still works just fine. Why would you want to use udev if you don't care about persistant names and other good stuff it provides?

That's a good question. Debian says that recent 2.6 kernel packages "require" udev. Based on that, and the fact that recent kernels have a udev line in the "Current Minimal Requirements" section of Documentation/Changes, I (wrongly, it seems) inferred that something had changed in recent (kernel.org) kernel sources that made them incompatible with hotplug.

Since I often compile my own kernel, I suppose I don't have to obey debian kernel policies too closely.

Considering my lack of interest in dynamic /dev filesystem support, which of
hotplug
hotplug-ng
udev
would people here recommend I use?

I notice that there hasn't been a new hotplug release in over a year. Is it unmaintained, or has it simply not needed updating?

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#3 lore raw
In reply to Brian Sammon
Quoted 5 lines

Considering my lack of interest in dynamic /dev filesystem support, which of
hotplug
hotplug-ng
udev
would people here recommend I use?

udev because it has up-to-date support, keeps my /dev minimal and clean, is simple to install, easy to modify rules, does all my old hotplug and coldplug, and is fast.

regards,

Aras Vaichas

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#4 lore raw
In reply to Brian Sammon
Quoted 7 lines · Brian Sammon
Quoted 4 lines

But if that's all that you want to have happen, stick with the old hotplug package, it still works just fine. Why would you want to use udev if you don't care about persistant names and other good stuff it provides?

That's a good question. Debian says that recent 2.6 kernel packages "require" udev.

That's a Debian issue, 2.6 kernels do not require this.

Quoted 4 lines

Based on that, and the fact that recent kernels have a udev line in the "Current Minimal Requirements" section of Documentation/Changes, I (wrongly, it seems) inferred that something had changed in recent (kernel.org) kernel sources that made them incompatible with hotplug.

No, not at all, that's there to show the version of udev that you need to use, if you want to use it. Older versions will not work with that specific kernel version.

Quoted 2 lines

Since I often compile my own kernel, I suppose I don't have to obey debian kernel policies too closely.

Heh, if at all :)

Quoted 5 lines

Considering my lack of interest in dynamic /dev filesystem support, which of
hotplug
hotplug-ng
udev
would people here recommend I use?

Just plain hotplug will probably work for you, if all you want is the automatic module loading.

hotplug-ng is a dead project, it was replaced with a single udev rule (that one previously mentioned), so don't use it.

Quoted 2 lines

I notice that there hasn't been a new hotplug release in over a year. Is it unmaintained, or has it simply not needed updating?

Pretty much both. I have a bunch of patches floating around that the last release needs, but as distros are moving away from it, I'm loath to do a new release.

But maybe I need to flush out the pending stuff, and mark it "depreciated"...

thanks,

greg k-h

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel