5

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.

fixer1234
  • 27,064
  • 61
  • 75
  • 116
Alex
  • 245
  • 4
  • 14
  • Are we talking about module autoloading or simply modprobe/insmod? –  Feb 05 '14 at 06: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 06 '14 at 13:32

1 Answers1

3

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.

Alex
  • 245
  • 4
  • 14