Linux解决Device eth0 does not seem to be present

克隆的系统,重启网卡时,报错!

克隆的系统,首先它的物理地址是一样的,所以要先生成一个物理地址。
第一步删除/etc/udev/rules.d/70-persistent-net.rules文件
#rm -rf /etc/udev/rules.d/70-persistent-net.rules
第二步:重启系统
#reboot
生成物理地址保存在哪里呢?
在这里:
[root@linux ~]# cat /etc/udev/rules.d/70-persistent-net.rules
这个时候还不行,需要修改网络IP配置文件中IP地址及MAC地址和70-persistent-net.rulesMAC一致,修改设备名称,也要一致:


[root@Nagios-Linux rules.d]# cat 70-persistent-net.rules
# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.

# PCI device 0x8086:0x100f (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:3d:bd:b4", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
[root@Nagios-Linux rules.d]# vi /etc/sysconfig/network-scripts/ifcfg-eth0

 

第三步:编辑MAC地址

[root@linux ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE="eth1"
BOOTPROTO="static"
HWADDR="00:0c:29:3d:bd:b4"
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
UUID="c3eedb2c-5894-4a7e-8f3e-8575667d44b3"
IPADDR=192.168.10.32
PREFIX=24
GATEWAY=192.168.10.2
DNS1=8.8.8.8

 

 

 

 

 

 

 

 

 

 第四步:重启网卡

#service network restart

 

posted @ 2015-03-07 22:00  zsls  阅读(140)  评论(0编辑  收藏  举报