8

I installed CentOS 6.3 on my hardrive partition (new install...minimal install).

After successful installation, I see that eth0 was down. I looked for this file: /etc/udev/rules.d/70-persistent-net.rules but did not find it.

Here's my ifcfg-eth0 settings: Note I had to create this file manually

DEVICE=eth0
HWADDR=*
BOOTPROTO=dhcp
ONBOOT=yes
TYPE=ETHERNET

This machine is connected to Ethernet (I have Windows 7 on another partition and I am able to connect to Internet with that just fine).

$ ifconfig -a | grep eth

returns no result

$ ethtool eth0 

returns Cannot get device settings : No such device...

What can I try to get CentOS to detect eth0?

slm
  • 369,824
Vikram
  • 243
  • 1
  • 3
  • 11
  • What type of device is it? Does it show in lspci, as what does it get identified? Is it USB? lsusb ... – tink Oct 30 '12 at 19:04
  • device is a NIC. It does not show up in lspci. lspci returns command not found – Vikram Oct 30 '12 at 19:28
  • Can you try to install the pciutils RPM? Without that diagnostics may be difficult. Do you see any mention of eth in /var/log/syslog or the output of dmesg? – tink Oct 30 '12 at 19:37
  • grep eth in dmesg returns nothing. Could not install pciutils as it throws me this error PYCURL ERROR 6 - "Couldn't resolve host mirrorlist.centos.org" ...I believe this error again may be related to NIC card not available – Vikram Oct 30 '12 at 19:45
  • Try getting the RPM on another box, and move it to your centos install via e.g., USB Stick? – tink Oct 30 '12 at 20:08
  • @tink thank you for your inputs!!...I did used a netinstall image and configured as a software development machine. Now I am able to connect to the Internet on CentOS 6.3. When I now do ifconfig -a it shows me p128p1 interface in addition to lo – Vikram Oct 30 '12 at 21:54
  • http://unix.stackexchange.com/questions/55381/no-network-connection-in-centos-6-3-minimal-under-vmware-player –  Mar 05 '13 at 10:32
  • I could not figure out how to fix this. I downloaded the netinstall iso version and that worked like a charm. – Vikram Nov 02 '12 at 14:28
  • Somewhat related to this Q: http://unix.stackexchange.com/questions/110496/cloned-linux-system-and-etc-udev-rules-d-70-persistent-net-rules/110501#110501. – slm Aug 04 '15 at 00:21

2 Answers2

6

In my situation, I changed the network adapter configuration of my hypervisor after the installation of CentOS. What happened in this case is that the old interface eth0 no longer existed but a new one called eth1 did.

ls /sys/class/net
eth1 lo

I changed the network config /etc/sysconfig/network-scripts/ifcfg-eth0 to use DEVICE=eth1 and it worked again.

  • 1
    Curiously, after doing some changes on HW settings of an OVF, I also ran into this situation (CentOS 6.2). My solution was to simply rename /sys/class/net/eth1 into /sys/class/net/eth0 and reboot. On next reboot, the interface went up normally. Not sure if that was the right thing to do but it fixed the issue. – quantum Nov 09 '15 at 03:06
  • I used ifcfg-up eth0 to bring eth0 back to life. In my server eth0 was present – VSB Nov 26 '15 at 19:08
0

Since you specified this is an non-cloned setup I will assume that you are using a virtualization environment for your machine. If so, than the solution that worked for me on a Centos 5 was to simply change the network adapter type from vmxnet3 to e1000.

For me it was like this:

  1. create a virtual machine in the vcenter(hypervisor).
  2. click on edit on that particular machine
  3. hardware -> add -> network adapter(ethernet adapter) . change the type to e1000
  4. install the OS