- vi /etc/sysconfig/network-scripts/ifcfg-enp0s3
name="eth0"
- mv /etc/sysconfig/network-scripts/ifcfg-enp0s3 /etc/sysconfig/network-scripts/ifcfg-eth0
- vi /etc/default/grun
GRUB_DISTRIBUTOR="$(sed ‘s, release .*$,,g‘ /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="rd.lvm.lv=centos/swap vconsole.font=latarcyrheb-sun16 rd.lvm.lv=centos/root crashkernel=auto vconsole.keymap=us rhgb quiet"
GRUB_DISABLE_RECOVERY="true在rhgb quiet中添加:net.ifnames=0 biosdevname=0
- 重新建立grub文件
grub2-mkconfig -o /boot/grub2/grub.cfg
- 重新启动服务器
时间: 2024-10-07 14:11:46