[SOLVED] (Debian Squeeze amd64) udev keeps renaming the eth2 device to wlan0_rename
DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
(Debian Squeeze amd64) udev keeps renaming the eth2 device to wlan0_rename
Is udev part of the base system or are there alternatives which work just as well?
I'm asking because udev has been choking up the booting process of late and I'm not sure where to look for the configuration setting to change it.
udev also seems to 'rename' the wireless network device which is based on the Intel Pro 3945 chipset and is driven by the iwl3945 driver. eth2 is changed to wlan0_rename on my system (not sure why it does this), which is annoying - because on some occasions it creates a new device and on other times when I boot, it remains eth2 and wlan0_rename is not created. So I am forced to reconfigure the device in wicd often. It's not so much of an issue to do this, but I'd prefer if udev didn't do this dynamic naming thing.
Other than that I don't have any problems. Is there any way to prevent udev from renaming devices on boot? I rather suspect this is what is causing my system boot to delay by nearly one minute every time and it's annoying.
As of version 0.090, udev has the ability to statically rename Ethernet cards based on MAC address. The addresses are configured in/etc/udev/rules.d/z25_persistent-net.rules . If you want the mappings to change, edit that file. As of version 0.124-1, the file is called/etc/udev/rules.d/70-persistent-net.rules
edit /etc/udev/rules.d/70-persistent-net.rules (Lenny) or /etc/udev/rules.d/z25_persistent-net.rules (Etch), remove all but one entry, and replace the MAC address with "00:00:6c:*"
As of version 0.090, udev has the ability to statically rename Ethernet cards based on MAC address. The addresses are configured in/etc/udev/rules.d/z25_persistent-net.rules . If you want the mappings to change, edit that file. As of version 0.124-1, the file is called/etc/udev/rules.d/70-persistent-net.rules
edit /etc/udev/rules.d/70-persistent-net.rules (Lenny) or /etc/udev/rules.d/z25_persistent-net.rules (Etch), remove all but one entry, and replace the MAC address with "00:00:6c:*"
The file on my system has this content:
Code:
# This file was automatically generated by the /lib/udev/write_net_rules
# program, probably run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single line.
# MAC addresses must be written in lowercase.
# PCI device 0x1180:0x0832 (ohci1394)
SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:24:1b:00:60:e4:1c:00", NAME="eth0"
# PCI device 0x8086:0x109a (e1000)
SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:1b:24:39:be:0f", NAME="eth1"
# PCI device 0x8086:0x4222 (ipw3945)
SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:19:d2:d3:66:e8", NAME="eth2"
Yes, that's the driver the Debian wiki page discusses...
Quote:
Note: Since 2.6.24, the new module iwl3945 supersedes ipw3945. This module was merged from the iwlwifi project and does not require a binary regulatory daemon.
* <!> ipw3945 is not supported in Debian Lenny and Unstable
I also found a bug report related to your exact issue.
This happens on Debian/Ubuntu systems because of the way it tries to maintain
static network interface names. udev rules are created here:
/etc/udev/rules.d/z25_persistent-net.rules
when a new MAC address is found.
The problem though, is if one driver calls an interface eth# while another calls
it wlan#. In this case you should remove the applicable entry from the file
before rebooting.
By commenting out eth2 entry in /etc/udev/rules.d/70-persistent-net.rules on my system it has solved the issue.
Looks like it was a remnant from the ipw days which caused a conflict between the two. Now that is fixed - bootup is much faster and my device works perfectly and is correctly named wlan0...
I am so overjoyed I cannot even get myself to type this out... It has resolved a long standing issue that was really really annoying me (long boot times)...
But anyway, for those who are interested, here's what I did to resolve the issue.
Code:
# This file was automatically generated by the /lib/udev/write_net_rules
# program, probably run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single line.
# MAC addresses must be written in lowercase.
# PCI device 0x1180:0x0832 (ohci1394)
SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:24:1b:00:60:e4:1c:00", NAME="eth0"
# PCI device 0x8086:0x109a (e1000)
SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:1b:24:39:be:0f", NAME="eth1"
# PCI device 0x8086:0x4222 (ipw3945)
# SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:19:d2:d3:66:e8", NAME="eth2"
# PCI device 0x8086:0x4222 (iwl3945)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:19:d2:d3:66:e8", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"
Ironically, updating to GRUB 2 from the legacy grub ACTUALLY helped me detect the exact place where the boot up was hanging (because of the "quiet" mode) so that I could trace that it was related to udev all the way!!
Sorry if I am rambling on, just excitement.
Last edited by vharishankar; 07-07-2009 at 09:04 AM.
Location: About 40miles/60km north of New York City.
Distribution: Debian testing
Posts: 1
Rep:
to future me and others ... remember to regenerate boot time things
Note to future me and similar folks who find this thread.
I had a StarTech PEXUSB3S3 - (3-port USB 3.0 + Gigabit Ethernet) and was seeing a message from the kernel driver renaming it from eth1 to enx[hex mac addr here] during boot.
Persistent udev rules didn't seem to work, until I realized a few days later at a more-rested moment, that the rename was happening at a very early time and any udev rule needed to be available at a very early time.
I ran these:
update-initramfs -u
update-grub2
It was probably updating initramfs that did the trick.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.