# after system-upgrade: modprobe won't work, insmod does

## superwutze

hello!

yesterday i upgraded my system to current udev, kernel and all and now i face a strange behaviour:

several (but not all) modules cannot be loaded using modprobe, but insmod (with full path) works.

all paths and module locations are right, but modprobe doesn't find them.

```

# modprobe iwlwifi

modprobe: FATAL: Module iwlwifi not found.

```

but using

```

modprobe e1000e

```

works.

but when i use insmod with the full path the iwlwifi module loads and works.

i followed all comments on emerging and read (and followed) the news, also i searched the forum but found nothing so far.

i'm thankful for any suggestions!

regards,

andy

----------

## SamuliSuominen

Forgot to run `depmod -a` before trying to use `modprobe` after modules install, perhaps? And `modprobe` is part of the new sys-apps/kmod, and not the old sys-apps/module-init-tools?

----------

## superwutze

i already tried that, didn't help.

and the upgrade migrated to kmod, no more module-init-tools.

----------

## superwutze

meanwhile this problem exists on 3 independent gentoo-systems, after boot no modules are loaded, if i load a module with insmod the dependencies cannot be loaded so i have to load all modules single by single using insmod and the full path.

any ideas?

----------

## SamuliSuominen

Missing CONFIG_MODULE_UNLOAD or CONFIG_MODULES in the kernel? I'm quite sure both are required, but currently kmod's ebuild only checks for MODULES, will add the another after verification.

```

# zgrep CONFIG_MODULE /proc/config.gz

# grep CONFIG_MODULE /usr/src/linux/.config

```

----------

## superwutze

```

# zgrep CONFIG_MODULE /proc/config.gz 

CONFIG_MODULES=y

# CONFIG_MODULE_FORCE_LOAD is not set

CONFIG_MODULE_UNLOAD=y

# CONFIG_MODULE_FORCE_UNLOAD is not set

# CONFIG_MODULE_SRCVERSION_ALL is not set

```

i'm not sure, but if i missed the CONFIG_MODULES option i would not be able to config kernel modules at all, or at least ismod would not work also. for now i entered some lines into my /etc/local.d/baselayout1.start file:

```

insmod /lib64/modules/`uname -r`/kernel/drivers/net/wireless/iwlwifi/iwlwifi.ko 

insmod /lib64/modules/`uname -r`/kernel/drivers/net/wireless/iwlwifi/dvm/iwldvm.ko 

insmod /lib64/modules/`uname -r`/block/vhba.ko 

```

so my system can be booted without the need for some root-action.

----------

## SamuliSuominen

 *superwutze wrote:*   

> 
> 
> ```
> 
> insmod /lib64/modules/`uname -r`/kernel/drivers/net/wireless/iwlwifi/iwlwifi.ko 
> ...

 

The kernel module directory is /lib/modules, not /lib64/modules. But I guess in your system it's a symlink from lib to lib64. However this is not always the case.

----------

## superwutze

that's true, it is a symlink. but at least it is a workaround to use my wireless again and insmod needs the path. still no luck with modprobe.

----------

## pjvenda

Sorry to jump in, but I've got the same issue. Can't figure out what's happening with kmod as insmod works OK but modprobe does not work at all.

depmod -a works ok and writes its files to /lib/modules/$(uname -r)/ correctly...

I've straced modprobe and insmod but haven't yet found any notable differences that would explain this behaviour... will have a poke around a recent working gentoo with kmod.

----------

## pjvenda

For some reason, /lib/modules/$(uname -r)/*.bin are not being generated or read correctly. modprobe reads these files preferentially and the non binary variants if they don't exist...

Deleting these binary dependency files will remove the error messages from modprobe's output but modules still aren't loaded.

Then I reinstalled all modules fro the source, and did a few more tests. I've narrowed down the issue to /lib/modules/3.6.2/modules.builtin*. The original file is installed by the kernel make file on make modules_install.

Deleting said modules.builtin* makes modprobe work again (depmod not required). I'm now researching about the purpose of this file (which seems obvious) and the effects of it not being there.Last edited by pjvenda on Sun Feb 17, 2013 10:41 pm; edited 1 time in total

----------

## superwutze

thanks for the research, i can confirm this!

```

rm /lib/modules/`uname -r`/modules.builtin*

```

does the trick! i can load modules again!

but why?

thanks,

andy

----------

## vadanila

Got the same problem after moving from module-init-tools to kmod. Thanks for saving my box. 

Removing modules.builtin.bin helped me too, but only until the next depmod. E.g. rebuilding nvidia.ko (from nvidia-drivers) caused modprobe to fail again, just because modules.builtin.bin had been regenerated. 

Yet updating to sys-apps/kmod-9999 and running "depmod -a" had fixed the problem permanently. I've downgraded back to the stable kmod-12-r1, rebooted and modprobe still works.  Ran "depmod -a" again and still no problems.

----------

