怎样把centos 6.5 系统里的网卡em1还原为eth0
来源:互联网 发布:下载免费大片软件 编辑:程序博客网 时间:2024/05/22 17:08
vi /boot/grub/grub.conf
增加一个 biosdevname=0 的启动参数,我修改的结果如下:
[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 #--->这里是新加的
initrd /boot/initramfs-2.6.32-220.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
mv ifcfg-em3 ifcfg-eth2
mv ifcfg-em4 ifcfg-eth3
第四步:修改网卡配置文件内容,把em1全部修改改为eth0
[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"
可以使用命令进行替换,如下:
perl -p -i -e 's/em1/eth0/g' ifcfg-eth0 或sed -i 's/em1/eth0/g' ifcfg-eth0
最后一步:重新启动系统 shutdown -r now 启动之后你就发现熟悉的eth0-eth4已经回来啦,顺便说下centos 6.2 还有一个问题就是如果你没有在网卡配置文件里写dns的话,重启之后你就会发现 /etc/resolv.conf 文件被清空了,一个方法就是在网卡配置文件中写DNS,另一个方法就是给/etc/resolv.conf加i属性,chattr +i /etc/resolv.conf
- 怎样把centos 6.5 系统里的网卡em1还原为eth0
- 把CentOS 系统里的网卡em1还原为eth0
- 怎样把centos 6.2 系统里的网卡em1还原为eth0
- 怎样把centos 6.2 系统里的网卡em1还原为eth0
- centos网卡em1改为eth0
- centos6.x修改网卡名称em1、2...为eth0、1...
- 为什么Centos/Redhat6 里看到的网卡是em1 或者p2p1
- 为什么redhat6里看到的网卡是em1?
- 为什么redhat6里看到的网卡是em1
- CentOS 7 修改网卡名称为 eth0
- centos7下的系统网卡名称eno16777736更改为eth0
- 主题:怎样把网卡的rom读出来写到文件里?
- CentOS 网卡eth0,未识别的端口
- CentOS修改eth0网卡的名字-yellowcong
- VM 克隆的 centos 的Linux下网卡eth1如何修改为eth0解决办法
- 问题1-- VM 克隆的 centos 的Linux下网卡eth1如何修改为eth0解决办法
- 修改CentOS 7网卡名称eno16777736为eth0
- CentOS 7 网卡命名修改为eth0格式
- lamp下防百度文库
- java 多线程内存模型
- Android 中关于 Cursor 类的介绍
- java中FTP下载文件
- iOS strong和weak的异同
- 怎样把centos 6.5 系统里的网卡em1还原为eth0
- log4j 2.x 打印mybatis select的结果
- iOS 如何隔绝UITableViewCell中UIButton的连续点击事件
- 作业8.15
- 如何让new 操作 不分配内存 只调用构造函数
- RevitAPI: FamilyManager.Set - InvalidOperationException: There is no current type
- LeetCode-Isomorphic Strings-解题报告
- IOS图像9之自定义侧划栏(类似新浪微博Swift)
- 静态内部类和非静态内部类的区别