Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am developing a kernel module. Something wrong happens, so I want to remove this module. But the kernel says it is in use, even I add the force option to rmmod utility, it is still holding there.
rmmod **** -f
ERROR: Removing '****': Device or resource busy
You may need to remove modules that depend on the module. You may also need to stop a service that uses it. One example shutting down a NIC device before unloading the kernel module for that device. Not doing so could lead to a lockup.
You may need to remove modules that depend on the module. You may also need to stop a service that uses it. One example shutting down a NIC device before unloading the kernel module for that device. Not doing so could lead to a lockup.
The module communicates with a user space partner using Netlink.
It might not have any other modules dependent on it.
Anyway, I want to know if I can get the information about what modules or kernel threads or anything depend on a certain given module.
BTW: Distro is short for distribution. Why the O? It is interesting. Maybe distribution, have you got any better explanation?
modprobe -rf is more powerful than rmmod, sometimes it can remove an in use module. Don't know why, in some other cases, I just learned that.
So thank datopdog.
Module may not be removed by rmmod even if no other modules depend on it, according to the dependency information obtained from lsmod.
Thank you all. I learned a lot about modules and their dependency from you.
I ran into the same problem, and came to realize that my module was installed with dkms. Therefore, I had to remove it with dkms, rather than with modprobe. The command will look something like this:
The <module-name> and <version-number> are from the dkms.conf file in the module package root directory.
The snippet $(uname -r) will return the current kernel version, so this will only remove the module from the current kernel, so it will remain for previous versions, or you can use --all to remove it from all kernels.
Once you do this, you can rebuild and reinstall the module with dkms if that is what you chose to do.
And that is also why you develop kernel stuff on VMs, and get rather used to rebooting them a lot ...
Actually, I find it advantageous to have a multiboot system, so I was never dead in the water. But I did want to get the new upgrade working - ever forward. In fact, I have Xubutnu installed twice, once on each of two different drives, as well as Ubuntu installed on both drives, plus Vector and Puppy both installed once on the second drive, in addition to Windows 10 which hardly ever gets used anymore (aren't 2 TB drives grand?). I also check out other distros from time to time to see if there's any I like.
As my wifi router is in another room, some months ago I also took my old Linksys 802.11-G router and turned it around as a wifi bridge, and run my wired adapter to that as a backup, so it appears to my network manager that I have both wired and wifi connections. The "wired" is slower than the wifi -- dog-slow for doing partition backups, but is fine for internet browsing, and helped me get through the period of having the true wifi adapter down. Normally I have it disabled and just use the wifi. If you don't have an old 802.11-g router in a closet somewhere, they are dirt cheap now, and make a good insurance policy as a bridge.
But good advice, sundialsvcs . I've worked with simulators before, but not VMware. I'll have to give it a spin. Thanks.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.