3

I've found a funny behaviour in the Linux kernel (version 3.19.0). We were testing a network driver and the system hung completely, it didn't even responded to SysRq commands. After the reboot, the driver we were testing still appeared as loaded, even when it's not configured to load at boot. What's worse, it couldn't be removed neither with modprobe -r nor rmmod -f. The kernel log didn't show anything helpful.

We tried to reboot again and again, even blacklisting the module but it always appeared as a loaded module. The only solution we found was to reinstall the kernel (apt-get remove/install linux-image-$(uname-r)). It then disappeared and everything started working perfectly again.

Does anyone know what could be happening here and why did the kernel load the module even when explicitly told to not do so?

Edit: the reconfiguration didn't fix it, I had to reinstall the kernel package.

3

May be your module was loaded during initrd stage. At this stage booloader loads special file and passes it to kernel which in turn mounts it as filesystem and loads various modules from there. Original purpose of this was to load drivers necessary to read root filesystem without compiling all possible drivers into kernel. Initrd file is regenerated in different ways by different distributions, usually regenerated on kernel update. As you seem use debian-based distribution, try this for help: https://wiki.debian.org/KernelModuleBlacklisting .

2
  • I edited the answer because what finally fixed it was reinstalling the kernel. I can't try the solution you posted, but, just to verify, dpkg-reconfigure runs depmod -ae and update-initramfs -u as the link specifies, right?
    – gjulianm
    Oct 5 '15 at 22:24
  • Depends on kernel package of your distribution. Get source package for it and take a look what it does.
    – gena2x
    Oct 6 '15 at 10:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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