修改网卡名称为eth0、eth1
1.1 方法1
1.1.1 修改网卡名称
cd /etc/sysconfig/network-scripts/
mv ifcfg-eno16777736 ifcfg-eth0
mv ifcfg-eno33554960 ifcfg-eth1
1.1.2 修改网卡配置文件
[[email protected] ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
TYPE=Ethernet
BOOTPROTO=static
NETMASK=255.255.255.0
IPADDR=10.0.0.110
GATEWAY=10.0.0.2
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
NAME=eth0
UUID=582bec32-fa8b-415e-9cdc-873035dc336d
DEVICE=eth0
ONBOOT=yes
[[email protected] ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth1
TYPE=Ethernet
BOOTPROTO=static
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
NAME=eth1
UUID=7a62954e-574f-41cc-b4f6-3c802fa4a819
DEVICE=eth1
ONBOOT=yes
1.1.3 修改grub
加入以下内容
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="rhgb net.ifnames=0 biosdevname=0 quiet"
GRUB_DISABLE_RECOVERY="true"
1.1.4 生成启动菜单
grub2-mkconfig -o /boot/grub2/grub.cfg
1.1.5 重启系统
reboot
1.2 方法2
net.ifnames=0 biosdevname=0
vmlinuz initrd=initrd.img inst.stage2=hd:LABEL=CentOS\x207\x20x86_64 quiet net.ifnames=0 biosdevname=0
原文地址:http://blog.51cto.com/13055758/2063012