第一步:修改系统grub
vi /boot/grub/grub.conf
增加一个 biosdevname=0 的启动参数即可
cat /boot/grub/menu.lst # grub.conf generated by anaconda # # Note that you do not have to rerun grub after making changes to this file # NOTICE: You do not have a /boot partition. This means that # all kernel and initrd paths are relative to /, eg. biosdevname=0 # root (hd0,2) # kernel /boot/vmlinuz-version ro root=/dev/sda3 biosdevname=0 # initrd /boot/initrd-[generic-]version.img #boot=/dev/sda default=0 timeout=5 splashimage=(hd0,2)/boot/grub/splash.xpm.gz hiddenmenu title CentOS (2.6.32-431.3.1.el6.x86_64) root (hd0,2) kernel /boot/vmlinuz-2.6.32-431.3.1.el6.x86_64 ro root=UUID=d3664645-7f06-4a26-aa2c-34ece0a4c229 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet biosdevname=0 initrd /boot/initramfs-2.6.32-431.3.1.el6.x86_64.img
第二步:删除udev的配置文件
rm -f /etc/udev/rules.d/70-persistent-net.rules
注:第二步可以不需要操作。
第三步:修改当前网卡配置文件的名称
mv ifcfg-em1 ifcfg-eth0
mv ifcfg-em2 ifcfg-eth1
第四步:修改网卡配置文件内容,把em1全部修改改为eth0
#cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=”eth0″
第五步:重新启动系统 reboot
转载请注明:爱开源 » CentOS把em1网卡还原为eth0网卡