View previous topic :: View next topic |
Author |
Message |
lostinspace2011 Apprentice
Joined: 09 Sep 2005 Posts: 230
|
Posted: Sat Apr 06, 2013 12:41 pm Post subject: UDEV upgrade... My Story |
|
|
Today was the day I decided to update my gentoo systems. After merrily installing udev-200, removing all files from /etc/udev/rules.d and rebooting both systems nothing worked. Well to be honest, I should say very little.
Here is what I did to get around the issues:
System 1:
The first problem was that all network interfaces were renamed. Wanting to restore sensibility I had to create /etc/udev/rules.d/70-persistent-net.rules which mapped the MAC address of the nic to the name
Quote: |
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="XX:XX:XX:XX:XX", NAME="eth0"
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="YY:YY:YY:YY:YY", NAME="eth1"
|
I got the MAC addresses from the dmesg output:
Code: | bumblebee ~ # dmesg |grep eth
[ 0.484646] 8139too 0000:00:0e.0 eth0: RealTek RTL8139 at 0x00019400, XX:XX:XX:XX:XX, IRQ 10
[ 0.505268] eth1: SiS 900 PCI Fast Ethernet at 0x00019800, IRQ 10, YY:YY:YY:YY:YY |
This fixed the issue on that system, but I have no idea if this is the correct or best way to deal with it. However or now all seems to be working as it should.
System 2:
On this system I opted to play along and change from using eth0 to eno1
Code: |
ls -la /sys/class/net
ln -s net.lo /etc/init.d/net.eno1
rc-update delete net.eth0
rc-update add net.eno1 default |
I also had to adjust my iptables rules for the new interface name. The upgrade instructions (http://wiki.gentoo.org/wiki/Udev/upgrade) tell us to :
Quote: | Remove udev-postmount from any runlevels, it is not necessary. |
which I promptly misread as udev-mount. After disabling udev-mount I was getting errors
Quote: | openpty: No such file or directory |
The solution was of course to re-enable udev-mount.
It would have been very helpful if the upgrade instruction made it clearer that the network interface name should be changed, although I am not really sure this is the case. However now I have both systems working again, and all seems good.
I am a little confused as I would have expected that using eth0 would continue to be the default option, however this does not seem to be the case. Some more details on this changes can be found here : http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames. |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 22657
|
Posted: Sat Apr 06, 2013 2:37 pm Post subject: Re: UDEV upgrade... My Story |
|
|
lostinspace2011 wrote: | System 1:
The first problem was that all network interfaces were renamed. Wanting to restore sensibility I had to create /etc/udev/rules.d/70-persistent-net.rules which mapped the MAC address of the nic to the name
Quote: |
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="XX:XX:XX:XX:XX", NAME="eth0"
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="YY:YY:YY:YY:YY", NAME="eth1"
|
This fixed the issue on that system, but I have no idea if this is the correct or best way to deal with it. | That is the wrong solution. As documented in the news, if you want to disable the renaming behavior and use kernel-chosen names, you should create 80-net-name-slot.rules to override the silly rename behavior. If you want to disable the renaming and use custom names, you should not use names in the eth prefix, because modern udev removed support for that.
Yes, using the kernel-assigned names by default would be the reasonable choice, since most people lack the hardware to benefit from the new scheme. However, to ensure that users with complex topologies discover the feature and begin using it, everyone else gets to suffer through having it enabled by default. |
|
Back to top |
|
|
PaulBredbury Watchman
Joined: 14 Jul 2005 Posts: 7310
|
Posted: Sun Apr 07, 2013 3:17 am Post subject: |
|
|
STOP using eth0 and eth1 - those are confusing names, the worst that you can choose for custom rules, because it's not obvious whether your rules have taken effect, or whether udev's default random naming has kicked in, if udev changes in the future.
See thread. |
|
Back to top |
|
|
|
|
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
|
|