PDA

View Full Version : Insert a module permanantly



jeremyreed
29th March 2006, 08:37 PM
I am currently running a kernel which was not compiled with the powernow-k8 module.
modprobe powernow-k8 works just fine when I want to insert this module, however on reboot the module needs to be inserted again. How would I go about having the module inserted at bootup automatically?

brandor
29th March 2006, 08:43 PM
You can add it to /etc/rc.local.

jeremyreed
29th March 2006, 09:09 PM
I have done this, however the daemon cpuspeed gets started before the module gets inserted, which causes the cpuspeed start to fail. What I really want to do is have the module inserted at the same time the other modules are inserted.

jowah
29th March 2006, 10:31 PM
For that purpose, create a text file named /etc/rc.modules and in it, have this:

modprobe powernow-k8Save the file and make sure it's marked as executable:

chmod +x /etc/rc.modulesTada! Think of rc.modules as a "rc.local that is run earlier".

Reference: RHEL 4 System Administration Guide (http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/sysadmin-guide/), chapter 38.2: Persistent Module Loading (http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/sysadmin-guide/s1-kernel-modules-persistant.html)

jeremyreed
29th March 2006, 11:49 PM
Jowah I thank you for your solution. It is working perfectly however I am wanting to research how detected modules are loaded by the rc.sysinit script. Could you point me in the right direction for researching how to insert a module in the same mechanism as the O.S. Again your solution works perfectly, I am more interested in getting to know the "under the hood" aspect of modules. I could have also built the kernel with the module from the start, but that defeats the purpose of learning.