Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
possibly stupid question about module loading process
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
battra
Tux's lil' helper
Tux's lil' helper


Joined: 09 Nov 2004
Posts: 77

PostPosted: Wed Nov 10, 2004 4:40 am    Post subject: possibly stupid question about module loading process Reply with quote

What determines which modules get loaded at boot?

My /etc/modules.autoload.d/kernel-2.4 file is completely empty (using 2.4.x kernel). But, when I do an lsmod, I get the following:

Code:



# lsmod
Module                  Size  Used by    Not tainted
sg                     31356   0  (autoclean) (unused)
st                     27256   0  (autoclean) (unused)
sr_mod                 14616   0  (autoclean) (unused)
sd_mod                 11788   0  (autoclean) (unused)
scsi_mod               88164   4  (autoclean) [sg st sr_mod sd_mod]
tulip                  39232   1
snd-seq-midi            3392   0  (autoclean) (unused)
snd-seq-oss            26080   0  (unused)
snd-seq-midi-event      3456   0  [snd-seq-midi snd-seq-oss]
snd-seq                34864   2  [snd-seq-midi snd-seq-oss snd-seq-midi-event]
snd-pcm-oss            36520   0
snd-mixer-oss          12184   0  [snd-pcm-oss]
snd-es1968             14852   2
gameport                1388   0  [snd-es1968]
snd-pcm                55880   0  [snd-pcm-oss snd-es1968]
snd-timer              14596   0  [snd-seq snd-pcm]
snd-ac97-codec         48592   0  [snd-es1968]
snd-mpu401-uart         3264   0  [snd-es1968]
snd-rawmidi            13380   0  [snd-seq-midi snd-mpu401-uart]
snd-seq-device          3744   0  [snd-seq-midi snd-seq-oss snd-seq snd-rawmidi]
snd                    32196   2  [snd-seq-midi snd-seq-oss snd-seq-midi-event snd-seq snd-pcm-oss snd-mixer-oss snd-es1968 snd-pcm snd-timer snd-ac97-codec snd-mpu401-uart snd-rawmidi snd-seq-device]
snd-page-alloc          4716   0  [snd-seq-oss snd-seq snd-mixer-oss snd-es1968 snd-pcm snd-timer snd-rawmidi snd-seq-device snd]
soundcore               3588   7  [snd]
ieee1394              181316   0
input                   3264   0  (unused)
uhci                   25276   0  (unused)
usbcore                58156   1  [uhci]



Where is it configured that these modules get loaded if not autoload.d/kernel-2.4? I know how the alsa/oss/sound modules get loaded because I've activated alsa support at boot using rc-update. But, I'm not sure how the other modules are getting loaded.


Also, at boot, the following appears at the very very start (before hotplugging):

Code:

Loading modules....
::Scanning for usb-storage....module not found
::Scanning for ieee1394....module loaded
etc....


What is causing this "scan" to take place and why is the usb-storage module not found, but the ieee1394 module is found? If looking at /lib/modules, both modules exist, but only the ieee1394 is found:

Code:

# find /lib/modules/2.4.26-gentoo-r9/ -type f -iname '*.o' -or -iname '*.ko' |grep usb-storage
/lib/modules/2.4.26-gentoo-r9/kernel/drivers/usb/storage/usb-storage.o


# find /lib/modules/2.4.26-gentoo-r9/ -type f -iname '*.o' -or -iname '*.ko' |grep ieee1394
/lib/modules/2.4.26-gentoo-r9/kernel/drivers/ieee1394/ieee1394.o


Back to top
View user's profile Send private message
thecrazyperson_ws
Tux's lil' helper
Tux's lil' helper


Joined: 06 Apr 2004
Posts: 89

PostPosted: Wed Nov 10, 2004 9:25 am    Post subject: Reply with quote

I see that you have discovered the joys of Gentoo's initrd process. It likes to load a bunch of modules. A LOT of those modules that you may not explicitly load or wish to load are listed as dependencies in the modules that you do want, or are autodetected by either the initrd or hotplug. That's why most *nix systems run "depmod -a" before doing any module autoloading.

An example using the output of your lsmod command:

Module "gameport" is being loaded by module "snd-es1968" because snd-es1968 requests that gameport be loaded so you can have use of the gameport on your card.

Ok, that may not be a good example, but i believe it gets the point spoken. However, I recognize ieee1394, input, uhci, and usbcore as being detected in the initrd, so that's where they come from, and most of the other unrecognized ones are being done by hotplug.

EDIT: Oh ya, about the title... there is no such thing as a stupid question on here. There's always somebody out there who doesn't know how to do something, although to somebody who's used linux for a while that same thing might take them all of 5 seconds. I've asked a couple of really stupid questions myself, and most people on here are extremely helpful in answering questions. I myself didn't think your question was stupid because I was wondering the exact same thing about a month ago :P
_________________
Bevelle: Dual Athlon MP 2000+, 1.25G ram, 120G HD, Gentoo 2005.1-r1, Kernel 2.6.15-gentoo-r5

Gagazet: Pentium 2-266, 288M ram, 240G HD, currently installing gentoo

Besaid: p-150, 80M ram, win2k pro
Back to top
View user's profile Send private message
battra
Tux's lil' helper
Tux's lil' helper


Joined: 09 Nov 2004
Posts: 77

PostPosted: Wed Nov 10, 2004 6:40 pm    Post subject: Reply with quote

Excellent explanation. Much appreciated...thanks a lot. :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum