LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 10-24-2006, 05:23 AM   #1
Akhran
Member
 
Registered: Aug 2005
Distribution: Debian 'lenny'
Posts: 208

Rep: Reputation: 30
How to load modules (with parameters) at boot time?


At commandline, I usually load moduleX manually with

# modprobe moduleX mode=1

where mode=1 is the parameter that must be loaded with moduleX.

Google abit and it seems that adding the name of the module into /etc/modules will load the module at boot time.

Is this the recommended method? Also, where do I put the parameter mode=1?

Thanks!
 
Old 10-24-2006, 05:42 AM   #2
SCerovec
Member
 
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware x86 and ARM and Porteus
Posts: 655

Rep: Reputation: 45
Cool modprobing and probe-modding...


I beleive it's actually the insmod command that accepts module-parameters, not the modprope one.

Secondly, You put aliases in modprobe.conf and the parameters for a module as follows:

options <module_name_here> <options_here>

the options are cleverly hidden from you in the output of the cryptic command named:
# modinfo <module_name_here>
and these are commonly more acurate than the documentation sometimes...

BTW
the modprobe command uses the parameters from modprobe.conf, so if you whant to override them use insmod instead...

Last edited by SCerovec; 10-24-2006 at 05:46 AM.
 
Old 10-24-2006, 02:02 PM   #3
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 3,513

Rep: Reputation: 64
Quote:
Originally Posted by Akhran
At commandline, I usually load moduleX manually with

# modprobe moduleX mode=1

where mode=1 is the parameter that must be loaded with moduleX.

Google abit and it seems that adding the name of the module into /etc/modules will load the module at boot time.

Is this the recommended method? Also, where do I put the parameter mode=1?

Thanks!
If running a 2.6 kernel create a file in the /etc/modprobe.d/ directory with the contents for your example above.

Code:
options moduleX mode=1
Then when the module get loaded the option will be used for a 2.4 kernel put the options line in the file /etc/modutils/aliases then you run update-modules to have the information entered into the /etc/modules.conf. Now this usually has an alias line that goes with it for example with my TV card if using a 2.4 kernel I would put something like this in the file.

Code:
alias char-major-80-0 cx88xx
options cx88xx card=13
This tells the system that the video device is using the cx88xx module and that when modprobing use the option card=13 to set the card properly.
 
Old 10-25-2006, 08:08 AM   #4
Akhran
Member
 
Registered: Aug 2005
Distribution: Debian 'lenny'
Posts: 208

Original Poster
Rep: Reputation: 30
What is the purpose of putting the alias statement (ie. alias char-major-80-0 cx88xx)?

Would it work with just putting the options statement in the file?

Thanks!

Quote:
Originally Posted by HappyTux
If running a 2.6 kernel create a file in the /etc/modprobe.d/ directory with the contents for your example above.

Code:
options moduleX mode=1
Then when the module get loaded the option will be used for a 2.4 kernel put the options line in the file /etc/modutils/aliases then you run update-modules to have the information entered into the /etc/modules.conf. Now this usually has an alias line that goes with it for example with my TV card if using a 2.4 kernel I would put something like this in the file.

Code:
alias char-major-80-0 cx88xx
options cx88xx card=13
This tells the system that the video device is using the cx88xx module and that when modprobing use the option card=13 to set the card properly.
 
Old 10-25-2006, 08:37 AM   #5
SCerovec
Member
 
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware x86 and ARM and Porteus
Posts: 655

Rep: Reputation: 45
Cool try!

Quote:
Originally Posted by Akhran
What is the purpose of putting the alias statement (ie. alias char-major-80-0 cx88xx)?

Would it work with just putting the options statement in the file?

Thanks!

That's what's Linux all about,
Try and see what happens...
 
Old 10-25-2006, 01:20 PM   #6
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 3,513

Rep: Reputation: 64
Quote:
Originally Posted by Akhran
What is the purpose of putting the alias statement (ie. alias char-major-80-0 cx88xx)?

Would it work with just putting the options statement in the file?

Thanks!
The alias tells the system what is using the device most times I have ever used/seen it in use the alias is there with the option line on a 2.4 kernel now using a 2.6 kernel then you just create a file as mentioned above and put the option in it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Editing default module parameters at boot time icpsvt Linux - General 3 02-11-2006 08:03 PM
load modules at boot coldsalmon Linux - Newbie 4 04-21-2005 05:36 PM
Load modules at boot martincho Linux - Networking 2 11-27-2004 11:12 AM
Modules don't seem to load on boot ViNsAniTy Linux - Newbie 4 04-21-2004 01:40 PM
modules dont load at boot time killer_bunny Linux - General 1 12-23-2003 11:59 PM


All times are GMT -5. The time now is 07:00 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration