Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a situation where I have two modules both named cxgb3 and both in /lib/modules/. How do I inform the OS which one to prefer?

Consider this example:

$ find /lib/modules/ -name cxgb3.ko
/lib/modules/2.6.32-431.el6.x86_64/extra/mlnx-ofa_kernel/drivers/net/ethernet/chelsio/cxgb3/cxgb3.ko
/lib/modules/2.6.32-431.el6.x86_64/kernel/drivers/net/cxgb3/cxgb3.ko

Currently it uses the top one but I want it to use the bottom one. I am using CentOS 6.5.

share|improve this question
    
Are we talking about module autoloading or simply modprobe/insmod? –  Sami Laine Feb 5 at 6:01
    
Preferably autoloading, but it would be nice to determine how to do it via modprobe too. I did notice modprobe has the -t and -l options that might work. –  Alex Feb 6 at 13:32

1 Answer 1

up vote 0 down vote accepted

The way to do this is the depmod command. It controls the order in which modules are processed. Also, there are configuration files in /etc/depmod.d/ on my CentOS 6 box.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.