LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-06-2004, 09:16 PM   #1
davidas
Member
 
Registered: Mar 2004
Distribution: Debian 'Sarge'
Posts: 168

Rep: Reputation: 30
Are modules automatically loaded when it is needed by the system?


Eg. If I complied my usb support as a module, will it automatically be loaded when needed by the system (ie. when I plug in a usb device) ?

Thanks!
 
Old 04-06-2004, 10:00 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
If hotplug support is compiled into the kernel
it should (if the basic chipset-driver is actually
loaded, that is). If you want to customise some
more what happens on load (like get hte load-order
right if there is one) use murasaki (usbmgr's
younger brother).

The alternative way is to use usbmgr... it will
pre-load usbcore and other modules and then
e.g. load sg.o if you plug in a camera or stick.

Both tools should (I've never used murasaki)
allow to mount to a specific mountpoint, for
instance (for usbmgr I can confirm this :}) ...



Cheers,
Tink
 
Old 04-06-2004, 10:02 PM   #3
davidas
Member
 
Registered: Mar 2004
Distribution: Debian 'Sarge'
Posts: 168

Original Poster
Rep: Reputation: 30
Thanks

In general, are modules loaded by the kernel automatically as and when they are needed during runtime/bootup or is it done manually?



Quote:
Originally posted by Tinkster
If hotplug support is compiled into the kernel
it should (if the basic chipset-driver is actually
loaded, that is). If you want to customise some
more what happens on load (like get hte load-order
right if there is one) use murasaki (usbmgr's
younger brother).

The alternative way is to use usbmgr... it will
pre-load usbcore and other modules and then
e.g. load sg.o if you plug in a camera or stick.

Both tools should (I've never used murasaki)
allow to mount to a specific mountpoint, for
instance (for usbmgr I can confirm this :}) ...



Cheers,
Tink
 
Old 04-06-2004, 10:07 PM   #4
vectordrake
Senior Member
 
Registered: Nov 2003
Location: NB,Canada
Distribution: Something alpha or beta, binary or source...
Posts: 2,280
Blog Entries: 4

Rep: Reputation: 47
Usually. If they don't play nice, you can force them if you need to most of the time by adding them to /etc/modules for 2.4.x kernels and /etc/modprobe.preload for 2.5.x and above. Be sure that USB hotplugging is selected and you'll have no problems with that (I don't leave my MS Sidewinder joystick plugged in, but its there when I plug it in)
 
Old 04-07-2004, 02:02 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
/me just decided to wipe the dust of his 3D Pro and see whether d1x will see it ;D


Cheers,
Tink
 
Old 04-07-2004, 06:36 PM   #6
davidas
Member
 
Registered: Mar 2004
Distribution: Debian 'Sarge'
Posts: 168

Original Poster
Rep: Reputation: 30
During the kernel customisation (make xconfig), I have Kernel Module Loader installed, which should load modules automatically as and when they are needed. I have a NIC that requires pcnet32.o to work and this driver is compiled as a module to the kernel. However, on bootup, this required module is not automatically loaded.

Although it does work after I manually added the module to /etc/modules, I'm curious as to why it wasn't automatically loaded by the Kernel Module Loader during bootup.

Thanks !
 
Old 04-07-2004, 10:31 PM   #7
vectordrake
Senior Member
 
Registered: Nov 2003
Location: NB,Canada
Distribution: Something alpha or beta, binary or source...
Posts: 2,280
Blog Entries: 4

Rep: Reputation: 47
The PCI hotplugging might not be picking it up. When I installed Mandrake 10beta2, I had that problem with my NIC. It loads now with CE, but I had to force it to work by puttting it in the /etc/modprobe.preload file.

What kernel are you using?
 
Old 04-07-2004, 11:04 PM   #8
davidas
Member
 
Registered: Mar 2004
Distribution: Debian 'Sarge'
Posts: 168

Original Poster
Rep: Reputation: 30
I'm using 2.4.25.

Quote:
Originally posted by vectordrake
The PCI hotplugging might not be picking it up. When I installed Mandrake 10beta2, I had that problem with my NIC. It loads now with CE, but I had to force it to work by puttting it in the /etc/modprobe.preload file.

What kernel are you using?
 
Old 04-08-2004, 07:00 AM   #9
vectordrake
Senior Member
 
Registered: Nov 2003
Location: NB,Canada
Distribution: Something alpha or beta, binary or source...
Posts: 2,280
Blog Entries: 4

Rep: Reputation: 47
try entering the name of the module in the /etc/modules file and see if it loads at boot then.
 
Old 04-08-2004, 05:30 PM   #10
davidas
Member
 
Registered: Mar 2004
Distribution: Debian 'Sarge'
Posts: 168

Original Poster
Rep: Reputation: 30
Yup, it works if I put the module in /etc/modules.

Thanks

Quote:
Originally posted by vectordrake
try entering the name of the module in the /etc/modules file and see if it loads at boot then.
 
Old 04-08-2004, 05:50 PM   #11
vectordrake
Senior Member
 
Registered: Nov 2003
Location: NB,Canada
Distribution: Something alpha or beta, binary or source...
Posts: 2,280
Blog Entries: 4

Rep: Reputation: 47
Sometimes you gotta give things a bit of a "push"
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
the ethernet card modules aren't loaded automatically exa Mandriva 2 05-20-2005 08:58 AM
how can a module be loaded automatically linjia Linux - Software 1 10-26-2004 10:38 AM
What modules loaded in a apache2 gianh Linux - Software 0 05-27-2004 07:31 AM
modules.conf - Cannot get modules to load automatically gundelgauk Linux - General 1 12-27-2003 11:27 PM
Removing automatically loaded modules Abe_the_Man Slackware 1 11-21-2003 01:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:35 PM.

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