Network setup

Jim Cheetham jim at inode.co.nz
Mon Oct 4 08:13:09 UTC 2004


On Oct 4, 2004, at 7:25 PM, Jim Cheetham wrote:
> On Oct 4, 2004, at 4:23 PM, Travis Hagglund wrote:
>> The Ubuntu installer does not set up my network.
> Things I don't know at the moment - what network drivers are present 
> in the default kernel (I'm currently not on Ubuntu, so it's not easy 
> to check), and whether the 3c940 driver is present in the source.

OK, I've had a look in the kernel for network drivers, and the 3c940 
does not appear to be present. Also, it's not mentioned in the kernel 
sources (it looks like basically all possible drivers are already 
built).

If you would like to look yourself, try these terminal commands ...

$ COLUMNS=200 dpkg -l|grep linux-image
ii  linux-image-2.6.8.1-2-386          2.6.8.1-6      Linux kernel 
image for version 2.6.8.1 on 386.
ii  linux-image-2.6.8.1-2-k7           2.6.8.1-6      Linux kernel 
image for version 2.6.8.1 on AMD K7.

(I've installed the -k7 image on this machine, which isn't strictly 
necessary)

This tells me that we should be looking in the package 
"linux-image-2.6.8.1-2-386" to see what network drivers there are. 
'dpkg -L' will show a package contents - there are many lines of 
output, so I'll use 'grep' to reduce the output to the lines we're 
interested in ...

$ dpkg -L linux-image-2.6.8.1-2-386 | grep kernel/drivers/net/

There was over 200 lines of output from that command, so let's trim it 
down a little, by looking for 3com cards

$ dpkg -L linux-image-2.6.8.1-2-386 | grep kernel/drivers/net/ | grep 3c
/lib/modules/2.6.8.1-2-386/kernel/drivers/net/3c501.ko
/lib/modules/2.6.8.1-2-386/kernel/drivers/net/3c503.ko
/lib/modules/2.6.8.1-2-386/kernel/drivers/net/3c505.ko
/lib/modules/2.6.8.1-2-386/kernel/drivers/net/3c507.ko
/lib/modules/2.6.8.1-2-386/kernel/drivers/net/3c509.ko
/lib/modules/2.6.8.1-2-386/kernel/drivers/net/3c515.ko
/lib/modules/2.6.8.1-2-386/kernel/drivers/net/3c523.ko
/lib/modules/2.6.8.1-2-386/kernel/drivers/net/3c527.ko
/lib/modules/2.6.8.1-2-386/kernel/drivers/net/3c59x.ko
/lib/modules/2.6.8.1-2-386/kernel/drivers/net/pcmcia/3c574_cs.ko
/lib/modules/2.6.8.1-2-386/kernel/drivers/net/pcmcia/3c589_cs.ko
/lib/modules/2.6.8.1-2-386/kernel/drivers/net/tokenring/3c359.ko

No 3c940 in there, sorry :-( A quick Googling tells me that this is one 
of the nice new gigabit cards, you lucky person! However, it does 
suggest that the 'sk' module might run this card ... let's look for 
that ...

$ dpkg -L linux-image-2.6.8.1-2-386 | grep kernel/drivers/net/ | grep sk
/lib/modules/2.6.8.1-2-386/kernel/drivers/net/sk98lin
/lib/modules/2.6.8.1-2-386/kernel/drivers/net/sk98lin/sk98lin.ko
/lib/modules/2.6.8.1-2-386/kernel/drivers/net/skfp
/lib/modules/2.6.8.1-2-386/kernel/drivers/net/skfp/skfp.ko
/lib/modules/2.6.8.1-2-386/kernel/drivers/net/tokenring/skisa.ko

So there's a "sk98lin" and "skfp" module, neither sound quite right to 
me. You might try
$ sudo modprobe sk98lin

On my system, that produces an error message (FATAL: Error inserting 
sk98lin 
(/lib/modules/2.6.8.1-2-k7/kernel/drivers/net/sk98lin/sk98lin.ko): No 
such device) because I don't have the card.

Hopefully on your system, that will load up your card, and give you a 
network interface. Check the end of 'dmesg', and 'ifconfig' to see if 
it worked ...

$ dmesg | tail
$ ifconfig -a

(Interfaces lo and sit0 should be ignored - they're not going to help 
you)

Ahah! A little more googling shows up a Debian bug (#246380) that 
confirms, the 3c940 card should be using the sk98lin driver, so your 
'modprobe' command should work. Hopefully it will ;-)

Presuming that it does, you may have to force the sk98lin driver to be 
loaded when the system starts up, by adding it to the end of the 
'/etc/modules' file ...

$ sudo nano /etc/modules
Cursor down to the last line of the file, type "sk98lin" and press 
RETURN, then as per the instructions at the bottom, control-X, y, 
"RETURN" to save the file and exit.

Good luck!

-jim





More information about the ubuntu-users mailing list