- 修改grub文件,添加内核参数net.ifnames=0 biosdevname=0信息,使网卡名称修改为eth0
-
[root@192168088102-NFS-Server network-scripts]# cat /etc/sysconfig/grub
-
GRUB_TIMEOUT=5
-
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
-
GRUB_DEFAULT=saved
-
GRUB_DISABLE_SUBMENU=true
-
GRUB_TERMINAL_OUTPUT="console"
-
GRUB_CMDLINE_LINUX="crashkernel=auto rhgb net.ifnames=0 biosdevname=0 quiet"
-
GRUB_DISABLE_RECOVERY="true"
- 生成启动菜单,重新加载到启动中,并重启系统
-
[root@192168088102-NFS-Server network-scripts]# grub2-mkconfig -o /boot/grub2/grub.cfg
-
Generating grub configuration file ...
-
Found linux image: /boot/vmlinuz-3.10.0-957.el7.x86_64
-
Found initrd image: /boot/initramfs-3.10.0-957.el7.x86_64.img
-
Found linux image: /boot/vmlinuz-0-rescue-dc723d2d2d444cf0ae3794ab211366b8
-
Found initrd image: /boot/initramfs-0-rescue-dc723d2d2d444cf0ae3794ab211366b8.img
-
done
-
[root@192168088102-NFS-Server network-scripts]# reboot
-
-