Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
New install, interface naming issues with apache
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
jrobertson82
n00b
n00b


Joined: 18 Apr 2013
Posts: 2

PostPosted: Thu Apr 18, 2013 1:19 pm    Post subject: New install, interface naming issues with apache Reply with quote

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.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Thu Apr 18, 2013 2:22 pm    Post subject: Reply with quote

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:

Code:
# 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
Back to top
View user's profile Send private message
jrobertson82
n00b
n00b


Joined: 18 Apr 2013
Posts: 2

PostPosted: Thu Apr 18, 2013 3:08 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
gentux85
n00b
n00b


Joined: 27 Dec 2013
Posts: 1
Location: New Milford, CT USA

PostPosted: Fri Dec 27, 2013 2:05 pm    Post subject: Reply with quote

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!!!
_________________
Thank you,

Matthew J. Fitzpatrick
860.631.7535
mfitzct@gmail.com
Back to top
View user's profile Send private message
666threesixes666
Veteran
Veteran


Joined: 31 May 2011
Posts: 1248
Location: 42.68n 85.41w

PostPosted: Fri Dec 27, 2013 3:31 pm    Post subject: Reply with quote

"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.
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6097
Location: Dallas area

PostPosted: Fri Dec 27, 2013 5:18 pm    Post subject: Reply with quote

khayyam wrote:
persistent interface naming


*snicker*
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
donjames
Apprentice
Apprentice


Joined: 19 Dec 2004
Posts: 251
Location: 32°9'50" N 94°50'54" W

PostPosted: Thu Dec 18, 2014 3:12 am    Post subject: Reply with quote

Handbook still hasn't been updated.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum