in 未分类

em改成eth

# cp –preserve=context /etc/grub.conf /etc/grub.bak
1. Add biosdevname=0 to the kernel boot arguments in /etc/grub.conf.

[root@lvs-02 ~]# cat /etc/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/sdc2
#          initrd /initrd-[generic-]version.img
#boot=/dev/sdc
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS 6 (2.6.32-573.el6.x86_64)
    root (hd0,0)
    kernel /vmlinuz-2.6.32-573.el6.x86_64 ro root=UUID=2fc718d1-a706-4c3d-97f3-fddd63ae5b0d 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 biosdevname=0 rhgb quiet
    initrd /initramfs-2.6.32-573.el6.x86_64.img

2. Rename /etc/sysconfig/network-scripts/ifcfg-em1 to /etc/sysconfig/network-scripts/ifcfg-eth0, changing the line
DEVICE=”em1″
to
DEVICE=”eth0″
3. Delete /etc/udev/rules.d/70-persistent-net.rules
4. Reboot.

Write a Comment

Comment