Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
02-02-2006, 09:42 PM
|
#1
|
Member
Registered: Jan 2006
Location: Dallas
Distribution: Slackware
Posts: 912
Rep: 
|
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?
|
|
|
02-02-2006, 10:31 PM
|
#2
|
Member
Registered: Nov 2004
Location: Columbus, Ohio
Distribution: Slackware-Current / Debian
Posts: 795
Rep:
|
I'd put the compiled file into /lib/modules/<kernel version>/...
You can put the insmod command in /etc/rc.d/rc.local
|
|
|
02-03-2006, 12:17 AM
|
#3
|
Senior Member
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145
Rep:
|
rc.local is a good choice, you also have rc.modules which is used to load modules as the name says 
|
|
|
02-03-2006, 05:54 AM
|
#4
|
Member
Registered: Nov 2004
Location: Columbus, Ohio
Distribution: Slackware-Current / Debian
Posts: 795
Rep:
|
Ah yes, rc.modules is the best place. I almost always compile drivers into the kernel 
|
|
|
02-04-2006, 12:05 AM
|
#5
|
Member
Registered: Jan 2006
Location: Dallas
Distribution: Slackware
Posts: 912
Original Poster
Rep: 
|
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.
|
|
|
02-04-2006, 02:13 AM
|
#6
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,224
|
if the insmod or modprobe command are not in those files then it should be in /etc/modprobe.conf. Something like that: so the module is loaded when eth0 is to be configured from /etc/rc.inet1
|
|
|
02-04-2006, 01:57 PM
|
#7
|
Member
Registered: Jan 2006
Location: Dallas
Distribution: Slackware
Posts: 912
Original Poster
Rep: 
|
bathory, the /etc/modprobe.conf and /etc/modules.conf are both empty files with 0 blocks.
I cut this from dmesg output:
sk98lin: Network Device Driver v8.23.1.3
(C)Copyright 1999-2005 Marvell(R).
PCI: Found IRQ 5 for device 00:0e.0
eth0: 3Com Gigabit LOM (3C940)
PrefPort:A RlmtMode:Check Link State
Then later in dmesg output I see this:
eth0: network connection up using port A
speed: 100
autonegotiation: yes
duplex mode: full
flowctrl: symmetric
irq moderation: disabled
scatter-gather: enabled
tx-checksum: enabled
rx-checksum: enabled
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.
|
|
|
02-04-2006, 05:45 PM
|
#8
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,224
|
Why don't you
Code:
grep sk98lin /etc/rc.d/rc.*
to see what file loads the module.
|
|
|
02-04-2006, 10:54 PM
|
#9
|
Member
Registered: Jan 2006
Location: Dallas
Distribution: Slackware
Posts: 912
Original Poster
Rep: 
|
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
here /lib/modules/2.4.31/kernel/drivers/net/sk98lin/sk98lin.o And as I mentioned before, /etc/modprobe.conf and /etc/modules.conf are empty files, but
Code:
modprobe -c | grep -i eth
finds alias eth0 off I 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
# modules.conf), then it should be loaded first:
if ! grep `echo ${1}: | cut -f 1 -d :`: /proc/net/dev 1> /dev/null ; then # no interface yet
if /sbin/modprobe -c | grep -w "alias ${1}" | grep -vw "alias ${1} off" > /dev/null ; then
echo "/etc/rc.d/rc.inet1: /sbin/modprobe ${1}" | $LOGGER
/sbin/modprobe ${1}
fi
I don't entirely understand that, but I'm wondering if this would result in a modprobe eth0 or something like that if the output from the 'modprobe -c' finds the 'alias eth0 off'?
Hey, I still totally clueless, but at least I'm learning a little bit about the initialization process.
|
|
|
02-05-2006, 04:11 AM
|
#10
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,224
|
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.
|
|
|
02-05-2006, 09:19 PM
|
#11
|
Member
Registered: Jan 2006
Location: Dallas
Distribution: Slackware
Posts: 912
Original Poster
Rep: 
|
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.
|
|
|
02-05-2006, 10:00 PM
|
#12
|
Senior Member
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145
Rep:
|
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
Last edited by gbonvehi; 02-05-2006 at 10:04 PM.
|
|
|
All times are GMT -5. The time now is 11:26 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|