# not recognizing network device - enp2s0 does not exist

## desimo

I have been experiencing some kernel panics recently.  These have occurred during normal use, after the system has been up for several hours or days.

Then, this morning all networking is down.  I tried the following:

  > sudo /etc/init.d/net.enp2s0 start

  * ERROR: interface enp2s0 does not exist

  * Ensure that you have loaded the correct kernel module for your hardware.

  * ERROR: net.enp2s0 failed to start

  lspci -v shows that the r8139 module is loaded and the hardware is still recognized.

Am I facing a bad network controller?  Or is there any other possible explanation?

----------

## NeddySeagoon

desimo,

What interfaces does uname -a show?

----------

## desimo

Uname -a

Linux dis 3,10.25-gentoo #1 SMP mon jan 27 14.57 CST 2014 x86_64 amd phenom II x4 authentic amd gnu/Linux

----------

## desimo

Ls -l /sys/class/net

Only shows lo and sit0 symlinks to ../../devices/virtual/net

Not familiar with sit0

----------

## NeddySeagoon

desimo,

Oops ... I should have said 

```
ifconfig -a
```

so we con see all the network interfaces you have.

----------

## desimo

I have lo and sit0.

----------

## NeddySeagoon

desimo,

Does 

```
dmesg | grep eth
```

show anything ?

Your interface should have been called ethX before it was renamed by udev

----------

## desimo

Booted into an old kernel to test:

ifconfig -a

  enp2s0

  lo

  sit0

ifconfig enp2s0 up

ifconfig -a

  enp2so<UP,...>

My net.lo is missing from /etc/init.d/ as well (I was trying to create a symlink from net.sit0 to net.lo and I must have reversed the order)  Anyway, is there any way to recreate that file.  At this point, I probably deserve whatever I get.

Do I need to grab a gentoo cd and reinstall baselayout off of that, or something?

Thanks

----------

## desimo

Dmesg|grep eth

No results

----------

## NeddySeagoon

desimo,

Is the device still listed in lspci?

Does a 

```
shutdown -r now
```

fix it?

----------

## desimo

lscpi still shows the device and looks just like it always did.

I have rebooted several times during this process and still nothing has changed.

----------

## Hu

OP: you say that the enp device appeared when you booted an "old" kernel to test.  Which kernel was that, and what is the version where you have been getting kernel panics?

----------

## desimo

The old kernel was 3.10.9.  I was experiencing the kernel panics with this kernel, which is the reason I decided to upgrade.

The new kernel is 3.10.25.  I have also experienced kernel panics with this kernel.  They look about the same.  messages lists comm: swapper and comm: jbd2 as I recall.  The machine ran all weekend without panicking.  It wasn't being used, and the networking is down, of course.

It might be important to note that upgrading the kernel did not make my enp interface disappear.  Because I was running fine for 2 days with the new kernel (I panicked once or twice during that time and rebooted, as well)

I think I ran a 

```
make menuconfig
```

 and then 

```
make && make modules_install
```

 just prior to this issue happening.  I never ended up using the kernel that I compiled; I changed an unrelated option but I thought I would mention it.

As I said, when I do 

```
lspci -vv
```

 I can see that r8169 is loaded and the ethernet device shows just like it always did.

----------

