Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
UDEV upgrade... My Story
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
lostinspace2011
Apprentice
Apprentice


Joined: 09 Sep 2005
Posts: 230

PostPosted: Sat Apr 06, 2013 12:41 pm    Post subject: UDEV upgrade... My Story Reply with quote

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
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21489

PostPosted: Sat Apr 06, 2013 2:37 pm    Post subject: Re: UDEV upgrade... My Story Reply with quote

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.
lostinspace2011 wrote:
System 2:

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.
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
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Sun Apr 07, 2013 3:17 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
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