How do i replace e1000 driver and autoload it?

Issues Related to Networking (Wired and Wireless)

Moderator: Moderators

How do i replace e1000 driver and autoload it?

Postby guillemp » Fri Apr 11, 2008 9:54

Hello !

I recently came across this problem with my new Intel Core 2 Quad on an Intel DP35DP motherboard.
After installing Sabayon PE 1.1 my (integrated in the motherboard) network device wasn't not recognized at all
(even though driver e1000 was loaded fine at boot). To make a long story shot, i unloaded e1000 driver and compiled and loaded Intel's e1000 driver and it worked.

I now just would like to know how to make this changes permanent, so that i don't have to unload / load / configure the network card manually every time i boot.

Unfortunately i read Gentoo's excellent manual, and did as recommended there and modified /etc/modules.conf... Don't do that !! i didn't see the the warning note inside that file asking you to NOT change it, and somehow lost my X server at next reboot. So i reinstalled Sabayon PE 1.1

Now, what i need to know is the "Sabayon" way of unloading e1000 driver, loading Intel's e1000 and configuring the network (not only the IP, but the DNS too and the default gateway) at every boot without having to write myself at console every time i boot:

/sbin/rmmod e1000
/sbin/ismod /lib/modules/<KERNEL VERSION>/kernel/drivers/net/e1000/e1000.ko
/sbin/ifconfig eth0 192.168.0.6 up
/sbin/route add default gw 192.168.0.1
(and of course including my DNS servers inside /etc/resolv.conf (or was it /etc/nameserver?))

Any instructions? Please, don't point me to Gentoo's handbook, because there they recommended me to modify /etc/modules.conf manually which somehow broke my X configuration so the graphics server wasn't working at next reboot.

Thank you very much !


Here goes the detailed explanation of how did i remove the malfunctioning e1000 kernel module and loaded Intel's one (just if you're curious about):

I only was able to see the Loopback interface when i did /sbin/ifconfig -a

So i went to Intel's web site and downloaded the e1000 network driver for my motherboard (here's their explanation: http://www.intel.com/support/network/sb/cs-009209.htm and the driver dowload for my motherboard http://downloadcenter.intel.com/Detail_ ... rdMap=2775 )

It was easy to manually remove the e1000 module which was loaded in the kernel and not working with

/sbin/rmmod e1000

And (after following instructions) i compiled Intel's driver (it was placed in /lib/modules/<KERNEL VERSION>/kernel/drivers/net/e1000/e1000.ko just like their README tells)

and was able to load it into the kernel using

/sbin/ismod /lib/modules/<KERNEL VERSION>/kernel/drivers/net/e1000/e1000.ko

without problems.

From there, i just configured my eth0 with
/sbin/ifconfig eth0 192.168.0.6 up
/sbin/route add default gw 192.168.0.1
(and of course including my DNS servers inside /etc/resolv.conf (or was it /etc/nameserver?))

Hope this helps and someone helps me with automatization of these tasks,

Thank you very much,

Guillem.
guillemp
Baby Hen
 
Posts: 5
Joined: Fri Oct 26, 2007 18:26

Re: How do i replace e1000 driver and autoload it?

Postby ioannidis007 » Sat Apr 12, 2008 15:05

You can register the commands needed to run the module/driver in services. Go to /etc/rc.d/init.d/ and create a bash script with the commands you want. It will autoload everytime you start your computer. You can do this by:
su
nano script

#!/bin/bash
/sbin/rmmod e1000
/sbin/insmod /lib/modules/<KERNEL VERSION>/kernel/drivers/net/e1000/e1000.ko
/sbin/ifconfig eth0 192.168.0.6 up
/sbin/route add default gw 192.168.0.1
##add whatever you want here...

Don't forget to make it global accessible and executable:
chmod 750 script

reboot and you are done! Now every time you start your computer these commands will be run automatically!
Image
"I am the man that will become the pirate king!" -Monkey D. Luffy
ioannidis007
Simple Hen
 
Posts: 52
Joined: Sat Nov 17, 2007 23:36

Re: How do i replace e1000 driver and autoload it?

Postby guillemp » Sat Apr 12, 2008 17:12

Hi ioannidis007,

i did as you suggested and it didn't work. Still the same problem and have to rmmod and modprobe to exchange e1000 driver. Maybe the script should be able to handle "start" and "stop" parameters (as, for instance, kudzu script that lies in that same folder) ?

Any other suggestion on why it's not working?

Thank you very much !

Guillem.
guillemp
Baby Hen
 
Posts: 5
Joined: Fri Oct 26, 2007 18:26

Re: How do i replace e1000 driver and autoload it?

Postby WarraWarra » Sat Apr 12, 2008 23:59

Have you tried the
# rc-update add net.eth0 default
or
# nano /etc/modules.autoload.d/kernel-2.6
and adding ?? e1000 to it if this is the correct wording to use ?

Both of these are in the gentoo handbook think chapter 7b or 7c and 8b or 8c about and explains how this can work.

The during boot it should autostart + dhcp and all the other stuff by default provided the unhappy modules has been killed and deleted or blacklisted ?
WarraWarra
Sagely Hen
 
Posts: 1989
Joined: Wed Jan 03, 2007 21:01
Location: 31.324270, -113.585511

Re: How do i replace e1000 driver and autoload it?

Postby guillemp » Mon Apr 21, 2008 14:57

I finally used the "noload=e1000" kernel option while boot. I changed my /boot/grub/grub.conf kernel configuration line to do that automatically at every boot.

I had already configured my network settings, and it seems that at some point during boot these required the kernel to load the correct e1000 driver which i had previously compiled and installed, so after booting i had a working network.

Just for your information, i had also tried to blacklist e1000 as suggested in sabayon IRC channel, but several methods of doing this that i tried did actually work. Only the "noload=e1000" kernel option did.

Thank you very much !

Guillem.
guillemp
Baby Hen
 
Posts: 5
Joined: Fri Oct 26, 2007 18:26


Return to Networking and Wireless

Who is online

Users browsing this forum: No registered users and 1 guest