Friday, June 11, 2010

Making e1000e work on a small Linux appliance

Leave a Comment
I got a small appliance (x86 based desktop appliance) where I was installing our custom fedora 9 distribution. Everything was fine except that the

network card drivers failed to load.

lspci>
02:00.0 Ethernet controller: Intel Corporation Unknown device 10d3
03:00.0 Ethernet controller: Intel Corporation Unknown device 10d3
04:00.0 Ethernet controller: Intel Corporation Unknown device 10d3
05:00.0 Ethernet controller: Intel Corporation Unknown device 10d3

Checked that the e1000 and e1000e drivers are very old and are not getting loaded for the NICs this appliance has.
Mine was older that 7.2.xxx. And I should be running 8.xx for these NICs

Here is an excellent readme about how to do this: http://downloadmirror.intel.com/15817/eng/README.txt

Here is the summary:

1. Download latest code from Intel website. Search fro e1000 source and you will find the link

2. Build them. Ensure that you are building it on machine which has the same kernel version and type (UP/SMP).

3. You will get e1000.ko and e1000e.ko.

4. Copy these files to your target appliance at path /lib/modules//kernel/drivers/net/e1000 and

/lib/modules//kernel/drivers/net/e1000e .

5. For me the e1000e driver worked. So I am not very interested in e1000.

6. Now fire the command modprobe e1000e.

7. If you get an error like:
FATAL: Error inserting e1000e (/lib/modules/2.6.25-14.fc9.i686/kernel/drivers/ne
t/e1000e/e1000e.ko): Invalid module format

then go and check /var/log/message file.

If should have reported an error like :
kernel: e1000e: version magic '2.6.25 SMP mod_unload 686 4KSTACKS ' should be '2.6.25-14.fc9.i686 SMP mod
_unload 686 4KSTACKS '

Note: the version string (or to be specic the two version magic no. could be diferent as per your platform).

Now I dont see any different between the vermagic of my module and of this kernel. So simply I can use

modprobe--force to insert this module forcibily.

If you get the above error: fire modprobe --force e1000e.

NOte: Please know that if you see different in vermagic like completely different kernel version or a differet architecture,

you should recompile the modules on a matching kernel/architecture.

you can get vermagic of a module using 'modinfo | grep vermagic

9. To make this process automatic on every reboot I added following commands to rc.local

modprobe --force e1000e
service network restart

10. Thats it.

0 comments: