Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED]network doesn't start at boot, but does start man...
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
jody
l33t
l33t


Joined: 16 Oct 2007
Posts: 668
Location: Switzerland

PostPosted: Thu Apr 28, 2016 2:54 pm    Post subject: [SOLVED]network doesn't start at boot, but does start man... Reply with quote

Hi
I have just installed gentoo on a computer, i used 'genkernel -all' to build the kernel.

To find the name to use for the networks i did 'ifconfig -a':
Code:
 # ifconfig -a
enp1s0: flags=4163<BROADCAST,MULTICAST>  mtu 1500
        ether XX:XX:XX:XX:XX:XX  txqueuelen 1000  (Ethernet)
        RX packets 187  bytes 23866 (23.3 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 79  bytes 11965 (11.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 16  memory 0xfaee0000-faf00000 

enp2s0: flags=4098<BROADCAST,MULTICAST>  mtu 1500
        ether XX:XX:XX:XX:XX:XX  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 16  memory 0xfafe0000-fb000000 

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1  (Local Loopback)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


I created a net.enp1s0
Code:
 # ls -l /etc/init.d/net.*
lrwxrwxrwx 1 root root     6 Apr 28 17:55 /etc/init.d/net.enp1s0 -> net.lo
-rwxr-xr-x 1 root root 17415 Apr 21 07:22 /etc/init.d/net.lo

and added it to rc level default:
Code:
 # rc-update
               binfmt | boot                         
             bootmisc | boot                         
               cronie |      default                 
                devfs |                       sysinit
                dmesg |                       sysinit
                 fsck | boot                         
             hostname | boot                         
              hwclock | boot                         
              keymaps | boot                         
            killprocs |              shutdown       
    kmod-static-nodes |                       sysinit
                local |      default                 
           localmount | boot                         
             loopback | boot                         
              modules | boot                         
             mount-ro |              shutdown       
                 mtab | boot                         
           net.enp1s0 |      default                 
             netmount |      default                 
               procfs | boot                         
                 root | boot                         
            savecache |              shutdown       
                 sshd |      default                 
                 swap | boot                         
            swapfiles | boot                         
               sysctl | boot                         
                sysfs |                       sysinit
            syslog-ng |      default                 
         termencoding | boot                         
         tmpfiles.dev |                       sysinit
       tmpfiles.setup | boot                         
                 udev |                       sysinit
              urandom | boot                         


When i reboot the computer, the network is not started,
but when i manually do '/etc/init.d/net.enp1s0 start' the network starts without a problem.
Interestingly, i have yesterday installed gentoo on an identical machine with the same installation cd, and there i did not have this problem.

The log file shows something weird:
Code:
Apr 28 17:32:19 squid_01 syslog-ng[2873]: syslog-ng starting up; version='3.7.2'
Apr 28 17:32:19 squid_01 crond[2901]: (CRON) STARTUP (1.5.0)
Apr 28 17:32:19 squid_01 crond[2901]: (CRON) INFO (Syslog will be used instead of sendmail.)
Apr 28 17:32:19 squid_01 crond[2901]: (CRON) INFO (RANDOM_DELAY will be scaled with factor 29% if used.)
Apr 28 17:32:19 squid_01 crond[2901]: (CRON) INFO (running with inotify support)
Apr 28 17:32:19 squid_01 /etc/init.d/net.eth0[2992]: ERROR: interface eth0 does not exist
Apr 28 17:32:19 squid_01 /etc/init.d/net.eth0[2993]: Ensure that you have loaded the correct kernel module for your hardware
Apr 28 17:32:19 squid_01 /etc/init.d/net.eth0[2907]: ERROR: net.eth0 failed to start
Apr 28 17:32:19 squid_01 /etc/init.d/netmount[2995]: ERROR: cannot start netmount as net.eth0 would not start
Apr 28 17:32:19 squid_01 sshd[3019]: Server listening on 0.0.0.0 port 22.
Apr 28 17:32:19 squid_01 sshd[3019]: Server listening on :: port 22.

Why does it want to start net.eth0 (it doesn't even exist, and it is not shown by rc-update), and doesn't try net.enp1s0?

Can anybody help here?

Thank You
Jody


Last edited by jody on Fri Apr 29, 2016 11:54 am; edited 1 time in total
Back to top
View user's profile Send private message
Maxxx
Guru
Guru


Joined: 12 Jan 2016
Posts: 595
Location: Italia

PostPosted: Thu Apr 28, 2016 4:47 pm    Post subject: Reply with quote

Do you follow guide?

https://wiki.gentoo.org/wiki/Handbook:X86/Full/Networking


But instead of eth0 put enp1s0?
Back to top
View user's profile Send private message
jody
l33t
l33t


Joined: 16 Oct 2007
Posts: 668
Location: Switzerland

PostPosted: Thu Apr 28, 2016 6:44 pm    Post subject: Reply with quote

I followed the installation handbook, but what i did can't be all wrong, because i can manually start the network.
But thanks for the link! What is especially interesting is the rc logging - i'll have a look into that.

But i i still don't understand, why my computer wants to start net.eth0...
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3664

PostPosted: Thu Apr 28, 2016 6:48 pm    Post subject: Re: network doesn't start at boot, but does start manually Reply with quote

jody wrote:
Why does it want to start net.eth0 (it doesn't even exist, and it is not shown by rc-update), and doesn't try net.enp1s0?

Sounds like you did some of the recommendations for how to Keep classic 'eth0' naming.
Renaming - if happening - can be seen from dmesg.
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 28, 2016 7:19 pm    Post subject: Re: network doesn't start at boot, but does start manually Reply with quote

charles17 wrote:
jody wrote:
Why does it want to start net.eth0 (it doesn't even exist, and it is not shown by rc-update), and doesn't try net.enp1s0?

Sounds like you did some of the recommendations for how to Keep classic 'eth0' naming.

charles17 ... that wouldn't explain how a non-existant service is started, and were this the case then that service wouldn't complain "interface eth0 does not exist".

@jody ... I'm hesitent to suggest anything with regard to the current openrc as I'm still using 0.12.4, and having given it some thought I can't think of a reason why your issue would occur. Anyhow, that said, please provide the following:

Code:
# ls -l  /etc/runlevel/default/*
# rc-status --all |tr -s ' '
# mount | grep run

You might try 'rc-update -u' but I'm inclined to think the issue is elsewhere.

best ... khay
Back to top
View user's profile Send private message
jody
l33t
l33t


Joined: 16 Oct 2007
Posts: 668
Location: Switzerland

PostPosted: Fri Apr 29, 2016 11:53 am    Post subject: Reply with quote

@khayyam:
I did a 'rc-update -u' and rebooted: now the network came up as expected.
Thanks!
Jody
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