LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 07-06-2009, 11:47 AM   #1
vharishankar
Senior Member
 
Registered: Dec 2003
Distribution: Debian
Posts: 3,178
Blog Entries: 4

Rep: Reputation: 138Reputation: 138
(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.
 
Old 07-06-2009, 01:35 PM   #2
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
Start by checking hte udev rules..

http://reactivated.net/writing_udev_...#example-netif
 
Old 07-06-2009, 05:13 PM   #3
craigevil
Senior Member
 
Registered: Apr 2005
Location: OZ
Distribution: Debian Sid/RPIOS
Posts: 4,889
Blog Entries: 28

Rep: Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534
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

/usr/share/doc/udev/writing_udev_rules/index.html, or or read it online at http://www.reactivated.net/writing_udev_rules.html


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:*"
 
Old 07-06-2009, 08:55 PM   #4
vharishankar
Senior Member
 
Registered: Dec 2003
Distribution: Debian
Posts: 3,178

Original Poster
Blog Entries: 4

Rep: Reputation: 138Reputation: 138
Quote:
Originally Posted by craigevil View Post
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

/usr/share/doc/udev/writing_udev_rules/index.html, or or read it online at http://www.reactivated.net/writing_udev_rules.html


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"
What do I need to change here?
 
Old 07-06-2009, 09:27 PM   #5
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
ohci1394 = Firewire Interface

e1000 = Intel Gig NIC

ipw3945 = Intel Wireless.

so if you wanted the name of the wireless to be different you would change the NAME entry in that line..

http://wiki.debian.org/ipw3945

I'm not sure why it's renaming your interface at boot though...
 
Old 07-06-2009, 09:42 PM   #6
vharishankar
Senior Member
 
Registered: Dec 2003
Distribution: Debian
Posts: 3,178

Original Poster
Blog Entries: 4

Rep: Reputation: 138Reputation: 138
Quote:
Originally Posted by farslayer View Post
ohci1394 = Firewire Interface

e1000 = Intel Gig NIC

ipw3945 = Intel Wireless.

so if you wanted the name of the wireless to be different you would change the NAME entry in that line..

http://wiki.debian.org/ipw3945

I'm not sure why it's renaming your interface at boot though...
I actually use the newer iwl3945 driver which is part of the iwlwifi drivers by intel, completely replacing the older drivers.

Here's the result of ifconfig and iwconfig:
Code:
hari@harishankar:~$ /sbin/ifconfig 
eth1      Link encap:Ethernet  HWaddr 00:1b:24:39:be:0f  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1     
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000                        
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)              
          Memory:da000000-da020000                            

eth2      Link encap:UNSPEC  HWaddr 00-19-D2-D3-66-E8-6E-61-00-00-00-00-00-00-00-00  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1                         
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0                         
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0                       
          collisions:0 txqueuelen:1000                                               
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)                                     

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:50 errors:0 dropped:0 overruns:0 frame:0
          TX packets:50 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2766 (2.7 KiB)  TX bytes:2766 (2.7 KiB)

wlan0_rename Link encap:Ethernet  HWaddr 00:19:d2:d3:66:e8
          inet addr:192.168.1.5  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::219:d2ff:fed3:66e8/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3781 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4153 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2620720 (2.4 MiB)  TX bytes:750577 (732.9 KiB)

hari@harishankar:~$ /sbin/iwconfig
lo        no wireless extensions.

eth1      no wireless extensions.

eth2      no wireless extensions.

wlan0_rename  IEEE 802.11g  ESSID:"ssid-home"
          Mode:Managed  Frequency:2.462 GHz  Access Point: 00:1B:DA:2C:74:08
          Bit Rate=54 Mb/s   Tx-Power=27 dBm
          Retry min limit:7   RTS thr:off   Fragment thr=2352 B
          Link Quality=95/100  Signal level=-33 dBm  Noise level=-127 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

Last edited by vharishankar; 07-06-2009 at 09:47 PM.
 
Old 07-07-2009, 07:34 AM   #7
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
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.

http://intellinuxwireless.org/bugzil...ug.cgi?id=1535

Quote:
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.
 
Old 07-07-2009, 07:59 AM   #8
vharishankar
Senior Member
 
Registered: Dec 2003
Distribution: Debian
Posts: 3,178

Original Poster
Blog Entries: 4

Rep: Reputation: 138Reputation: 138
That's an excellent link. Thanks a lot. Explains a lot of things, including the slow boot up time on my system. I'll look into it ASAP.
 
Old 07-07-2009, 08:54 AM   #9
vharishankar
Senior Member
 
Registered: Dec 2003
Distribution: Debian
Posts: 3,178

Original Poster
Blog Entries: 4

Rep: Reputation: 138Reputation: 138
Man, farslayer you're a hero!!!!!!!!!

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.
 
Old 07-07-2009, 08:28 PM   #10
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
Looks like I got pretty lucky with Google on that one, to hit an exact fix to such a bizarre issue.

Glad to hear that resolution worked out so well for you
 
Old 06-25-2016, 02:45 PM   #11
ahfrood
LQ Newbie
 
Registered: Jun 2016
Location: About 40miles/60km north of New York City.
Distribution: Debian testing
Posts: 1

Rep: Reputation: Disabled
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Debian Squeeze Repositories drakeman007 Linux - Newbie 15 11-19-2010 09:24 PM
[SOLVED] Debian (AMD64 - squeeze) - booting takes a long times - Hangs up at IRQ message vharishankar Debian 32 07-07-2009 09:02 AM
Renaming udev mapper labels dizowned Linux - Software 1 04-02-2008 05:31 AM
can't find eth2 device hamish Linux - Networking 4 12-03-2003 02:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 05:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration