LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 08-14-2008, 11:26 AM   #1
glenn69
Member
 
Registered: Jul 2003
Location: Chicagoland
Distribution: ArchLinux
Posts: 261

Rep: Reputation: 32
Trying to understand kernel modules


Whenever I get an updated kernel, or compile a new one, I have to recompile various modules (ex..nvidia, wireless, etc..)

I think I understand the why..because the module no longer "fits" with new kernel.

But what exactly is produced when I recompile the module?

Does the recompiling (make && make install) overwrite the old module or does it create a new module in addition to the original?
If I recompile my nvidia, for example, will I have one fit for the previous kernel and one for the new kernel in my system?

Where are modules stored? I haven't had luck finding a directory full of modules.

Thanks
 
Old 08-14-2008, 11:34 AM   #2
danboland
Member
 
Registered: Feb 2006
Location: NJ, USA
Distribution: Debian
Posts: 72

Rep: Reputation: 17
Was produced the the module binary file that can be loaded by the kernel.

Storage depends (i think) i distribution.

The modules are usually loaded from:
/lib/modules/<version>/
where version is your kernel version
 
Old 08-14-2008, 01:26 PM   #3
glenn69
Member
 
Registered: Jul 2003
Location: Chicagoland
Distribution: ArchLinux
Posts: 261

Original Poster
Rep: Reputation: 32
Not sure I understand your answer
Quote:
Was produced the the module binary file that can be loaded by the kernel
I believe you are stating that modules are binaries. But, if I recompile will it overwrite the original or is a new module created in addition to the original?

I ask because I want to know if I will cause problems with multiple modules that do the same things for different kernels

Thanks
 
Old 08-14-2008, 02:54 PM   #4
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Modules are just parts of the kernel that are not built in, they are inserted into the kernel as needed or by you. Every time you change kernel versions or even reconfigure some major part of your current kernel (such as changing architecture) you must recompile the modules. So with the nvidia kernel modules, every time you change kernels you will have to compile and install a whole new module, the old one has no way of working and will be overwritten. As danboland said modules are stored in '/lib/modules/$(uname -r)/kernel'. If you'll notice a new kernel version will make it's own separate directory in '/lib/modules' for its modules. I usually delete old modules anyway.

Last edited by H_TeXMeX_H; 08-15-2008 at 04:12 AM.
 
Old 08-14-2008, 06:18 PM   #5
glenn69
Member
 
Registered: Jul 2003
Location: Chicagoland
Distribution: ArchLinux
Posts: 261

Original Poster
Rep: Reputation: 32
Thanks, that clears it up
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
trying to understand kernel config class_struggle Linux - General 5 05-06-2010 02:55 AM
Does anyone understand exactly how to schedule work in kernel >= 2.6.20? sixerjman Linux - Kernel 1 09-03-2007 11:39 PM
How does KERNEL understand which is ROOT partition? Berkut83 Red Hat 4 04-24-2006 02:01 AM
What way is best for understand OS (linux or unix) kernel structure Nad0xFF Programming 11 04-06-2005 01:19 PM
new kernel (2.4.22 up from 2.4.20-6) - missing modules - use old modules? Simon Bridge Linux - Software 1 02-04-2004 05:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:51 AM.

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