LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   modprobe.conf in Slackware-12.0 (http://www.linuxquestions.org/questions/slackware-14/modprobe-conf-in-slackware-12-0-a-593923/)

rshepard 10-23-2007 09:57 AM

modprobe.conf in Slackware-12.0
 
If /etc/modprobe.d/modprobe.conf is deprecated in -12.0, why does the boot process keep looking for it and reporting that it's not found?

Just curious,

Rich

rworkman 10-23-2007 06:46 PM

I've never seen this - what exactly is looking for it (and more importantly, why?)

rshepard 10-24-2007 08:34 AM

Quote:

Originally Posted by rworkman (Post 2934281)
I've never seen this - what exactly is looking for it (and more importantly, why?)

Ah, grasshopper! That's the question of the day. :-) Here's where it appears in /var/log/messages:

Oct 24 06:16:15 lemna logger: /etc/rc.d/rc.inet1: /sbin/ifconfig eth0 192.168.55.3 broadcast 192.168.55.63 netmask 255.255.255.192
Oct 24 06:16:15 lemna logger: /etc/rc.d/rc.inet1: /sbin/route add default gw 192.168.55.4 metric 1
Oct 24 06:16:15 lemna logger: /etc/rc.d/rc.inet1: /sbin/ifconfig lo 127.0.0.1Oct 24 06:16:16 lemna logger: /etc/rc.d/rc.inet1: /sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo
Oct 24 06:16:19 lemna modprobe: WARNING: Failed to open config file /etc/modprobe.d/modprobe.conf: No such file or directory

While the system is booting, I see multiple copies of the message scroll by. In the log, this is the sequence for the past three days.

Whether the warning is related to bringing up the network interfaces is not certain.

It is a warning, not a fatal error, but it should not be there anyway.

Any ideas, Robby?

Rich

rworkman 10-24-2007 08:55 AM

Show this output:
Code:

ls -l /etc/modprobe.d /etc/modprobe.conf

rshepard 10-24-2007 11:59 AM

There is no /etc/modprobe.conf. /etc/modprobe.d/modprobe.conf is a broken link to the no-longer-existing /etc/modprobe.conf

Rich

rworkman 10-24-2007 12:34 PM

Either remove the broken symlink or put /etc/modprobe.conf back - the stock installation includes it, so you must have removed it.

rshepard 10-24-2007 02:25 PM

This is interesting, Robby. You're correct that I probably removed it because it says that it's deprecated and all module information should be placed in /etc/modprobe.d/.

I re-installed module-init-tools*.tgz and it put that short version of /etc/modprobe.conf back, along with a working link in /etc/modprobe.d/. I am sure that now the warning will not appear when I next reboot the notebook.

However, why is a non-functional /etc/modprobe.conf included if it has been deprecated with the 2.6.x kernels and no longer used?

Thanks,

Rich

rworkman 10-24-2007 02:39 PM

Rather than retype it, I'm going to post a message that I wrote in response to a similar question on a mailing list:
Quote:

> Havinge recently upgraded to slackware 12, I notice there is no
> modules.conf file, please forgive me if this has been discussed before,
> but I'm curous as to why? I realise that it was empty on a stock
> slackware install but it was a good place to edit some of the kernel
> options such as disabling net protocols with entries such as:
>
> alias net-pf-4 off # IPX
>
> is this still acceptable practice and if not what is the correct
> procedure? Thanks in advance.


/etc/modules.conf was the file to place module load parameters when
using the old modutils (for 2.4.x kernels). For 2.6.x kernels,
module loading is handled by the module-init-tools package, which
looks at the contents of /etc/modprobe.conf and then each file in
the /etc/modprobe.d/ directory.

*HOWEVER* -- *READ* *THIS* :-)

The usage of /etc/modprobe.conf is indeed deprecated and will be
phased out at some point in the future - I personally have confirmed
this with Jon Masters, the module-init-tools maintainer. As such,
Slackware's module-init-tools package includes a two line patch to
modprobe.c which reverses the checking order to look at the contents
of /etc/modprobe.d/ before /etc/modprobe.conf - this is to help ease
everyone into the transition. To further ease the process, you'll
notice that /etc/modprobe.d/modprobe.conf is a symlink to the actual
/etc/modprobe.conf file, so anyone still using the "old" location will
not notice any problems :-)

With all that said, you can put module load options into a custom file
(or files) in /etc/modprobe.d/ -- there are very few restrictions on
the filenames that are looked at, and I don't happen to recall them
at the moment, but you might look at how -current is doing it right
now: there's 'blacklist' for blacklisting modules (preventing them
from being automatically loaded) [1], there's 'isapnp' to define some
common isapnp aliases, there's 'psmouse' to make the psmouse module
load with the imps protocol by default, and so on. You could follow
this convention and use a file called 'aliases' or 'net-pf' or pretty
much whatever you want.

[1] There were quite a few problems with 12.0 during its development
with the pcspkr module being loaded even though it was commented
out in rc.modules and blacklisted in /etc/modprobe.d/blacklist -
it turns out that it was due to the isapnp alias for it; the
blacklist was being ignored for module aliases. This was one of
many fixes that went into the new module-init-tools 3.4 that's in
-current now.

Hope that helps,
-RW

rworkman 10-24-2007 02:42 PM

By the way, if you don't want the /etc/modprobe.conf file there (as it's not needed), that's okay -- you just have to remove the (now-broken) symlink to it in /etc/modprobe.d/
Otherwise, module-init-tools will look at the symlink, but the file it points to doesn't exist, so you get that warning message.

rshepard 10-24-2007 02:59 PM

Robby,

Thank you very much for the mail list reprint. It makes everything clear. Doesn't matter to me if the deprecated file and symlink remain until the next upgrade; it's harmless.

Much appreciated,

Rich


All times are GMT -5. The time now is 02:32 AM.