解决方法
1:检查网卡
[[email protected] ~]# vi /etc/sysconfig/network-scripts/ifcfg-ens33 是不是配置正确
2.重命名网卡配置文件ifcfg-ens33为ifcfg-eth0
mv ifcfg-ens33 ifcfg-eth0
3.编辑/etc/default/grub并加入“net.ifnames=0 biosdevname=0 ”到GRUBCMDLINELINUX变量
1 2 3 4 5 6 7 8 9 |
|
4.运行命令grub2-mkconfig -o /boot/grub2/grub.cfg 来重新生成GRUB配置并更新内核参数。
[[email protected] network-scripts]# grub2-mkconfig -o /boot/grub2/grub.cfg Generating grub configuration file ... Found linux image: /boot/vmlinuz-3.10.0-514.el7.x86_64 Found initrd image: /boot/initramfs-3.10.0-514.el7.x86_64.img Found linux image: /boot/vmlinuz-0-rescue-b7f83ca165964a47b8b283907b126140 Found initrd image: /boot/initramfs-0-rescue-b7f83ca165964a47b8b283907b126140.img done
原文地址:https://www.cnblogs.com/leigepython/p/12404842.html
时间: 2024-10-19 04:15:31