I've got a problem with the driver for Realtek NICs.
I've built a remastered version of Tinycore 6.4 that is being used to build thin clients that connect to a WINSRV using rdesktop.
The hardware involved is using a realtek 81xx onboard chip (DevID: 8168).
Initially Tinycore did not even get an IP using dhcpclient with the standard driver (r8169).
I searched the internet and there are several sites offering solutions for this (known) problem:
https://unixblogger.com/2011/10/18/the-pain-of-an-realtek-rtl8111rtl8168-ethernet-card/The problem seems to be, that the r8169 driver in the open source tree claims to work for various device ids, but it doesn't.
As suggested I compiled my own driver using the sources from Realtek and added this driver to my modified version of Tinycore.
This worked for the machines I was using up to now.
A few days ago a tried to use this version on another machine and detected that no NIC was found (no interface configured).
This machine was using a Realtek NIC with device ID: 8167
I don't know exactly how the kernel determines which driver to use for a certain device, but my guess is that modules.alias is involved.
According the guide you should blacklist the orginial r8169 driver.
But this lead to the situation, that on the new machine NO driver was found. I took an unmodified version of Tinycore and retried
on the machine with the NIC ID8167. Now the NIC gets detected and it seems to work.
I did some greps to modules.alias
This is the output for grep r8169 for an unmodified Tinycore. (10EC seems to be RealTeks vendor id).
alias pci:v000010ECd00008169sv*sd*bc*sc*i* r8169
alias pci:v000010ECd00008168sv*sd*bc*sc*i* r8169
alias pci:v000010ECd00008167sv*sd*bc*sc*i* r8169
alias pci:v000010ECd00008136sv*sd*bc*sc*i* r8169
alias pci:v000010ECd00008129sv*sd*bc*sc*i* r8169
After compiling the driver from Realtek the relevant lines from modules.alias look like this:
alias pci:v000010ECd00008129sv*sd*bc*sc*i* r8169
alias pci:v000010ECd00008136sv*sd*bc*sc*i* r8169
alias pci:v000010ECd00008167sv*sd*bc*sc*i* r8169
alias pci:v000010EC
d00008168sv*sd*bc*sc*i* r8169
alias pci:v000010ECd00008169sv*sd*bc*sc*i* r8169
alias pci:v000010EC
d00008168sv*sd*bc*sc*i* r8168
alias pci:v000010ECd00008161sv*sd*bc*sc*i* r8168
Now we got two entries for the same device. This seems to be reason to blacklist the r8169.
But in this state the system won't detect any NICs with device id d00008167 (in my case) any more.
What is the correct way to deal with this problem?
- manually edit modules.alias?
- can you blacklist a driver only for a specific device id?
- is there a way to prevent a driver claiming to handle a specific device id?
- any other suggestions?