# [SOLVED]network doesn't start at boot, but does start man...

## jody

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':

```
 # 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 

```
 # 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:

```
 # 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:

```
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

  JodyLast edited by jody on Fri Apr 29, 2016 11:54 am; edited 1 time in total

----------

## Maxxx

Do you follow guide?

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

But instead of eth0 put enp1s0?

----------

## jody

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...

----------

## charles17

 *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.

----------

## khayyam

 *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:

```
# 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

----------

## jody

@khayyam:

I did a  'rc-update -u' and rebooted: now the network came up as expected.

Thanks!

  Jody

----------

