Gentoo解決Udev升級的網卡重新命名問題

來源:互聯網
上載者:User

Gentoo解決Udev升級的網卡重新命名問題

查看開機資訊
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

可以看到更名通知。
udev升級更改網卡eth*命名方式
從udev-197將自動分配更好的介面名字,具體解釋請看[PredictableNetworkInterfaceNames] (http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames)
使用原來的網卡名字eth0,重設udev的rules:

1.在kernel命令列選項裡使用net.ifnames=0
2.建立空檔案檔案/etc/udev/rules.d/80-net-name-slot.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 #使用新名字

RHEL6使用Udev修改asm磁碟名

RedHat6.3 Udev 配置 儲存空間磁碟

redhat5.5測試環境中使用Udev配置raw裝置 

CentOS 5上部署Udev 

rh436 - 使用Udev重新命名usb裝置(rhel5.5) 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.