LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
 
Search this Thread
Old 03-16-2011, 08:23 PM   #1
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: Austin, TX
Distribution: Mint-17.1 with Cinnamon & KDE
Posts: 1,399
Blog Entries: 3

Rep: Reputation: 86
contents of /etc/modules


Where do I find documentation on /etc/modules?

Specifically, I found a post that said to add "option" as a line
in this file. I cannot find any details about a module called "option" and my efforts to web search swim in an ocean of search results using the word "option".

The command modprobe --list tells me which modules are available (already built) for my current kernel. How do I discover what any given something.ko file does? The command modinfo whatever gives a geek dump, but is hardly descriptive or informative outside of kernel developer land.

Please help,
~~~ 0;-Dan

Last edited by SaintDanBert; 03-16-2011 at 08:40 PM.
 
Old 03-17-2011, 12:42 AM   #2
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,646
Blog Entries: 29

Rep: Reputation: 907Reputation: 907Reputation: 907Reputation: 907Reputation: 907Reputation: 907Reputation: 907Reputation: 907
Did you try Googling the following keywords?
Quote:
man /etc/modules.conf

And with 600+ posts you still don't know that /etc/modules has nothing to do with the desktops?

Last edited by TheIndependentAquarius; 03-17-2011 at 12:46 AM.
 
Old 03-17-2011, 10:33 AM   #3
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: Austin, TX
Distribution: Mint-17.1 with Cinnamon & KDE
Posts: 1,399
Blog Entries: 3

Original Poster
Rep: Reputation: 86
Quote:
Originally Posted by Anisha Kaul View Post
Did you try Googling the following keywords?
I'm trying to learn the features and functions and details about the module called "option". I have no idea about the thousands of ways that the keyword "option" appears in various web postings other than the first several screens of Google(tm) (I view 30 results per screen) had nothing meaningful.

Quote:
Originally Posted by Anisha Kaul View Post
And with 600+ posts you still don't know that /etc/modules has nothing to do with the desktops?
Exactly which LQ forum do you recommend for a question about kernel modules? I chose a forum where I expected (guessed) I might be most likely to get some useful answers.

Thanks for your time,
~~~ 0;-Dan
 
Old 03-17-2011, 11:51 AM   #4
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,157

Rep: Reputation: 333Reputation: 333Reputation: 333Reputation: 333
The is, of course, no module called "option." I suspect that you have misunderstood what you read, which you have reported as "add "option" as a line in this file." The post should, most likely, have said something like "Add the option in the /etc/modules.d/<module>.conf file," where "<module>" is the name of the kernel module for which you were to set the option.

The "geek-speak" you see when you do a modinfo <module> is, among other things, a list of the options you can set and the type of argument that each option accepts.

See man modprobe.conf for details of how the options are specified. Here is the section for that file about setting options:
Code:
options modulename option...
              This command allows you to add options to the module modulename (which might be an alias) every time
              it is inserted into the kernel: whether directly (using modprobe modulename or  because  the  module
              being inserted depends on this module.

              All  options  are  added together: they can come from an option for the module itself, for an alias,
              and on the command line.
 
Old 03-17-2011, 10:09 PM   #5
TheIndependentAquarius
Senior Member
 
Registered: Dec 2008
Posts: 4,646
Blog Entries: 29

Rep: Reputation: 907Reputation: 907Reputation: 907Reputation: 907Reputation: 907Reputation: 907Reputation: 907Reputation: 907
Quote:
Originally Posted by SaintDanBert View Post
Specifically, I found a post that said to add "option" as a line in this file.
Can you show us that post? It might help others to correct your misunderstanding.

Quote:
Originally Posted by SaintDanBert View Post
Exactly which LQ forum do you recommend for a question about kernel modules? I chose a forum where I expected (guessed) I might be most likely to get some useful answers.
http://www.linuxquestions.org/questi...nux-kernel-70/

and also for future use find time to scroll down this page and check out all the available options: http://www.linuxquestions.org/questions/

Last edited by TheIndependentAquarius; 03-17-2011 at 10:15 PM.
 
Old 03-18-2011, 08:35 AM   #6
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 656Reputation: 656Reputation: 656Reputation: 656Reputation: 656Reputation: 656
Moved: This thread is more suitable in Linux Kernel and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 03-18-2011, 08:41 AM   #7
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 656Reputation: 656Reputation: 656Reputation: 656Reputation: 656Reputation: 656
Take a look at the "modinfo" program. It lists what options a particular module supports.
Code:
/sbin/modinfo acpi_cpufreq
filename:       /lib/modules/2.6.37.1-1.2-desktop/kernel/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.ko
alias:          acpi
license:        GPL
description:    ACPI Processor P-States Driver
author:         Paul Diefenbaugh, Dominik Brodowski
srcversion:     513F747D3E9E884F1A0364A
depends:        processor,mperf
vermagic:       2.6.37.1-1.2-desktop SMP preempt mod_unload modversions 
parm:           acpi_pstate_strict:value 0 or non-zero. non-zero -> strict ACPI checks are performed during frequency changes. (uint)
The options are the parameters listed.
Code:
Module parameters can be specified in /etc/modprobe.conf.local, e.g. as:
 options <module name> <module options>
Also read the kernel-parameters.txt file in the kernel source Documentation directory. You may need to install a kernel-docs package for it.
Or you can google for it, but it may be for a different kernel version.

Last edited by jschiwal; 03-18-2011 at 10:09 AM.
 
Old 03-19-2011, 02:48 PM   #8
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: Austin, TX
Distribution: Mint-17.1 with Cinnamon & KDE
Posts: 1,399
Blog Entries: 3

Original Poster
Rep: Reputation: 86
Quote:
Originally Posted by PTrenholme View Post
The is, of course, no module called "option." I suspect that you have misunderstood what you read, which you have reported as "add "option" as a line in this file."
...
I disagree and submit this:
Code:
modprobe --list | grep -5 option
kernel/drivers/usb/serial/mos7840.ko
kernel/drivers/usb/serial/moto_modem.ko
kernel/drivers/usb/serial/navman.ko
kernel/drivers/usb/serial/omninet.ko
kernel/drivers/usb/serial/opticon.ko
kernel/drivers/usb/serial/option.ko
kernel/drivers/usb/serial/oti6858.ko
kernel/drivers/usb/serial/pl2303.ko
kernel/drivers/usb/serial/qcserial.ko
kernel/drivers/usb/serial/safe_serial.ko
kernel/drivers/usb/serial/siemens_mpi.ko
There is a module called "option".

Now what,
~~~ 0;-/ Dan
 
Old 03-19-2011, 02:52 PM   #9
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: Austin, TX
Distribution: Mint-17.1 with Cinnamon & KDE
Posts: 1,399
Blog Entries: 3

Original Poster
Rep: Reputation: 86
Quote:
Originally Posted by jschiwal View Post
Take a look at the "modinfo" program. It lists what options a particular module supports.
...
Thanks. Here is what I see:
Code:
prompt$  modinfo  option

filename:       /lib/modules/2.6.32-30-generic-pae/kernel/drivers/usb/serial/option.ko
license:        GPL
version:        v0.7.2
description:    USB Driver for GSM modems
author:         Matthias Urlichs <smurf@smurf.noris.de>
srcversion:     A11C240D4064C7CF71C68C6
alias:          usb:v211Fp6801d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0B3CpC000d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0681p004Ad*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0681p004Cd*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0681p0040d*dc*dsc*dp*ic*isc*ip*
...
alias:          usb:v0AF0p6300d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0AF0p6200d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0AF0p6100d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0AF0p6000d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0AF0p5000d*dc*dsc*dp*ic*isc*ip*
depends:        usbserial
vermagic:       2.6.32-30-generic-pae SMP mod_unload modversions 586TSC 
parm:           debug:Debug messages (bool)
 
Old 03-20-2011, 01:24 PM   #10
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,157

Rep: Reputation: 333Reputation: 333Reputation: 333Reputation: 333
O.K., I stand corrected.

So, according to the modinfo you posted, that's a USB Driver for GSM modems, so, if you have a GSM modem plugged into one of your USB ports, you want the "option" module loaded. (I still think that's a weird module name. )

Try the command su -c 'modprobe option' and tell us if that works. (Note that the driver is specific for the Ubuntu 2.6.32-30-generic-pae kernel. The uname -r command should tell you if that's the kernel you have.) If the modprobe command works, "option.ko" kernel module should be automatically loaded whenever you boot.

Oh, also from the modinfo output you posted, it look like the option driver has only option you can set: "debug," to print debugging messages.

<edit>
P.S. - This is not a response to the question you asked: "Where do I find documentation on /etc/modules?"
If you had asked "How do I install the option module in the kernel?" or, at least, given us the URL of the post to which you referred when you started this thread, or even told us that you were trying to get a USB modem working, our responses would, I think, have much more closely related to what you needed to know.

Note that Ubuntu does not use the (depreciated) /etc/modules.conf file for listing modules to be installed in the kernel.
</edit>

Last edited by PTrenholme; 03-20-2011 at 01:46 PM.
 
Old 03-21-2011, 09:24 AM   #11
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: Austin, TX
Distribution: Mint-17.1 with Cinnamon & KDE
Posts: 1,399
Blog Entries: 3

Original Poster
Rep: Reputation: 86
Quote:
Originally Posted by Anisha Kaul View Post
Can you show us that post? It might help others to correct your misunderstanding.
See this page:
http://ubuntuforums.org/showthread.php?t=1581804

~~~ 0;-Dan

PS/ Thanks to moderators for moving the thread.
 
Old 03-21-2011, 09:53 AM   #12
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: Austin, TX
Distribution: Mint-17.1 with Cinnamon & KDE
Posts: 1,399
Blog Entries: 3

Original Poster
Rep: Reputation: 86
Quote:
Originally Posted by PTrenholme View Post
O.K., I stand corrected.

So, according to the modinfo you posted, that's a USB Driver for GSM modems, so, if you have a GSM modem plugged into one of your USB ports, you want the "option" module loaded. (I still think that's a weird module name. )

Try the command su -c 'modprobe option' and tell us if that works. (Note that the driver is specific for the Ubuntu 2.6.32-30-generic-pae kernel. The uname -r command should tell you if that's the kernel you have.) If the modprobe command works, "option.ko" kernel module should be automatically loaded whenever you boot.
I used sudo modprobe option and got a simple prompt after the password dialog.
I then tried this:
Code:
prompt$ sudo modprobe -l | grep option

kernel/drivers/usb/serial/option.ko

prompt$
This looks like the module did, in fact, load up.
Quote:
Originally Posted by PTrenholme View Post
Oh, also from the modinfo output you posted, it look like the option driver has only option you can set: "debug," to print debugging messages.

<edit>
P.S. - This is not a response to the question you asked: "Where do I find documentation on /etc/modules?" If you had asked "How do I install the option module in the kernel?" or, at least, given us the URL of the post to which you referred when you started this thread, or even told us that you were trying to get a USB modem working, our responses would, I think, have much more closely related to what you needed to know.

Note that Ubuntu does not use the (depreciated) /etc/modules.conf file for listing modules to be installed in the kernel.
</edit>
I'm trying to follow details posted on the http://ubuntuforums.org/showthread.php?t=1581804 so I'm baffled that the details were not valid for *buntu... Then again, I shouldn't THAT be surprised at this sort of confusion.
{soapbox}
I appreciate the attempt to segregate those system start-up and configuration details that happen all the time (usually in /usr/lib somewhere) from per-system local "requests" to alter this standard behavior (typically /etc/somewhere). However, all of this is changing so much and so fast, and sadly is often different from distro to distro that much confusion and parochialism are often an unintended result.
{/soapbox}

~~~ 0;-Dan
 
Old 03-21-2011, 12:18 PM   #13
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,157

Rep: Reputation: 333Reputation: 333Reputation: 333Reputation: 333
A few of comments:
  1. The modprobe -l command simply list the module files present in the /lib/modules/`uname -r`/kernel/drivers directory. It's almost equivalent to find /lib/modules/`uname -r`/kernel/drivers/ -name *.ko. The point is, all it's telling you is that the driver exists in you drivers directories, not that it's loaded.
  2. To see if a driver is loaded, when the modprobe command returns without an error, run a dmesg | tail to see if the kernel said anything when the driver was installed.
  3. The command grep Live /proc/modules | cut -f1 -d' ' | sort will list, in alphabetical order, all the modules loaded in your system that are running.
The reason old posts may refer to depreciated methods is often because a distribution has moved to a more recent kernel release, and the newer kernel urges its users to "modernize" their methodology, or because the Linux developers have arrived, somehow, at a consensus. In the case of Ubuntu, since it is based in the Debian distribution, it often changes its methods when the Debian distribution changes.

The depreciation of the /etc/modules.conf file is part of a general Linux community consensus that each application or program should have its own configuration file or directory, and separable parts of that configuration should be in different files. This separates the configuration task into independent "objects" that can be changed (or not changed) independently of other parts of the configuration task. For example, instead of a single /etc/modules.conf file for all the modules being loaded (which need configuration settings), a /etc/modules.d directory is used which contains files for each module needing some special handling. (By default, Ubuntu populates that directory with kernel modules that have been "blacklisted," which a modules that you should not use. (Usually because they will cause your system fo crash.))
 
  


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
list contents of directory without listing contents baddah Linux - Newbie 2 06-12-2006 04:02 AM
FATAL: Could not load /lib/modules/2.6.14-default/modules.dep no such file exist dr_zayus69 Linux - Software 3 12-26-2005 06:44 PM
Re: modprobe: Note: /etc/modules.conf is more recent than lib/modules/2.4.9/modules.d Andy.M Linux - General 1 01-24-2002 01:50 AM
Re: modprobe: Note: /etc/modules.conf is more recent than lib/modules/2.4.9/modules.d Andy.M Linux - Newbie 2 01-24-2002 01:40 AM


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