The centos 6.5 system card em1 reduced to eth0

The first step: modify system grub
vi /boot/grub/grub.conf

Add a biosdevname=0 startup parameter, I modified the results are as follows:

[root@xingfujie ~]# cat /boot/grub/grub.conf
# 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.
# root (hd0,0)
# kernel /boot/vmlinuz-version ro root=/dev/sda1
# initrd /boot/initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.32-220.el6.x86_64)
root (hd0,0)
kernel /boot/vmlinuz-2.6.32-220.el6.x86_64 ro root=UUID=360d089b-d466-4005-abcb-c5e517d31a96 rd_NO_LUKS rd_NO_LVM LANG=en_US. UTF-8 rd_NO_MD quiet SYSFONT=latarcyrheb-sun16 rhgb crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM biosdevname=0 #—> here are new
initrd /boot/initramfs-2.6.32-220.el6.x86_64.img

The second step: delete configuration files that udev/etc/udev/rules.d/70-persistent-net.rules

Note: the second step does not need to operate.

The third step: modify the name of the current network connection profile
mv ifcfg-em1 ifcfg-eth0
mv ifcfg-em2 ifcfg-eth1
mv ifcfg-em3 ifcfg-eth2
mv ifcfg-em4 ifcfg-eth3

Fourth step: modify the network adapter configuration file contents, all changes to the eth0 em1

[root@xingfujie ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=”eth0″
BOOTPROTO=”dhcp”
HWADDR=”24:B6:FD:F8:D5:84″
NM_CONTROLLED=”yes”
ONBOOT=”yes”

You can use the command replace as follows:

-‘S/em1/eth0/g’ ifcfg-eth0 or’s/em1/eth0/g’ ifcfg-eth0

The final step: reboot the system you will find the familiar eth0-eth4 has now started back again, BTW CentOS 6.2 there is a problem is that if you don’t write in the NIC configuration file DNS, restart, you will find the/etc/resolv.conf file is empty, one way is to write DNS in the network card configuration files, the other method is to/etc/ Resolv.conf and I attribute chattr +/resolv.conf

Leave a Reply

Your email address will not be published. Required fields are marked *