[plug] Installing New Modules in a running kernel

Craig Ringer craig at postnewspapers.com.au
Wed Nov 3 15:34:44 WST 2004


Timothy White wrote:
> I believe that it should be possible to compile modules for a running 
> kernel and load them without a reboot. I.e. I have compiled a custom 
> kernel, its running with module support, I discover I need another 
> module, I change the .config file, do a make modules && sudo make 
> modules_install and it should work?

In general, yes it should work fine. It will fail if enabling the module 
adds hooks to the statically compiled kernel or adds extra code to 
support the module, but purely modular code will work fine.

You can generally expect to be able to compile things like SCSI and 
network drivers for a running kernel and install them without problems. 
Other modules are less certain. If I recall correctly, insmod will 
generally refuse to load the module, complaining about unresolved 
symbols, if there's a problem.

I certainly wouldn't call it safe to load modules that were compiled for 
a kernel configured differently to the running one (even if the config 
change was just enabling that module), but in most cases it should be OK.

It's almost invariably OK for out-of-tree modules (like ALSA for 2.4), 
though.

> Well I tried just that and it worked 
> except when I tried to load the new module (alsa virtual midi sound card)
> Any ideas?

I don't suppose you feel like providing the error message? "It doesn't 
work" isn't the most informative comment in the world ;-)

> I hope its possible as I hate rebooting, I like leaving my 
> login session open for days on end, isn't that what I Terminal server is 
> for?

"I Terminal Server" ?

--
Craig Ringer



More information about the plug mailing list