How to load a network driver during boot?
I installed Slackware 10.2 on /dev/hda3. My ABIT KV8-MAX3 system has a builtin gigabit NIC from 3COM. I think it is a 3C940. Fedora recognizes it and supports it, but there doesn't appear to be support for this card in Slackware.
I downloaded the 3c2000 driver source from 3COM and compiled it. I've got a 3c2000.o driver module now that I'd like to load during boot up. I think I need to put the driver binary somewhere and add an INSMOD instruction somewhere in one of the rc initialization scripts in /etc, but I don't know where to put it. So, where should I put the driver? What is the insmod command I need to use, and where do I put it? |
I'd put the compiled file into /lib/modules/<kernel version>/...
You can put the insmod command in /etc/rc.d/rc.local |
rc.local is a good choice, you also have rc.modules which is used to load modules as the name says :)
|
Ah yes, rc.modules is the best place. I almost always compile drivers into the kernel ;)
|
I downloaded the latest version of the SK98LIN driver from the 3Com driver downloads web site. It came with an installation shell script that I ran. It compiled the driver source and stuck the object module in /lib/modules/2.4.31/kernel/drivers/net/sk98lin
I can't see where the install script stuck an insmod command anywhere to load the driver, but the eth0 interface now comes up during boot. It's not in rc.local or rc.modules. So I don't understand exactly why it works, but it does. If anyone could explain it to me, I'd love understand why it works without the insmod. |
if the insmod or modprobe command are not in those files then it should be in /etc/modprobe.conf. Something like that:
Code:
alias eth0 sk98lin |
bathory, the /etc/modprobe.conf and /etc/modules.conf are both empty files with 0 blocks.
I cut this from dmesg output:
Then later in dmesg output I see this:
I want the speed to be set to 1000, so I think I need to issue an ifconfig or set an option on the modprobe or insmod somewhere during boot up. That's another reason why I'd like to track down how and where the driver is being loaded during boot. |
Why don't you
Code:
grep sk98lin /etc/rc.d/rc.* |
That grep for sk98lin didn't turn up anything, bathory.
The installation shell script for the driver compiled several programs extracted from the driver tar file then linked them as module sk98lin.o. I found it using Code:
find / -type f -name sk98lin.o -print /lib/modules/2.4.31/kernel/drivers/net/sk98lin/sk98lin.oAnd as I mentioned before, /etc/modprobe.conf and /etc/modules.conf are empty files, but Code:
modprobe -c | grep -i eth alias eth0 offI just don't know where all the configuration settings for modprobe come from if not from /etc/modprobe.conf. Anyway, then I found this logic in /etc/rc.d/rc.inet1 Code:
# If the interface isn't in the kernel yet (but there's an alias for it in Hey, I still totally clueless, but at least I'm learning a little bit about the initialization process. |
If it's none of these methods, then it should be hotplug. So check under /etc/hotplug for a net.agent script which controls the network interface.
|
Could be, but the eth0 messages come out before any messages about hotplugging in dmesg output.
I think I will modify rc.inet1 and rc.hotplug to write some messages during boot up so I can see where they are invoked relative to the eth0 messages... Will let you know how it goes. |
Maybe it's recognized first as a PCI device, then hotplug loads the driver for it. Try adding the module on hotplug blacklist to see if it comes up: /etc/hotplug/blacklist
|
All times are GMT -5. The time now is 08:43 PM. |