Skip to contentSkip to conversation

Device naming randomness (udev?)

DISCUSSION Martin J. Bligh 4 participants 5 messages Dec 3, 2006 – Dec 6, 2006

lore
Share & tools
lore
#0 lore raw

This PC has 1 ethernet interface, an e1000. Ubuntu Dapper.

On 2.6.14, my e1000 interface appears as eth0. On 2.6.15 to 2.6.18, my e1000 interface appears as eth1.

In both cases, there are no other ethX interfaces listed in "ifconfig -a". There are no modules involved, just a static kernel build.

Is this a bug in udev, or the kernel? I'm presuming udev, but seems odd it changes over a kernel release boundary. Any ideas on how I get rid of it? Makes automatic switching between kernel versions a royal pain in the ass.

M.

#1 lore raw
Quoted 5 lines · Martin J. Bligh

This PC has 1 ethernet interface, an e1000. Ubuntu Dapper.

On 2.6.14, my e1000 interface appears as eth0. On 2.6.15 to 2.6.18, my e1000 interface appears as eth1.

Quoted 8 lines

In both cases, there are no other ethX interfaces listed in "ifconfig -a". There are no modules involved, just a static kernel build.

Is this a bug in udev, or the kernel? I'm presuming udev, but seems odd it changes over a kernel release boundary. Any ideas on how I get rid of it? Makes automatic switching between kernel versions a royal pain in the ass.

Just a wild guess here... Debian's (and I guess Ubuntu's) udev rules contain a generator for persistent interface name rules. Maybe these start working with 2.6.15 and thus the switch (ie. the kernel would call it eth0, but udev renames it to eth1).
The generated rules are written to /etc/udev/rules.d/z25_persistent-net.rules on Debian, not sure if its the same for Ubuntu. Editing/removing the rules should fix your problem.

HTH
Björn

#4 lore raw
In reply to Martin J. Bligh
Quoted 5 lines · Martin J. Bligh

This PC has 1 ethernet interface, an e1000. Ubuntu Dapper.

On 2.6.14, my e1000 interface appears as eth0. On 2.6.15 to 2.6.18, my e1000 interface appears as eth1.

Quoted 8 lines

In both cases, there are no other ethX interfaces listed in "ifconfig -a". There are no modules involved, just a static kernel build.

Is this a bug in udev, or the kernel? I'm presuming udev, but seems odd it changes over a kernel release boundary. Any ideas on how I get rid of it? Makes automatic switching between kernel versions a royal pain in the ass.

Have a look at /etc/iftab.

Yours Tony

linux.conf.au http://linux.conf.au/ || http://lca2007.linux.org.au/
Jan 15-20 2007 The Australian Linux Technical Conference!

#2 lore raw
In reply to Björn Steinbrink
Quoted 15 lines · Bj?rn Steinbrink
Quoted 5 lines · Martin J. Bligh

This PC has 1 ethernet interface, an e1000. Ubuntu Dapper.

On 2.6.14, my e1000 interface appears as eth0. On 2.6.15 to 2.6.18, my e1000 interface appears as eth1.

Quoted 8 lines

In both cases, there are no other ethX interfaces listed in "ifconfig -a". There are no modules involved, just a static kernel build.

Is this a bug in udev, or the kernel? I'm presuming udev, but seems odd it changes over a kernel release boundary. Any ideas on how I get rid of it? Makes automatic switching between kernel versions a royal pain in the ass.

Quoted 7 lines

Just a wild guess here... Debian's (and I guess Ubuntu's) udev rules contain a generator for persistent interface name rules. Maybe these start working with 2.6.15 and thus the switch (ie. the kernel would call it eth0, but udev renames it to eth1).
The generated rules are written to /etc/udev/rules.d/z25_persistent-net.rules on Debian, not sure if its the same for Ubuntu. Editing/removing the rules should fix your problem.

Yes, I'd place odds on this one.

Martin, any followup?

thanks,

greg k-h

#3 lore raw
Quoted 23 lines · Greg KH
Quoted 14 lines · Bj?rn Steinbrink
Quoted 5 lines · Martin J. Bligh

This PC has 1 ethernet interface, an e1000. Ubuntu Dapper.

On 2.6.14, my e1000 interface appears as eth0. On 2.6.15 to 2.6.18, my e1000 interface appears as eth1.

Quoted 8 lines

In both cases, there are no other ethX interfaces listed in "ifconfig -a". There are no modules involved, just a static kernel build.

Is this a bug in udev, or the kernel? I'm presuming udev, but seems odd it changes over a kernel release boundary. Any ideas on how I get rid of it? Makes automatic switching between kernel versions a royal pain in the ass.

Quoted 7 lines

Just a wild guess here... Debian's (and I guess Ubuntu's) udev rules contain a generator for persistent interface name rules. Maybe these start working with 2.6.15 and thus the switch (ie. the kernel would call it eth0, but udev renames it to eth1).
The generated rules are written to /etc/udev/rules.d/z25_persistent-net.rules on Debian, not sure if its the same for Ubuntu. Editing/removing the rules should fix your problem.

Quoted 1 line

Yes, I'd place odds on this one.

Huh. Somehow there was this entry in /etc/iftab:

eth0 mac 00:0d:61:44:90:12 arp 1

But that's not my mac address. Damned if I know how that got there, but if the persistent rules only work on later kernels, that'd explain it. And indeed ... removing that entry makes it work more normally.

Thanks for the pointers - most helpful.

M.