2015年6月16日 星期二

[Linux 常見問題] How To Fix “Device eth0 does not seem to be present, delaying initialization” Error

Source From Here 
Preface 
I was playing with My Virtualbox today and i tried to clone some Centos Servers. But after this, when starting the eth0, it is no more available. 
# ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)


# ifup eth0
Device eth0 does not seem to be present, delaying initialisation

To Solve this 
Delete networking interface rules file so that it can be regenerated and reboot your CentOS system. 
# rm /etc/udev/rules.d/70-persistent-net.rules
# reboot

New Mac address has been generated: 
  1. # This file was automatically generated by the /lib/udev/write_net_rules  
  2. # program, run by the persistent-net-generator.rules rules file.  
  3. #  
  4. # You can modify it, as long as you keep each rule on a single  
  5. # line, and change only the value of the NAME= key.  
  6.   
  7. # PCI device 0x8086:0x100e (e1000)  
  8. SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:27:fe:c1:03", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"  
Now edit /etc/sysconfig/network-scripts/ifcfg-eth0
  1. # Add   new  HWADDR generated or  remove it   
  2. # Remove UUID   line  
  3. TYPE=Ethernet  
  4. HWADDR=08:00:27:fe:c1:03  
  5. BOOTPROTO=static  
  6. IPADDR=192.168.140.141  
  7. NETMASK=255.255.255.0  
  8. GATEWAY=192.168.140.2  
  9. DNS1=8.8.8.8  
  10. DNS2=168.95.1.1  
  11. DEFROUTE=yes  
  12. PEERDNS=yes  
  13. PEERROUTES=yes  
  14. IPV4_FAILURE_FATAL=no  
  15. IPV6INIT=yes  
  16. IPV6_AUTOCONF=yes  
  17. IPV6_DEFROUTE=yes  
  18. IPV6_PEERDNS=yes  
  19. IPV6_PEERROUTES=yes  
  20. IPV6_FAILURE_FATAL=no  
  21. NAME=eth0  
  22. #UUID=2014320a-4e80-44e4-8a94-050199a3dcd7  
  23. DEVICE=eth0  
  24. ONBOOT=yes  
Restart the networking service: 
# service network restart
Shutting down interface eth0: [ OK ]
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: Determining if ip address 192.168.1.99 is already in use for device eth0...
[ OK ]

# ifconfig
eth0 Link encap:Ethernet HWaddr 08:00:27:FE:C1:03
inet addr:192.168.1.99 Bcastxxxxxxx Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fefe:c103/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4400 errors:0 dropped:0 overruns:0 frame:0
TX packets:129 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:387597 (378.5 KiB) TX bytes:19567 (19.1 KiB)

Supplement 
CentOS & Device eth0 does not seem to be present 
複製虛擬機 Linux,網卡啟動失敗 Device eth0 does not seem to be...esent, delaying initialization

沒有留言:

張貼留言

[Git 常見問題] error: The following untracked working tree files would be overwritten by merge

  Source From  Here 方案1: // x -----删除忽略文件已经对 git 来说不识别的文件 // d -----删除未被添加到 git 的路径中的文件 // f -----强制运行 #   git clean -d -fx 方案2: 今天在服务器上  gi...