Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-15-2002, 10:06 PM   #1
LQ Newbie
Registered: Apr 2002
Posts: 5

Rep: Reputation: 0
insmod question

I understand that modules allow dynamic installation of drivers to a running kernel.
I installed a module, and I'm curious at to when the module gets uninstalled. Does this happen when you logout/reboot? if not, how does the kernel know which modules to restart?
Old 04-15-2002, 10:18 PM   #2
LQ Guru
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 252Reputation: 252Reputation: 252
yes most of the time they will unload after a reboot or shutdown.
usually your /etc/modules.conf file is the file it reads at boot time to determine what modules to load.
Old 04-16-2002, 10:43 PM   #3
LQ Newbie
Registered: Apr 2002
Posts: 5

Original Poster
Rep: Reputation: 0
I need to install hte module for my modem drivers. Should this be done by adding an "insmod" line for the modules to one of the initial scripts? or do I need to recompile the kernel?
What is the difference between the insmod and modprobe commands?
I tried installing a module using insmod, adn it gave me some error, but when I tried the same module using a modprobe, it worked.
Old 04-17-2002, 12:32 AM   #4
Registered: Jun 2001
Location: Fairfax, California
Distribution: RH 9.0, RH 7.3, Mandrake 8.0
Posts: 986

Rep: Reputation: 30
The (rough) answer to modprobe vs.insmod is this:

Modprobe is "smarter" about loading modules, in the sense that it can consult a file generated by depmod which tracks module dependencies. That means that if one module expects/needs another module to be loaded before it can load, modprobe can read the file that depmod creates to make sure that the necessary modules are loaded, and in the correct order. Insmod by itself doesn't do this, so you'll generally get "unresolved Symbol" errors if you insmod a module which depends on another module loading first. The man page for depmod puts it this way:
Depmod creates a "Makefile"-like dependency file, based on the symbols it finds in the set of modules mentioned on the command line or from the directories specified in the configuration file. This dependency file is later used by modprobe to automatically load the correct module or stack of modules.
When you boot, /etc/modules.conf is read by the system to determine which modules you want to load (although not all of the modules that will load are specified here). You don't actually place an insmod or modprobe command directly in the file; it has its own syntax which assigns an "alias" to a modulename. For instance, to add a line in /etc/modules.conf for the 8139too.o module that my NIC (eth0) uses, I put the following in modules.conf:
alias eth0 8139.too

What exactly you need to add to modules.conf depends on your particular modules and the devices that use them.

Last edited by DMR; 04-17-2002 at 12:34 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
old question but no definitive answer (iptables and insmod) truepatience Linux - Software 1 07-26-2005 07:35 PM
insmod pantera Programming 1 05-24-2005 12:40 PM
Help with insmod. I have a problem with insmod. RJARRRPCGP Linux - Newbie 5 08-24-2004 09:23 PM
insmod question plisken Linux - General 2 09-07-2003 02:15 PM
A question about modules and insmod... Defboy2k Linux - Newbie 3 11-05-2002 05:48 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:08 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration