Re: generate modprobe.conf

From: Richard B. Johnson
Date: Thu Aug 28 2003 - 13:22:54 EST


On Thu, 28 Aug 2003, Tony Lill wrote:

> Bas Mevissen <ml@xxxxxxxxxxxxxx> writes:
> > Hmmm. Strange. But it doesn't look like a kernel problem, but a system
> > configuration problem. So I'll take this off LKML and see if I can
> > help you by private e-mail.
>
> Unless there's a linux-kernel-broke-my-sytem-but-its-not-really-its-fault
> mailing list I can subscribe to, please keep the discussion here. I've
> got simmilar problems, and any solution may be enlightening.
> --
> Tony Lill, Tony.Lill@xxxxxxxxxxxxxxxxxxx
> President, A. J. Lill Consultants fax/data (519) 650 3571
> 539 Grand Valley Dr., Cambridge, Ont. N3H 2S2 (519) 241 2461
> --------------- http://www.ajlc.waterloo.on.ca/ ----------------
> "Welcome to All Things UNIX, where if it's not UNIX, it's CRAP!"

Well, to start, become root and execute `modprobe -c >junk`.
The file, junk, now contains everything modprobe 'knows' about.
You can use this as a reference.

Let's say that you have a new device, a character device with
a major number of 177. You want a module to be automatically
loaded upon the first access to that device. You simply insert
the following lines in /etc/modules.conf.

path[my-module]=/complete/path/to/where/you/put/it
alias char-major-177 my-module

Normally, you keep all the paths together and the aliases
sorted to make sense to humans. The software doesn't care.
Also, "my-module" is the module file-name without the ".o"

You only need paths if the module is not in a standard
place like 'lib/modules/`uname -r`/kernel. The file
/lib/modules/`uname -r`/modules.dep, contains all the
dependency information for everything, generated with
the `depmod -a` command.

Maybe somebody has a script that configures this auto-magically,
however I've never seen it and haven't had to use it. Problems
with finding modules with new kernel versions usually are the
result of a change in the directory structure under
/lib/modules/`uname -r`/ so you might want to make several
/etc/modules.conf files if you boot several widely-different
kernel versions. Just fix up the paths where required.

Cheers,
Dick Johnson
Penguin : Linux version 2.4.22 on an i686 machine (794.73 BogoMips).
Note 96.31% of all statistics are fiction.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/