linux-admin.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* hi
@ 2003-01-22 16:29 Sadanapalli, Pradeep Kumar (MED, TCS)
  2003-01-22 19:06 ` hi Glynn Clements
  0 siblings, 1 reply; 5+ messages in thread
From: Sadanapalli, Pradeep Kumar (MED, TCS) @ 2003-01-22 16:29 UTC (permalink / raw)
  To: 'linux-admin@vger.kernel.org'

Hi Friends,
I have compiled a module, which I am able to load by "insmod mymodule.o"
.But I don't want to do that all the time. 
I would like my module to be automatically loaded at boot time. Can
anyone please tell me clearly how to use
depmod and modprobe utilities to achieve this?

Thanks in advance
Pradeep

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: hi
  2003-01-22 16:29 hi Sadanapalli, Pradeep Kumar (MED, TCS)
@ 2003-01-22 19:06 ` Glynn Clements
  2003-01-23 18:05   ` hi Xavier
  0 siblings, 1 reply; 5+ messages in thread
From: Glynn Clements @ 2003-01-22 19:06 UTC (permalink / raw)
  To: Sadanapalli, Pradeep Kumar (MED, TCS)
  Cc: 'linux-admin@vger.kernel.org'


Sadanapalli, Pradeep Kumar (MED, TCS) wrote:

> I have compiled a module, which I am able to load by "insmod mymodule.o"
> .But I don't want to do that all the time. 
> I would like my module to be automatically loaded at boot time. Can
> anyone please tell me clearly how to use
> depmod and modprobe utilities to achieve this?

It depends upon what function the module serves. If it is a network
interface driver, then putting:

	alias eth0		mymodule

into modules.conf will cause it to be loaded when eth0 is configured. 
Similarly, if it is a character device driver for major number 231,
then putting:

	alias char-major-231	mymodule

into modules.conf will cause it to be loaded when a process accesses a
character device with major number 231. Simlar mechanisms exist for
other specific "types" of driver.

You can locate the places where the kernel will attempt to autoload a
module by searching for "request_module" in the kernel source code.

If your module doesn't fit any known type, or you specifically want it
to be loaded at boot rather than on demand, then the simplest solution
is probably to just add a modprobe command to the rc.local script.

-- 
Glynn Clements <glynn.clements@virgin.net>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: hi
  2003-01-22 19:06 ` hi Glynn Clements
@ 2003-01-23 18:05   ` Xavier
  2003-01-23 20:06     ` hi Glynn Clements
  0 siblings, 1 reply; 5+ messages in thread
From: Xavier @ 2003-01-23 18:05 UTC (permalink / raw)
  To: linux-admin

On Wed, Jan 22, 2003 at 07:06:44PM +0000, Glynn Clements wrote:
> 
> Sadanapalli, Pradeep Kumar (MED, TCS) wrote:
> 
> (...)
> 
> If your module doesn't fit any known type, or you specifically want it
> to be loaded at boot rather than on demand, then the simplest solution
> is probably to just add a modprobe command to the rc.local script.
> 

Or add the name of the module to /etc/modules which should contain "the
names of kernel modules that are to be loaded at boot time" (at least in
debian - don't remember if this is debian specific, take a look at
your init.d modutils script to see if it reads modules names from this 
file)

Xavier

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: hi
  2003-01-23 18:05   ` hi Xavier
@ 2003-01-23 20:06     ` Glynn Clements
  2003-01-24  0:19       ` hi Andrew B. Cramer
  0 siblings, 1 reply; 5+ messages in thread
From: Glynn Clements @ 2003-01-23 20:06 UTC (permalink / raw)
  To: linux-admin


Xavier wrote:

> > If your module doesn't fit any known type, or you specifically want it
> > to be loaded at boot rather than on demand, then the simplest solution
> > is probably to just add a modprobe command to the rc.local script.
> 
> Or add the name of the module to /etc/modules which should contain "the
> names of kernel modules that are to be loaded at boot time" (at least in
> debian - don't remember if this is debian specific,

I'm fairly sure that it is. At least, RedHat 6.2 doesn't have it, and
the last time that I used Slackware, that didn't have it (although it
did have rc.modules).

In general, anything that relies upon the init configuration (i.e. 
inittab, and scripts which are run from it) should be assumed to be
distribution-specific unless there is evidence to the contrary.

OTOH, the use and semantics of modules.conf (aka conf.modules) is
built into modprobe, and so is likely to be applicable to all
distributions.

-- 
Glynn Clements <glynn.clements@virgin.net>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: hi
  2003-01-23 20:06     ` hi Glynn Clements
@ 2003-01-24  0:19       ` Andrew B. Cramer
  0 siblings, 0 replies; 5+ messages in thread
From: Andrew B. Cramer @ 2003-01-24  0:19 UTC (permalink / raw)
  To: Glynn Clements, linux-admin


I think the file you are looking for is /etc/modules.conf in 
slackware.

root@home:~# cd /etc
root@home:/etc# ls modules.conf
modules.conf
root@home:/etc# cat modules.conf
alias net-pf-4 off      # we won't use PF IPX
alias net-pf-5 off      # we won't use PF AppleTalk
root@home:/etc#

That was created by default. I still running Slackware-3.x (4,5,6 I 
can't remember).

Best - Andrew

On 23 Jan 2003 at 20:06, Glynn Clements wrote:

> 
> Xavier wrote:
> 
> > > If your module doesn't fit any known type, or you specifically want it
> > > to be loaded at boot rather than on demand, then the simplest solution
> > > is probably to just add a modprobe command to the rc.local script.
> > 
> > Or add the name of the module to /etc/modules which should contain "the
> > names of kernel modules that are to be loaded at boot time" (at least in
> > debian - don't remember if this is debian specific,
> 
> I'm fairly sure that it is. At least, RedHat 6.2 doesn't have it, and
> the last time that I used Slackware, that didn't have it (although it
> did have rc.modules).
> 
> In general, anything that relies upon the init configuration (i.e. 
> inittab, and scripts which are run from it) should be assumed to be
> distribution-specific unless there is evidence to the contrary.
> 
> OTOH, the use and semantics of modules.conf (aka conf.modules) is
> built into modprobe, and so is likely to be applicable to all
> distributions.
> 
> -- 
> Glynn Clements <glynn.clements@virgin.net>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-admin" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-01-24  0:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-22 16:29 hi Sadanapalli, Pradeep Kumar (MED, TCS)
2003-01-22 19:06 ` hi Glynn Clements
2003-01-23 18:05   ` hi Xavier
2003-01-23 20:06     ` hi Glynn Clements
2003-01-24  0:19       ` hi Andrew B. Cramer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).