# eth0 doesn't exist after first gentoo installation

## Nadebu

Hello everyone,

This is my first time ever installing any kind of Linux OS - and gentoo is really awesome..

[Coming from a 6 years Windows Sys Admin]

This is on VMware Workstation for testing purposes..

I've managed to successfully compile the kernel and boot into gentoo,

yet while I go to ifconfig -a  I can't see eth0 anywhere.

I've emerged dhcpcd while I was on the livecd, and I've also edited  conf.d and used rc-update to shove it to load on start-up.

From what I've understood, my kernel doesn't load the right module.. I've tried alot of methods yet I'm still stuck with this.

here's my lspci  : http://i62.tinypic.com/2hofl0w.jpg

lsmod on liveCD : http://i59.tinypic.com/2qt9ts1.png

lsmod on Gentoo : http://i57.tinypic.com/ouce8h.png

Thanks in advance,

Nadav

----------

## xaviermiller

Hello,

With newer udev or systemd, the ethernet interface is not named eth0, but for example en4ps3.

Can you provide the output of ifconfig ?

----------

## Nadebu

Hey, thanks alot for your fast reply!

here's my ifconfig -a :

http://i58.tinypic.com/33u78lg.png

----------

## NeddySeagoon

Nadebu,

Welcome to Gentoo.

Your lsmod images are truncated. No matter,

That PCnet32 network interface is very old. It maay not be made in your kernel.

Heres what the kernel help says

```
  ┌──────────────────────────────── AMD PCnet32 PCI support ─────────────────────────────────┐

  │ CONFIG_PCNET32:                                                                          │  

  │                                                                                          │  

  │ If you have a PCnet32 or PCnetPCI based network (Ethernet) card,                         │  

  │ answer Y here and read the Ethernet-HOWTO, available from                                │  

  │ <http://www.tldp.org/docs.html#howto>.                                                   │  

  │                                                                                          │  

  │ To compile this driver as a module, choose M here. The module                            │  

  │ will be called pcnet32.                                                                  │  

  │                                                                                          │  

  │ Symbol: PCNET32 [=n]                                                                     │  

  │ Type  : tristate                                                                         │  

  │ Prompt: AMD PCnet32 PCI support                                                          │  

  │   Location:                                                                              │  

  │     -> Device Drivers                                                                    │  

  │       -> Network device support (NETDEVICES [=y])                                        │  

  │         -> Ethernet driver support (ETHERNET [=y])                                       │  

  │           -> AMD devices (NET_VENDOR_AMD [=y])                                           │  

  │   Defined at drivers/net/ethernet/amd/Kconfig:58                                         │  

  │   Depends on: NETDEVICES [=y] && ETHERNET [=y] && NET_VENDOR_AMD [=y] && PCI [=y]        │  

  │   Selects: CRC32 [=y] && MII [=y]
```

So 

```
modprobe pcnet32
```

 is a good start.  Does you ethernet appear then?

If not, what does grep PCNET32 /usr/src/linux/.config show?

----------

## Nadebu

Hey   :Smile: 

I've tried modprobe pcnet32.. didn't work.

Here's the output of grep PCNET32:

CONFIG_PCNET32=m

----------

## NeddySeagoon

Nadebu,

CONFIG_PCNET32=m is a good sign.

What error did you got from modprobe?

A return to the command prompt with no output means that it worked.

What interfaces does 

```
ifconfig -a 
```

list after the modprobe?

```
dmesg | grep -A10 eth0
```

may well show eth0 being renamed.

----------

## Nadebu

Hey,

By "didn't work" I meant as I didn't get the networking to work yet  :Very Happy: 

The command executed fine.

Here is dmesg, I see it was renamed to a whole different name? 

http://postimg.org/image/ro6je50xd/

----------

## NeddySeagoon

Nadebu,

Thats udev taking eth0 and ripping its head off.

The feature is called persistent device naming.

You can either disable persistent device naming or go with the new name.

```
dhcpcd eno16777736 
```

should bring up the interface, if you have dhcpcd installed.

I think the name wrapped in your console image.

As the interface was renamed before root was mounted (your modprobe loaded a module that was already loaded), I guess that you are either using systemd or don't have dhcpcd installed.

openrc with dhcpcd would tave started the interface, even though its been renamed.

----------

## Nadebu

It worked, thanks alot!

I have in init.d/net a configuration called "config_eth0=dhcp" 

while I was on chroot on livecd.

should I change it to the new interface name and add "dhcp"?

----------

## Jaglover

Are you using systemd.

----------

## xaviermiller

With openrc, you can simply add dhcpcd as boot service, and remove net.eth" services, as described in TIP: Complete network stack without net.* scripts

----------

## WWWW

remarkable from win straight to gentoo!

It is worth mentioning that both Gentoo (linux in general in the kernel) and vmware do have virtual interfaces solutions. If you get to know this now that you are using a VM it opens up more option for networking in the future. Not to mention that you'll familiarize with modern net VM solutions.

----------

