[Fwd: Re: [NTLUG:Discuss] modules files]

Greg Edwards greg at nas-inet.com
Wed Jan 29 12:29:01 CST 2003



-------- Original Message --------
Subject: Re: [NTLUG:Discuss] modules files
Date: Wed, 29 Jan 2003 12:14:46 -0600
From: "Darin W. Smith" <dsmith at softwareremodeling.com>
Reply-To: dsmith at softwareremodeling.com
Organization: SRI Product Development
To: Greg Edwards <greg at nas-inet.com>

Once again, if you could forward to the list, I would appreciate it.

I may have mis-stated slightly and convey'ed the wrong meaning. 
modules.conf, I
believe, is a set of rules for insmod, rmmod, and modprobe to follow.
/etc/modules is simply a "I want the kernel to be sure to load these on 
boot."
For example, if you compiled init ramdisk support as a module, the 
kernel would
have to be told somewhere that it needed to load that module to be able 
to use
initial ramdisk.

Some of your init scripts may do modprobe's or insmod's on their own (for
example, when you start networking, it may do a "modprobe eth0".
/etc/modules.conf will tell modprobe which module to actually load for 
"eth0".
This gives a lot of flexibility to the init scripts...they don't have to be
written to handle every possible hardware combination, just "generic" 
device
types, which modules.conf decodes for it.

This also helps automagic distribution installers / admin tools...for 
example,
if you add a new ethernet card, your distrobution might run a new hardware
detection program (like kudzu) on startup, and add what it finds as 
aliases in
modules.conf, so the other init scripts can handle it.

On the other hand, suppose I don't have an init script that starts my TV 
card.
In that case, I explicitly added it to my /etc/modules, and I'm 
guaranteed that
it will automatically be loaded at boot-time, no fuss, no muss...

If I had an init script that handled v4l devices, then it could 'start' 
all the
char-major-81 stuff, and the lines in modules.conf would help it out.

My /etc/modules has something like:

sd_mod
usb-storage
scsi_hostadapter
ide-floppy
ide-cd ignore=\"hde hdg\"
bttv

My /etc/modules.conf has something like:
alias usb-interface usb-uhci
alias sound-slot-0 emu10k
probeall scsi_hostadapter ide-scsi
alias eth0 tulip
alias sound-slot-1 audio
alias char-major-89 i2c-dev
post-install pwc /sbin/insmod --force /lib/modules/usb/pwcx-i386.o > 
/dev/null
2> &1 ||:
options scanner vendor=0x4a9 product=0x2207
#bttv
alias char-major-81 videodev
alias char-major-81-0 bttv

alias /dev/nvidia* nvidia

--Darin

1/29/2003 11:30:12 AM, Greg Edwards <greg at nas-inet.com> wrote:

 >Darin W. Smith wrote:
 >> I can't post to the list from work, so I'll send the answer to you 
directly.
 >>
 >> /etc/modules specifies the modules to load at boot-time.
 >>
 >> /etc/modules.conf specifies rules for when to auto-load a 
module...such as
when
 >> a particular class of device is detected by the kernel.  It will 
look for a
 >> match in modules.conf and automatically load the specified module. 
You can
also
 >> specify pre-load and post-load rules for modules there.
 >>
 >> --Darin
 >>
 >> 1/29/2003 9:24:25 AM, Greg Edwards <greg at nas-inet.com> wrote:
 >>
 >>
 >>>What is the difference between /etc/modules and /etc/modules.conf
 >>>
 >>>I've never really understood the difference between these files.
 >>>
 >>>--
 >>>Greg Edwards
 >
 >So if you've got a device driver that needs to control something like
 >your NIC it'll be best to put it in modules and not modules.conf?  Then
 >why does the distro put so many modules in modules.conf as aliases?
 >
 >--
 >Greg Edwards
 >New Age Software, Inc.
 >http://www.nas-inet.com
 >
 >
 >
Regards,

Darin W. Smith, 972-758-9349
Software Systems Consultant
  ___ ___ ___
/ __| _ \_ _|
\__ \   /| |   SRI Product Development
|___/_|_\___|




-- 
Greg Edwards
New Age Software, Inc.
http://www.nas-inet.com




More information about the Discuss mailing list