How to restore the network card em1 in the CentOS 6.2 system to Eth0

Source: Internet
Author: User

The first step : Modify the System Grub
vi/boot/grub/grub.conf

To add a biosdevname=0 startup parameter, I modified the result as follows:

[Email protected] ~]# cat/boot/grub/grub.conf 
# grub.conf generated by Anaconda
#
# Note that you don't have the to rerun grub after making changes to the This file
# notice:you does not have a/boot partition. This means
# all kernel and INITRD paths is 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's a new addition.
Initrd/boot/initramfs-2.6.32-220.el6.x86_64.img

Step two : Delete udev configuration files rm-f/etc/udev/rules.d/70-persistent-net.rules

Note : The second step can be no action required.

Step three : Modify the name of the current NIC configuration file
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 card configuration file contents, change em1 all changes to eth0

[Email protected] ~]# 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 replace it with a command, as follows:

Perl-p-i-e ' s/em1/eth0/g ' ifcfg-eth0 or sed-i ' s/em1/eth0/g ' Ifcfg-eth0

Last step: Restart the system shutdown-r now you find that the familiar Eth0-eth4 has come back, by the way CentOS 6.2 has another problem is that if you do not write DNS in the network card configuration file, you will find/etc/after rebooting resolv.conf file is emptied, one way is to write DNS in the network card configuration file, another method is to give/etc/resolv.conf I attribute, chattr +i/etc/resolv.conf

How to restore the network card em1 in the CentOS 6.2 system to Eth0

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.