LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 09-18-2006, 02:04 AM   #1
frankie_DJ
Member
 
Registered: Sep 2004
Location: NorCal
Distribution: slackware 10.1 comfy, Solaris10 learning
Posts: 232

Rep: Reputation: 30
"Conceptual" question about the start-up


OK, so I got a new network card and I'm trying to figure out how to install the driver for it, so I am looking in the /etc/rc.d/rc.modules. I wanted to find a file that loads the modules upon startup, and I guess this is supposed to be the one. But I don't understand how these modules get loaded, since all the /sbin/modprobe commands are commented out. I mean, even those that load the modules that I KNOW that are loaded. So there's gotta be another script file that loads stuff that are needed for my system, right?
Followup question: What is the file /etc/modules.conf for? It's empty, there is nothing in there.
Thanks.
 
Old 09-18-2006, 02:10 AM   #2
Thoreau
Senior Member
 
Registered: May 2003
Location: /var/log/cabin
Distribution: All
Posts: 1,167

Rep: Reputation: 45
/etc/modprobe.conf
/etc/modprobe.conf.local
/etc/modules.conf
/etc/conf.modules

Depends on the distro really, but you get the point. If there is nothing in your /etc/modules.conf file then you aren't probing for an alias after kernel load. The kernel loads modules dynamically at boot... unless you have the driver compiled into the kernel, which means it's part of the kernel and no longer a module, which means you wouldn't need to probe it because it was already there.

If you have a specific question about specific hardware, maybe that would be the best way to help.
 
Old 09-18-2006, 02:12 AM   #3
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Surely you have to uncomment the relevant lines in /etc/rc.d/rc.modules if you want particular modules to load? I had to uncomment the line for APM so that it loads when I boot..
 
Old 09-18-2006, 02:18 AM   #4
frankie_DJ
Member
 
Registered: Sep 2004
Location: NorCal
Distribution: slackware 10.1 comfy, Solaris10 learning
Posts: 232

Original Poster
Rep: Reputation: 30
Hi,
That was pretty quick, thanks. OK, so how do the right modules get loaded if all these files you mentioned are either empty or nonexistant and rc.modules has everything commented out?
 
Old 09-18-2006, 02:20 AM   #5
frankie_DJ
Member
 
Registered: Sep 2004
Location: NorCal
Distribution: slackware 10.1 comfy, Solaris10 learning
Posts: 232

Original Poster
Rep: Reputation: 30
Hi Nylex, that's what I'm talking about. It just so happens that both my old and my new network card modules are one above the other in th rc.modules, and both lines are commented. So how was my old card module getting loaded in the first place? Oh, and I know for a fact that I didn't hard-compile it in the kernel.

Last edited by frankie_DJ; 09-18-2006 at 02:24 AM.
 
Old 09-18-2006, 02:27 AM   #6
frankie_DJ
Member
 
Registered: Sep 2004
Location: NorCal
Distribution: slackware 10.1 comfy, Solaris10 learning
Posts: 232

Original Poster
Rep: Reputation: 30
Toreau, what do you mean by "probing for an alias after kernel load"? I notice that alsaconf put some lines with alias in the /etc/modprobe.conf. Why doesn't it use /sbin/modprobe?

Last edited by frankie_DJ; 09-18-2006 at 02:28 AM.
 
Old 09-18-2006, 02:56 AM   #7
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 51
If you don't modprobe the module manually most of the times hotplug loads the modules for you (there's a blacklist for hotplug too, just like the commented lines).
 
Old 09-18-2006, 03:04 AM   #8
frankie_DJ
Member
 
Registered: Sep 2004
Location: NorCal
Distribution: slackware 10.1 comfy, Solaris10 learning
Posts: 232

Original Poster
Rep: Reputation: 30
But I have hotplugging disabled. Also, if it is hotplug that loads those modules (by recognizing the hardware automatically I assume) does that mean it should recognize my new card too? I mean, surely it's not just plugging the card in the board, cause I did that and the card is not being recognized?
 
Old 09-18-2006, 03:05 PM   #9
frankie_DJ
Member
 
Registered: Sep 2004
Location: NorCal
Distribution: slackware 10.1 comfy, Solaris10 learning
Posts: 232

Original Poster
Rep: Reputation: 30
Can anyone pick this up?
 
Old 09-18-2006, 03:15 PM   #10
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 5,393

Rep: Reputation: Disabled
Perhaps your old network card's module is loaded in the file "/etc/rc.d/rc.netdevice" which the Slackware installer created for you if you allowed it to probe for a network card?

If you disabled hotplug, the module for that new card will not be loaded automatically - that is why people enable hotplug. You will need to find out (by examining the output of the command "lspci") what card you have if you do not yet know, and add an appropriate "modprobe" line to /etc/rc.d/rc.modules.

Eric
 
Old 09-18-2006, 03:50 PM   #11
frankie_DJ
Member
 
Registered: Sep 2004
Location: NorCal
Distribution: slackware 10.1 comfy, Solaris10 learning
Posts: 232

Original Poster
Rep: Reputation: 30
Hi Alien Bob,

Are you the same Alien from Alien's Wiki? That's an awesome Wiki, really good info.

You are right, it did ask me to probe for the card when I was configuring the network at the installation. I will look in that file when I get home.I know what my new card is. I just wanted to see, before changing any of the files, how was the old card module getting loaded.

So, are you saying that, if I enable hotplugging, the module for the new card will automatically be loaded upon startup?

I looked around those files and found that /etc/modprobe.conf was changed by the alsaconf, which added some lines with alias. How does that exactly load sound module? Why not use modprobe?

Thanks,
Frankie
 
Old 09-18-2006, 04:42 PM   #12
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 5,393

Rep: Reputation: Disabled
Quote:
Originally Posted by frankie_DJ
So, are you saying that, if I enable hotplugging, the module for the new card will automatically be loaded upon startup?
That is the function of hotplug, yes. It will lookup the correct module for your card and load it automatically.

Quote:
I looked around those files and found that /etc/modprobe.conf was changed by the alsaconf, which added some lines with alias. How does that exactly load sound module? Why not use modprobe?
The modprobe.conf file contains configuration info for the modprobe program. If any of your kernel modules needs special attention when it is loaded, you add the necessary stuff there (or add it in /etc/modules.conf if you run a 2.4 kernel, or in a file under /etc/modprobe.d/ once you run Slackware 11.0 and a 2.6 kernel).
The ALSA init script "/etc/rc.d/rc.alsa" parses the modprobe.conf file and loads the appropriate sound modules it finds there, using modprobe. The "alsaconfig" program wrote that information there, based on what hardware it found when probing your computer hardware.

Eric
 
Old 09-18-2006, 05:54 PM   #13
frankie_DJ
Member
 
Registered: Sep 2004
Location: NorCal
Distribution: slackware 10.1 comfy, Solaris10 learning
Posts: 232

Original Poster
Rep: Reputation: 30
Alien Bob,

You were right, I did find the line that loads my old netcard modules in the /etc/rc.d/rc.netdevice. Thanks.

Now, I turned on hotplugging, but it didn't detect my new card. I also tried manualy loading the module that I thougth was correct module for it

modprobe tulip
depmod -a
( the card is SFA110 10/100 Fast PCI Adapter, and the installation cd that comes with it says that this is the right module for linux).

I restarted inet1, couldn't get ip address.

I disabled rc.netdevices, restarted the computer, hotplug again didn't detect the card so I loaded the module manualy again. Again, no address.

Any suggestions what else could I try? Thanks.
 
Old 09-18-2006, 06:13 PM   #14
evilDagmar
Member
 
Registered: Mar 2005
Location: Right behind you.
Distribution: NBG, then randomed.
Posts: 480

Rep: Reputation: 31
Quote:
Originally Posted by frankie_DJ
Alien Bob,

You were right, I did find the line that loads my old netcard modules in the /etc/rc.d/rc.netdevice. Thanks.

Now, I turned on hotplugging, but it didn't detect my new card. I also tried manualy loading the module that I thougth was correct module for it

modprobe tulip
depmod -a
( the card is SFA110 10/100 Fast PCI Adapter, and the installation cd that comes with it says that this is the right module for linux).

I restarted inet1, couldn't get ip address.

I disabled rc.netdevices, restarted the computer, hotplug again didn't detect the card so I loaded the module manualy again. Again, no address.

Any suggestions what else could I try? Thanks.
OKay, that's just bizarre. It should have loaded the module unless something is disabled in your kernel (or hotplug/udev is disabled) or you're using a 2.4.x kernel.

With 2.6.x it works like this (and I'm explaining this so you'll understand how it really, really should have "just worked")...

When something with a PCI or USB bus is initialized, this generates an event which triggers the hotplug/udev stuff to go and scan that bus to get the list of all the devices on it. PCI and USB devices, unlike ISA/VLB devices, will report a pair of numbers that identify both the manufacturer of the product, as well as it's exact type (cheap-assed non-compliant Chinese USB webcams not withstanding). This allows the device to be looked up in the modmap tables (you'll see them under /lib/modules-`uname -r`) to find out exactly which driver is responsible for that device, at which point hotplug/udev goes and modprobes that module. The information in the modmap table is generated from a lot of places, but basically, most of the time you can see a device named when you do an `lspci` or `lsusb` if you have compiled the module that drives that particular device, it's going to have the necessary entries in the modmap tables because no one bothers to add stuff to pci.ids or usb.ids without marking it's product and vendor codes as belonging to whatever module can drive it, and Linux supports damn near everything now, so if someone knew about it, it's probably got a driver that will make it go, or someone's working on one.

Particularly for a tulip card, this should have "just worked". The other (older method) thing you can do is to break out the electric voodoo chalk and start drawing some circuits in /etc/modprobe.conf (for 2.6.x kernels) or /etc/modules.conf (for 2.4.x kernels) so that there are lines between the name "eth0" and the tulip module. The line "alias eth0 (modulename)" in there will cause the kernel to associate the eth0 device with the driver module cited, and will (after some internal deliberation) load that module before attempting to access the device. (I'm not being derogatory here. For some reason the alias directive has always struck me as being a strange form of sympathetic magic. "eth0 is now tulip, they are one and the same, (stabs device name with pin)" yadda yadda)
 
Old 09-18-2006, 06:25 PM   #15
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 5,393

Rep: Reputation: Disabled
Quote:
Originally Posted by frankie_DJ
Now, I turned on hotplugging, but it didn't detect my new card. I also tried manualy loading the module that I thougth was correct module for it

modprobe tulip
depmod -a
( the card is SFA110 10/100 Fast PCI Adapter, and the installation cd that comes with it says that this is the right module for linux).

I restarted inet1, couldn't get ip address.
How did you determine that the module was not loaded? Was it not listed in the output of
Code:
lsmod
? Did a new interface not appear in the output of
Code:
ifconfig -a
? Did you remove your old card? Did you configure your new card in /etc/rc.d/rc.inet1.conf ? Much is unclear.

Eric
 
  


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
newbie question: whats the difference between "su root", "su" and "su -&quo mojarron Slackware 9 12-07-2009 05:08 PM
"nv" to "nvidia" in xorg.conf causes X not to start jon2kx Ubuntu 10 09-05-2006 09:36 PM
Newbie question about "start" or so called menu syeronne Mandriva 2 12-05-2005 07:31 AM
Gnome "Start Menu" configuration question tisource Linux - Software 2 03-22-2005 12:35 PM
How to start KDE automaticlly without typing "startx" then "startkde" Jonescity Slackware 8 10-29-2004 10:32 PM


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