I cannot rmmode a scull:
# /sbin/rmmod scull
rmmod: ERROR: Module scull is in use
# /sbin/modprobe scull
modprobe: FATAL: Module scull not found in directory /lib/modules/4.19.0-9-amd64
Ok, so the scull is in use, but is not in modules dir? Do not get it.
#depmod #maybe it needs to inform kernel?
but to no avail (still get the errors above). Why?
the question comes from my previous one How to build external modules in ubuntu? regarding loading module (not successfuly) and the output of the kern log. Now, when I have reacted to comment from the link to add printk
to init function (as a kind of "debuging" option), I needed to first remove the old module. But when did - the error above. From other stack-question, there were answer to use modprobe -r
. I have tried that as well, but to no avail. So now I am confused how to remove module without to reboot or force to do (rmmod -f
). This should be general question (how to remove module, when kernel does not know about it
), not specific to my module, but I do not know whether it is possible to answer without knowing the specific case I am in. Nevertheless, does the module in use
means being in the /lib/modules
dir that modprobe
refers?