dmesg |grep network
[ 74.261872] systemd-udevd[14259]: renamed network interface wlan0 to wlp2s0
[ 74.391865] systemd-udevd[14259]: renamed network interface eth0 to enp0s4-
使用原来的网卡名字eth0,重置udev的rules:
# ln -s /dev/null /etc/udev/rules.d/80-net-name-slot.rules
# touch /etc/udev/rules.d/80-net-name-slot.rules
- 使用新的网卡名字
# rm /etc/udev/rules.d/80-net-name-slot.rules
# rm /etc/init.d/net.eth0 #删除不存在的引用
# rc-update delete net.eth0 default #删除不存在的开机启动
# cd /etc/init.d
# ln -s net.lo net.enp0s3
# rc-update add net.enp0s3 default #使用新名字
在升级了udev至197版本后,Gentoo系统的网卡命名方式发生了变化,遵循Predictable Network Interface Names。为恢复旧的eth0等命名,可以在kernel启动参数中加入'net.ifnames=0',或者创建空的'/etc/udev/rules.d/80-net-name-slot.rules'文件,以保持原有接口名字。
5732

被折叠的 条评论
为什么被折叠?



