[lug] logging missing 2.6 kernel modules

D. Stimits stimits at comcast.net
Sun Jun 12 23:25:11 MDT 2005


Lee Woodworth wrote:
> In reviewing the hotplug and udev stuff, I was reminded of
> some things I have seen on the web that apply:
> 
>    Kernel version 2.6 will not automaticlly load device drivers
>    when a related device node is accessed. The major reason
>    being that there is interest in having device major/minor
>    become dynamially allocated. For example the device mapper
>    (dm_mod) already uses a dynamic minor number for
>    /dev/mapper/control.
> You may be interested in this excerpt from the udev FAQ:
> 
>    Q: But udev will not automatically load a driver if a /dev node is opened
>       when it is not present like devfs will do.
>    A: If you really require this functionality, then use devfs.  It is still
>       present in the kernel.

As far as I know I'm not using udev. For the old devfs it's easy to 
check (not using it), I'm coming up blank trying to figure what kernel 
config is for udev.

>    Q: But wait, I really want udev to automatically load drivers when they
>       are not present but the device node is opened.  It's the only reason I
>       like using devfs.  Please make udev do this.
>    A: No.  udev is for managing /dev, not loading kernel drivers.

I'm actually hoping for some *other* mechanism to do this, not udev.

>    Q: Oh come on, pretty please.  It can't be that hard to do.
>    A: Such a functionality isn't needed on a properly configured system. All
>       devices present on the system should generate hotplug events, loading
>       the appropriate driver, and udev will notice and create the
>       appropriate device node.  If you don't want to keep all drivers for your
>       hardware in memory, then use something else to manage your modules
>       (scripts, modules.conf, etc.)  This is not a task for udev.

This answer is actually wrong. It says a lot of right things, but the 
author is living in a vacuum if he thinks all devices send hotplug 
events. Plain and simple, there is a lot of hardware that is not hotplug 
and does not have the hardware to work with such events. Serial ports 
are such devices, parallel ports, and my beloved 15 pin game port. To me 
this answer is saying we are all supposed to throw out our old hardware, 
that old hardware is buggy because it does not have hotplug for things 
like serial ports. Maybe one day all mice will be USB, all hard drives 
PCMCIA, all keyboards USB, so on...but for now I use a normal analog 
joystick that is permanently connected to a game port, there should be 
no hotplug questions as it is always there. When someone tells me I have 
to throw out hardware because it isn't supporting of the things *they* 
think it should have, I think "microsoft-speak". Somehow I don't think 
this was the intent of kernel developers, I must be missing something 
somewhere...if /etc/modules.conf is removed, then what replaced it? 
/etc/modprobe.conf does not have the same abilities, so I have to 
believe something else complements modprobe.conf.

> If you can issue modprobe's from the shell and the device works, try
> adding these commands to /etc/modprobe.conf:
>    options joydev .....
>    alias /dev/js0 joydev
> I don't think this will get the module loaded at boot, it just configures
> what happens when a modprobe of joydev occurs.

This is correct. I'm able to load modules ok, I just wonder why the heck 
depmod doesn't write the dependencies in...the hardware is always there, 
it isn't like it's missing during boot or something.

> You need to find where your init system looks for modules to modprobe
> during system start. I would suggest starting with
>    grep --recursive modprobe /etc/*
> to see what scripts invoke modprobe. Then see what files they read/source.
> There might be something in /etc/sysconfig for RH/Fedora systems.

This is actually the best lead, but all I'm coming up with are things 
capable of hot plug events (game port devices and serial mice are not 
capable of this), and rc.local. To me this is a step backwards, module 
autoloading seems to be abandoned except for hotplug devices.

[WARNING, RANT: I get rather peeved when I have no money and people tell 
me I have to throw away my old hardware or stop using linux...that's the 
microsoft way. I really hate where I see this going, it seems like it 
won't be long before even in linux we're told to throw out our old 
hardware every few years and to not whine about it, like everyone has 
the money to do it. Just how many motherboards out there have no serial 
ports, no PSAUX, no parallel port? All of those ports have no means to 
generate hotplug events, and definitely are not broken or misconfigured. 
I feel like an auto mechanic just told me to stop driving motorcycles 
because they're all missing two wheels.]

D. Stimits, stimits AT comcast DOT net



More information about the LUG mailing list