Via-rhine and kernel 2.4.18 *grml*
Today I had to install a debian woody gateway. Everything was fine except the two network cards that use the via-rhine module. When modprobing via-rhine I always got error messages like this:
/lib/modules/2.4.18-1-686/kernel/drivers/net/via-rhine.o: init_module: No such device Hint: insmod errors can be caused by incorrect module parameters, including invalid IO or IRQ parameters /lib/modules/2.4.18-1-686/kernel/drivers/net/via-rhine.o: insmod /lib/modules/2.4.18-1-686/kernel/drivers/net/via-rhine.o failed /lib/modules/2.4.18-1-686/kernel/drivers/net/via-rhine.o: insmod via-rhine failed
After a lot of googling I found out that this problem is related to the 2.4.18 kernel *grml*. Fortunately I was able to find a weblog entry describing the solution.
Nevertheless I want to sum up what has to be done. First, get the kernel-headers and the source of the via-rhine driver:
apt-get install kernel-headers-2.4.18-bf2.4 cd /usr/src mkdir modules cd modules mkdir via-rhine cd via-rhine wget --passive ftp://ftp.scyld.com/pub/network/via-rhine.c wget --passive ftp://ftp.scyld.com/pub/network/pci-scan.* wget --passive ftp://ftp.scyld.com/pub/network/kern_compat.h wget --passive ftp://ftp.scyld.com/pub/network/Makefile
To compile the driver we can also use the Makefile, we just have to add the variable for the kernel-headers and to tell make only to compile via-rhine and pci-scan:
make KERN_INCLUDE=/usr/src/kernel-headers-2.4.18-1-686/include/ KERNVER=`uname -r` via-rhine.o make KERN_INCLUDE=/usr/src/kernel-headers-2.4.18-1-686/include/ KERNVER=`uname -r` pci-scan.o
Take care about the line breaks, sorry ’bout that.
Before we copy the new driver into the default location we try to load the module:
insmod mii insmod pci-scan.o insmod via-rhine.o
Note the .o after the last two modules! Don’t forget it, otherwise we will again load the original modules.
If everything is ok we can rename the original module and copy the new driver to the /lib/modules directory
cd /lib/modules/2.4.18-1-686/kernel/drivers/net/ mv via-rhine.o via-rhine.o.orig cp /usr/src/modules/via-rhine/pci-scan.o . cp /usr/src/modules/via-rhine/via-rhine.o . rmmod via-rhine rmmod pci-scan depmod modprobe via-rhine