LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 05-11-2003, 12:56 PM   #1
lostboy
Member
 
Registered: Mar 2003
Location: Florida
Distribution: Slackware 9.1,10.1
Posts: 268

Rep: Reputation: 30
Question Kmod ?


Let's get this out of the way : I have used google/linux, I have
searched the forum pages. I can not get a definitive answer
on this.

1. What extra file is Kmod reading ?
For my example, I am looking for whoever is calling Kmod to
load the ' vfat ' module. I don't need it, as it is compiled directly
into the kernel, and I want it to not try to load.
Here are the files that I have looked at, and have yet to find
the rat :

rc.modules
rc.local
modules.conf
rc.hotplug

None of these files are asking to load vfat, so who is asking ?

2. What is the proper way to ask for a module to load ?
For my example, I am trying to load the ' cmpci ' module.
I make an entry into ' modules.conf ' like this :

/sbin/modprobe cmpci

This of course is not working for me.
I look in :

' lib / modules / 2.4.20 / kernel / drivers / sound / '

and there I find ' cmpci.o.gz ' .

So what is the problem ? Why do I get an error on bootup
Saying that I have an ivalid entry in ' modules.conf ' ?


JC
 
Old 05-11-2003, 03:20 PM   #2
webtoe
Member
 
Registered: Apr 2001
Location: Cambridge, England
Distribution: Slackware 10, Fedora Core 3, Mac OS X
Posts: 617

Rep: Reputation: 30
What is the entry you're trying to put into modules.conf?

On slack you just bung a
Code:
/sbin/modprobe cmpci
in the script /etc/rc.d/rc.modules

This command will then be run at startup and the module will be loaded.

kmod reads the modules.conf file for configuration info for modules that it needs to load and it is the kernel itself which calls kmod. It is an automagically impressive auto module loader which should only load modules which are needed. How do you know that kmod is automatically loading the vfat module? I take it you compiled the kernel yourself.

HTH

Alex
 
Old 05-11-2003, 10:16 PM   #3
lostboy
Member
 
Registered: Mar 2003
Location: Florida
Distribution: Slackware 9.1,10.1
Posts: 268

Original Poster
Rep: Reputation: 30
Thanks alot for the reply, now I understand that a little better, and I see that , by your example, I put the entry in the wrong file. I will try the entry in rc.modules instead of modules.conf.

As for the vfat module, I see on the boot screen that kmod is failing to load the vfat module. I did in fact complie the kernel myself, and I put vfat in the kernel. So I don't know what is telling the kernel to load the vfat module. Is there some sort of map that it reads, other than the regular configuration scripts ?

JC
 
Old 05-12-2003, 01:57 PM   #4
webtoe
Member
 
Registered: Apr 2001
Location: Cambridge, England
Distribution: Slackware 10, Fedora Core 3, Mac OS X
Posts: 617

Rep: Reputation: 30
Take a look in the rc.modules file when you put the entry for you sound card in. Look for something along the lines of one of the following
Code:
/sbin/modprobe vfat
/sbin/modprobe umsdos
If either of those two are present and has no comment out character ( the hash mark, '#', you'll see it all over the file) in front of them then put one in. This will stop the startup script from trying to load the modules.

I don't think this is the problem though. Take a look at the startup messages and look for a line there which says
Quote:
Updating module dependencies for Linux 2.4.20:
Is the message about kmod appearing before, or after this message?

I have a feeling that what is happening is that there was something such as the umsdos module being loaded by the startup scripts. Now with the stock kernel that came with the distro, vfat may of been loaded as a module unlike your new recompiled kernel where it is compiled in. Now there is one of two things happening.

Either kmod is being asked to load a module which *depends* on the vfat one being loaded.

Or a module which depends on vfat is being loaded in the startup scripts.

Neither of these seem very correct since I thought the kernel was relatively clever and would know that vfat is already there and so shouldn't need to load anymodules for it.

hmmmm, have to think on this one. Maybe someone else will know better than me.

Alex

P.S. sorry if that was a meandering diatribe but it helps me think and may help someone else with there thoughts on the matter.....

P.S.S. Oh, just a thought, did you copy the System.map file into /boot when you were installing the new kernel?

Last edited by webtoe; 05-12-2003 at 01:59 PM.
 
Old 05-12-2003, 02:28 PM   #5
lostboy
Member
 
Registered: Mar 2003
Location: Florida
Distribution: Slackware 9.1,10.1
Posts: 268

Original Poster
Rep: Reputation: 30
Yes, I did replace the 'system.map' file. I think you are very close to the answer.

It seems that almost all distros start you off with a modular kernel. The distro people may be trying to give a hint as to the best way to do things. From what I have read, they make the kernel this way for convenience. I wonder if there is some sort of performance difference. I thought that I was building a better system by putting support directly into the kernel. But I'm not so sure.

Maybe I should not fight things so much, and stick with the default kernel, and build modules for things that I want. That might be a better answer than compiling a different kernel.

JC
 
Old 05-12-2003, 02:44 PM   #6
webtoe
Member
 
Registered: Apr 2001
Location: Cambridge, England
Distribution: Slackware 10, Fedora Core 3, Mac OS X
Posts: 617

Rep: Reputation: 30
There is a slight performance gain from compiling it into the kernel, and for filesystem modules it shouldn't matter. The first thing i ever do when i have installed a new distro is recompile, removing everything i don't need and making as much as possible compiled in. Ive never had any problems with this.

There should be a slight performance gain since modprobe does not have to be called and kmod doesn't have to do anything. I think this might be a minimal gain. More importantly is the factor of memory me thinks. It must be faster if the support is in the kernel itself from the get go rather than having the module loaded off the hard drive when its needed. The thought of having only as much support for devices as i need appeals to me. I don't like the thought of a good portion of my kernel memory being set aside for code which I will never use. Its just not efficient. If anyone else can suggest better reasons as too which is the faster route then feel free to post.

distros usually have a visciously modular kernel so that out of the box, the kernel will support as much hardware as possible. This also means that there are numerous modules that are just not needed by the average user and hence why i suggest to most n00bs that they recompile their kernel (especially since one learns a lot though it may be a bit of a baptism by fire). It helps with the whole "my comp doesn't run v fast in linux, I love windows" thing. Not only will they learn about how the kernel is structured, how to compile things/symlink/move/copy/boot loader etc. but they will learn bout the structure of the computer itself. If you're learning to drive youre expected to learn the basics of the machine's workings (e.g. what gears/tyres are, how to change them, a bit about petrol, engines. Not in much detail, but enough to know how to drive the thing. Same with computers. Its a tool which you must learn how to learn; its not a hammer).

HTH, and sorry for the nattering.

Alex
 
  


Reply


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
looking for [kmod] rural Linux - Newbie 2 05-31-2005 12:30 AM
What is KMOD? apsn Slackware 2 03-05-2004 03:47 AM
Enabling Kmod Obscure Linux - Newbie 5 06-04-2003 10:37 AM
kmod failed jackopa Linux - General 0 04-13-2003 10:59 PM
How to get 'kmod' working X11 Linux - Hardware 2 07-21-2002 06:39 AM

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

All times are GMT -5. The time now is 08:32 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