LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-04-2005, 11:22 PM   #1
blackzone
Member
 
Registered: Jun 2004
Posts: 256

Rep: Reputation: 30
insmod: where it search for module


where does the kernel search for the module to add?

for example when I type "insmod module1", the kernel just search every directory in /lib/module for a file named module1.o?
 
Old 01-05-2005, 01:45 AM   #2
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440

Rep: Reputation: 52
I believe it looks under: /lib/module/<your kernel>

-twantrd
 
Old 01-05-2005, 03:41 AM   #3
adz
Senior Member
 
Registered: Jun 2003
Location: Sydney
Distribution: Debian, FreeBSD
Posts: 1,713

Rep: Reputation: 53
No, insmod searches the directory from which you ran it. However, modprobe searches every subdirectory of /lib/modules/`uname -r`/kernel.
 
Old 01-05-2005, 07:10 AM   #4
Oliv'
Senior Member
 
Registered: Jan 2004
Location: Montpellier (France)
Distribution: Gentoo
Posts: 1,014

Rep: Reputation: 36
from insmod man page:
Quote:
If the module file name is given without directories or extension,
insmod will search for the module in some common default directories.
The environment variable MODPATH can be used to override this default.
If a module configuration file such as /etc/modules.conf exists, it
will override the paths defined in MODPATH.
and to see modprobe config: "modprobe -c"

Oliv'
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to insmod module alltime Programming 1 11-05-2005 10:46 AM
insmod: error inserting 'new.ko': -1 Invalid module format hemk76 Programming 2 01-26-2005 10:52 AM
insmod invalid module format csfalcon Linux - Hardware 6 01-24-2005 11:03 AM
insmod <module> on boot HTS Programming 3 06-30-2004 11:49 AM
boot time insmod error of a non-existing netcard module cyberia_2ooo Slackware 2 07-06-2003 03:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:39 PM.

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