View previous topic :: View next topic |
Author |
Message |
Gentree Watchman
![Watchman Watchman](/images/ranks/rank-G-2-watchman.gif)
![](images/avatars/1364161114417d616b9645b.jpg)
Joined: 01 Jul 2003 Posts: 5350 Location: France, Old Europe
|
Posted: Sun Sep 12, 2010 12:37 pm Post subject: udev cant match realtek NIC [SOLVED: rules file ordering] |
|
|
Code: | lspci:
01:06.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
bash-4.1#lsmod|grep 8139
8139cp 14513 0
8139too 15134 0
|
udevadm trigger produces the following in /var/log/messages:
Code: |
Sep 12 14:16:01 linbox rc-scripts: net.eth1 is not allowed to be hotplugged
|
using udev rule:
Code: |
cat 10-local.rules |grep -e ^[^#]
KERNEL=="eth*", ACTION=="add", DRIVERS=="forcedeth", NAME="eth_mobo"
KERNEL=="eth*", ACTION=="add", DRIVERS=="3c59x", NAME="eth_emb"
KERNEL=="eth*", ACTION=="add", DRIVERS=="e100", NAME="eth_pci"
KERNEL=="eth*", ACTION=="add", DRIVERS=="8139cp", NAME="eth_real"
|
Code: | rmmod 8139cp
rmmod 8139too
udevadm trigger |
produces the following:
Code: | Sep 12 14:32:54 linbox kernel: 8139too Fast Ethernet driver 0.9.28
Sep 12 14:32:54 linbox kernel: 8139too 0000:01:06.0: PCI INT A -> Link[APC3] -> GSI 18 (level, high) -> IRQ 18
Sep 12 14:32:54 linbox kernel: eth0: RealTek RTL8139 at 0xc000, 00:08:a1:73:74:e9, IRQ 18
Sep 12 14:32:54 linbox kernel: 8139cp: 10/100 PCI Ethernet driver v1.3 (Mar 22, 2004)
Sep 12 14:32:54 linbox kernel: udev: renamed network interface eth0 to eth1
Sep 12 14:32:54 linbox rc-scripts: net.eth1 is not allowed to be hotplugged |
eth1 is blocked in /etc/conf.d/rc to stop unmatched cards from lauching dhcp on boot and screwing up resolv.conf.
So the expected module is loaded for that nic . Why doesn't udev match the rule and rename it eth_real instead of the unconfigured eth1 ??
TIA, Gentree. ![Cool 8)](images/smiles/icon_cool.gif) _________________ Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86
Last edited by Gentree on Sun Sep 12, 2010 5:50 pm; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
krinn Watchman
![Watchman Watchman](/images/ranks/rank-G-2-watchman.gif)
![](images/avatars/gallery/Blade Runner/movie_blade_runner_howl.gif)
Joined: 02 May 2003 Posts: 7470
|
Posted: Sun Sep 12, 2010 1:10 pm Post subject: |
|
|
oh you again
because of the rule ?
Code: | KERNEL=="eth*", ACTION=="add", DRIVERS=="8139cp", NAME="eth_real" |
and the
Code: | Sep 12 14:32:54 linbox kernel: 8139too Fast Ethernet driver 0.9.28
Sep 12 14:32:54 linbox kernel: 8139too 0000:01:06.0: PCI INT A -> Link[APC3] -> GSI 18 (level, high) -> IRQ 18
Sep 12 14:32:54 linbox kernel: eth0: RealTek RTL8139 at 0xc000, 00:08:a1:73:74:e9, IRQ 18
Sep 12 14:32:54 linbox kernel: 8139cp: 10/100 PCI Ethernet driver v1.3 (Mar 22, 2004) |
this part clearly show 8139too driver load, then discovering a card, then loading 8130cp.
So 8139too is the correct driver and your rules ask 8139cp one
I'm not sure it's that but one sure thing
70-persistent-net.rules must have eth0 recorded with the mac address of eth_mobo or eth_pci, so udev rename it to eth1.
just edit 70-persistent-net-rules and change eth0 with eth_pci
then change eth1 to eth_real
and then, even if the local.rules fail, udev should rename the interface to eth_real because it has record it's mac address
It's easier, no rules at all for your card, only default rules, let udev name them as it wish (eth0, eth1...) and using the 70-persistent.... file ask udev to name them as YOU wish this time. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Gentree Watchman
![Watchman Watchman](/images/ranks/rank-G-2-watchman.gif)
![](images/avatars/1364161114417d616b9645b.jpg)
Joined: 01 Jul 2003 Posts: 5350 Location: France, Old Europe
|
Posted: Sun Sep 12, 2010 5:49 pm Post subject: |
|
|
Sorry, I thought I had noted that it did the same with either module name . (Probably in the other thread.)
/etc/udev/rules.d/10-local.rules :
Code: | KERNEL=="eth*", ACTION=="add", DRIVERS=="8139too", NAME="eth_real" |
Code: |
Sep 12 18:56:41 linbox kernel: 8139too Fast Ethernet driver 0.9.28
Sep 12 18:56:41 linbox kernel: 8139too 0000:01:06.0: PCI INT A -> Link[APC3] -> GSI 18 (level, high) -> IRQ 18
Sep 12 18:56:41 linbox kernel: eth0: RealTek RTL8139 at 0xc000, 00:08:a1:73:74:e9, IRQ 18
Sep 12 18:56:41 linbox kernel: 8139cp: 10/100 PCI Ethernet driver v1.3 (Mar 22, 2004)
Sep 12 18:56:41 linbox kernel: udev: renamed network interface eth0 to eth1
Sep 12 18:56:41 linbox rc-scripts: net.eth1 is not allowed to be hotplugged
|
hey! thank you for pointing me at the persistant rules file. There I find a note I made:
me wrote: | ##### take out these rules for onboard devices that are pre-empting 10-local.rules !! |
Duh! I was thinking the lower numbers got read first , it looks like it's decending order!!
My rule never got read because the event had be dealt with already. In fact I need to put these rules in 99*.rules so they get precedence.
I'd switched from using mac addresses since I have a similar reserve mobo that has the same chipset and onboard "eth_mobo" with a different mac. Using module names meant I could swap hardware (when I get a bad BIOS or a lightning strike) and reboot without reconfiguring.
I guess I just decided to use the same system for all nics.
Anyway , once again you have helped me see what I was missing and my gentoo box thanks you heartily.
You've probably spared it getting a bit of option 5 treatment
Merci. ![Cool 8)](images/smiles/icon_cool.gif) _________________ Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86 |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|