LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 08-18-2005, 02:53 PM   #1
endfx
Member
 
Registered: May 2003
Location: Canada
Distribution: Debian
Posts: 105

Rep: Reputation: 15
Modules Loading


I'm confused on how linux knows what modules to load during boot up?
Is there a list somewhere,

or does it just detect hardware during startup and then load the module based on what hardware it detected

or is this distribution dependent?

Thanks.
 
Old 08-18-2005, 03:33 PM   #2
mjrich
Senior Member
 
Registered: Dec 2001
Location: New Zealand
Distribution: Debian
Posts: 1,046

Rep: Reputation: 45
Re: Modules Loading

Quote:
I'm confused on how linux knows what modules to load during boot up?
Is there a list somewhere
Yes -- at /etc/modules. If you wish to ensure that a module is always loaded at boot time, then the simplest thing to do is to append it to this file. In addition however, further modules may be loaded at each run level (grepping through /etc/init.d for 'modprobe' should give an idea of which ones these are).

Quote:
or does it just detect hardware during startup and then load the module based on what hardware it detected, or is this distribution dependent?
Yes, and yes . Typically, a package such as 'discover' (Debian) may load additional modules, depending on the hardware it believes it has detected.

Cheers,

mj
 
Old 08-18-2005, 03:34 PM   #3
Half_Elf
LQ Guru
 
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Rep: Reputation: 46
can I answer "all of the above" ? :P

well... most distribution have a list in /etc, but not the all distro use the same. There is usually always a file named "modules.conf" (if I remember right? I'm not on a linux box right now) that contains some "alias". This usually tell the kernel to load the module "foo" when it need "eth0" as example (eth0 is a network card of course) or "alsa-whatever-modules" when it need "sound-card-1".

Some distro also have some other ways. As example my Gentoo has a file in /etc/modules-autoload.d (or whatever the name once again) named "kernel-2.6" or "kernel-2.4". This list contains a list of module to modprobes at the end of boot. But this is distro specific, as I said. It's possible that Fedora/Mandrake have another way.

And of course... the kernel always "try" to find the module by itself, but it rarely works (that's what alias are for)
 
  


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
loading modules danimalz Debian 2 10-18-2005 10:22 PM
Loading modules error after loading compiled kernel td0l2 Linux - Newbie 12 07-28-2004 11:10 AM
loading modules priller Linux - Newbie 1 06-03-2004 09:09 AM
modules are loading that shouldn't in my rc.modules thrice Slackware 3 05-11-2004 10:35 PM
loading modules w/o rc.modules e1000 Slackware 3 01-09-2004 02:57 AM

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

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