# New install, interface naming issues with apache

## jrobertson82

OK, first off, forgive me if I am not asking the right stuff, I am new to gentoo, and my linux experience in general is limited.

I installed a fresh install of gentoo in a VM using the latest boot CD and the most current stage3 available.

I went through the Gentoo handbook for amd64, manually configured the kernel, got the LSI scsi drivers checked and am able to boot into my gentoo system using LILO. I used all the settings as specified in the Gentoo Handbook.

I need to install apache

I ran #emerge apache

Then, I tried to start apache

# /etc/init.d/apache2 start

The output I get states that "Error: interface eth0 does not exist" and then a few more lines that all fail because of the eth0 part

Networking is working just fine, but my interface is actually named "enp2s0"

It gets a DHCP address just fine, I can ping and all that good stuff.

Research shows that the interface name is expected with newer versions, but then how do I go about getting apache to work?

This same issue also prevents me from starting SSH, so I have to use the VMware console session to access right now.

Once again, forgive my ignorance if this is a stupid question, but a few hours of research online has not found any answers for me.

----------

## khayyam

jrobertson82 ...

Its not a stupid question at all, had you installed a week or so back it would have "just worked" but you have fallen victim to persistent interface naming. It seems that you have followed the handbook and so created /etc/init.d/net.eth0 as a link to /etc/init.d/net.lo "net.eth0" would have provided "net" and "net" is needed for apache to start. As your device name is nolonger called "eth0" but "enp2s0" you need to change the init (and any configuration) to reflect your device name:

```
# rc-update del net.eth0 default

# rm /etc/init.d/net.eth0

# ln -s /etc/init.d/net.lo /etc/init.d/net.enp2s0

# rc-update add net.enp2s0 default

# sed -i.bak 's/eth0/enp2s0/g' /etc/conf.d/net

# /etc/init.d/net.enp2s0 start

# /etc/init.d/apache2 start
```

That *should* be all thats needed, if "eth0" is hardcoded elsewhere then you may also need to change these to "enp2s0".

HTH & best ... khay

----------

## jrobertson82

Thank you very much, that fixed my problem. Yes, it seems like my timing is off a bit as the interface being named something other than eth0 seems like a new thing, yet the handbook has yet to be updated with that information, so for someone who is just starting out, its a bit confusing.

Thanks again for the answer, its up and running now.

----------

## gentux85

I was having the exact same problem just trying to start sshd service and kept getting the same error that net.eth0 is unable to start and does not exist so thank you VERY much for that fix! I didn't have the slightest clue on how to fix it and was getting frustrated. Is the handbook going to be updated so others don't have this problem? Thanks again and hope everyone has a very safe and Happy New Year!!!

----------

## 666threesixes666

"Is the handbook going to be updated so others don't have this problem?" NO, instead this broken handbooks going to go pollute the pristine wiki ecosystem.

----------

## Anon-E-moose

 *khayyam wrote:*   

> persistent interface naming

 

*snicker*

----------

## donjames

Handbook still hasn't been updated.

----------

