With today’s release of kmod 31, Linux’s modprobe utility for loading kernel modules can finally allow arbitrary paths to allow loading new kernel modules from anywhere on the file-system.
Surprisingly it took until 2023 for allowing Linux’s modprobe to accept loading kernel modules from any arbitrary path. Rather than just specifying the module name and then looking up the module within the running kernel’s modules directory, modprobe can now allow passing a path to the module. Relative paths are also supported when prefixed with “./” for the path to the desired module.
Finally.
As a developer, I’ve always just used insmod to load my own modules, which always supported loading from arbitrary paths.
It’s fine for modprobe to support it too, but I can’t think of why normal users would ever need to load modules from arbitrary paths? This is probably why nobody bothered to add it for so long.
There may be some circumstance where a normal user would need this ability but I seriously doubt it’s all that common. I guess using modprobe is slightly more convenient due to supporting dependencies but honestly this seems like a solution in search of a problem. I’m sure someone somewhere is happy but I couldn’t care less.
What is the point? Wasn’t insmod the command to load modules from anywhere but the default path?
I think insmod works more like “dpkg”, and modprobe more like “apt”. Meaning one does basic module loading, the other also resolved additional dependencies.
(I might be mistaken though, it has been a while since I needed to use any of them).