# [solved] Renamed interfaces

## mlisicki

Hi,

I'm still new to Gentoo. After last update I got my network interface renamed and I cannot seem to get networking to start automatically on boot anymore. No idea what I'm doing wrong. My previous interface was enp1s0. Now it's enp2s0. Below are few outputs which I find interresting, but let me know if you need any more information:

```

rc-update show

             bootmisc | boot                         

           consolekit |      default                 

                 dbus |      default                 

                devfs |                       sysinit

                dmesg |                       sysinit

                 fsck | boot                         

             hostname | boot                         

              hwclock | boot                         

              keymaps | boot                         

            killprocs |              shutdown        

                local |      default                 

           localmount | boot                         

             loopback | boot                         

              modules | boot                         

             mount-ro |              shutdown        

                 mtab | boot                         

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

           udev-mount |                       sysinit

              urandom | boot                   

ls -l /etc/init.d

-rwxr-xr-x 1 root root   571 May  5  2014 bluetooth

-rwxr-xr-x 1 root root  4595 Feb  6  2014 bootmisc

-rwxr-xr-x 1 root root   372 Feb  6  2014 busybox-ntpd

-rwxr-xr-x 1 root root   334 Feb  6  2014 busybox-watchdog

-rwxr-xr-x 1 root root  1404 Feb  6  2014 consolefont

-rwxr-xr-x 1 root root   627 Feb 15  2014 consolekit

-rwxr-xr-x 1 root root  1729 Feb 15  2014 crypto-loop

-rwxr-xr-x 1 root root   386 May  5  2014 cups-browsed

-rwxr-xr-x 1 root root   497 May  5  2014 cupsd

-rwxr-xr-x 1 root root  1185 May  5  2014 dbus

-rwxr-xr-x 1 root root   843 Feb  6  2014 devfs

-rwxr-xr-x 1 root root   327 Feb 12  2014 dhcpcd

-rwxr-xr-x 1 root root   309 Feb  6  2014 dmesg

-rwxr-xr-x 1 root root  2676 Feb  6  2014 fsck

lrwxrwxrwx 1 root root    25 Feb  6  2014 functions.sh -> /lib64/rc/sh/functions.sh

-rwxr-xr-x 1 root root   756 Feb 12  2014 fuse

-rwxr-xr-x 1 root root   655 Feb 13  2014 gpm

-rwxr-xr-x 1 root root   500 Feb  6  2014 hostname

-rwxr-xr-x 1 root root  2703 Feb  6  2014 hwclock

-rwxr-xr-x 1 root root  1726 Feb  6  2014 keymaps

-rwxr-xr-x 1 root root   404 Feb  6  2014 killprocs

-rwxr-xr-x 1 root root   584 May  5  2014 kmod-static-nodes

-rwxr-xr-x 1 root root   955 Feb  6  2014 local

-rwxr-xr-x 1 root root  2111 Feb  6  2014 localmount

-rwxr-xr-x 1 root root   762 Feb  6  2014 loopback

-rwxr-xr-x 1 root root  1509 Feb  6  2014 modules

-rwxr-xr-x 1 root root  1071 Feb  6  2014 mount-ro

-rwxr-xr-x 1 root root   821 Feb  6  2014 mtab

lrwxrwxrwx 1 root root     6 Jan  2 10:26 net.enp2s0 -> net.lo

-rwxr-xr-x 1 root root 17412 Feb  6  2014 net.lo

-rwxr-xr-x 1 root root  1583 Feb  6  2014 netmount

-rwxr-xr-x 1 root root  1094 May  5  2014 nullmailer

-rwxr-xr-x 1 root root   698 Feb  6  2014 numlock

-rw-r--r-- 1 root root  2704 Jan  2 11:19 out

-rwxr-xr-x 1 root root  1871 Dec 31 20:22 pciparm

-rwxr-xr-x 1 root root  2019 Feb  6  2014 procfs

-rwxr-xr-x 1 root root   518 Feb 16  2014 pwcheck

-rwxr-xr-x 1 root root   736 Feb 15  2014 pydoc-2.7

-rwxr-xr-x 1 root root   736 Feb  6  2014 pydoc-3.3

-rwxr-xr-x 1 root root   304 Feb  5  2014 reboot.sh

-rwxr-xr-x 1 root root   969 Feb  6  2014 root

-rwxr-xr-x 1 root root   357 Feb  6  2014 rsyncd

-rwxr-xr-x 1 root root   524 Feb 16  2014 saslauthd

-rwxr-xr-x 1 root root  1121 Feb  6  2014 savecache

-rwxr-xr-x 1 root root   385 Feb  5  2014 shutdown.sh

-rwxr-xr-x 1 root root  2313 May  5  2014 sshd

-rwxr-xr-x 1 root root   827 Feb 13  2014 svnserve

-rwxr-xr-x 1 root root   805 Feb  6  2014 swap

-rwxr-xr-x 1 root root   787 Feb  6  2014 swapfiles

-rwxr-xr-x 1 root root   526 Feb  6  2014 swclock

-rwxr-xr-x 1 root root   703 Feb  6  2014 sysctl

-rwxr-xr-x 1 root root  3378 Feb  6  2014 sysfs

-rwxr-xr-x 1 root root  2052 May  5  2014 syslog-ng

-rwxr-xr-x 1 root root  1032 Feb  6  2014 termencoding

-rwxr-xr-x 1 root root   369 Feb  6  2014 tmpfiles.dev

-rwxr-xr-x 1 root root   332 Feb  6  2014 tmpfiles.setup

-rwxr-xr-x 1 root root  4322 Feb  6  2014 udev

-rwxr-xr-x 1 root root  2046 Feb  6  2014 udev-mount

-rwxr-xr-x 1 root root   932 Feb  6  2014 urandom

-rwxr-xr-x 1 root root  6032 May  5  2014 xdm

-rwxr-xr-x 1 root root   346 May  5  2014 xdm-setup

cat /etc/conf.d/net

config_enp2s0="dhcp"

cat /etc/conf.d/netmount

# You will need to set the dependencies in the netmount script to match

# the network configuration tools you are using. This should be done in

# this file by following the examples below, and not by changing the

# service script itself.

#

# Each of these examples is meant to be used separately. So, for

# example, do not set rc_need to something like "net.eth0 dhcpcd".

#

# If you are using newnet and configuring your interfaces with static

# addresses with the network script, you  should use this setting.

#

#rc_need="network"

#

# If you are using oldnet, you must list the specific net.* services you

# need.

#

# This example assumes all of your netmounts can be reached on

# eth0.

#

#rc_need="net.eth0"

#

# This example assumes some of your netmounts are on eth1 and some

# are on eth2.

#

#rc_need="net.eth1 net.eth2"

#

# If you are using a dynamic network management tool like

# networkmanager, dhcpcd in standalone mode, wicd, badvpn-ncd, etc, to

# manage the network interfaces with the routes to your netmounts, you

# should list that tool.

#

#rc_need="networkmanager"

#rc_need="dhcpcd"

#rc_need="wicd"

#

# The default setting is designed to be backward compatible with our

# current setup, but you are highly discouraged from using this. In

# other words, please change it to be more suited to your system.

#

rc_need="net.enp2s0"

rc

ERROR: cannot start netmount as net.enp1s0 would not start

ifconfig

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 0  (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

ifconfig -a

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 0  (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

sit0: flags=128<NOARP>  mtu 1480

        sit  txqueuelen 0  (IPv6-in-IPv4)

        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

enp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

        inet6 fe80::beae:c5ff:fe57:8438  prefixlen 64  scopeid 0x20<link>

        ether bc:ae:c5:57:84:38  txqueuelen 1000  (Ethernet)

        RX packets 123  bytes 15514 (15.1 KiB)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 6  bytes 468 (468.0 B)

        TX errors 0  dropped 0 overruns 0  carrier 1  collisions 0

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 0  (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

```

Then after doing:

```

ifconfig enp2s0 up

dhcpcd enp2s0

```

everything works fine. But again - I can't make it start by default on boot.

Thanks for help in advanceLast edited by mlisicki on Sat Jun 07, 2014 10:24 pm; edited 1 time in total

----------

## khayyam

 *mlisicki wrote:*   

> 
> 
> ```
> ERROR: cannot start netmount as net.enp1s0 would not start
> ```
> ...

 

mlisicki ... can you post the output of the following:

```
# awk '!/(^#|^$)/' /etc/rc.conf
```

and ...

```
# ls /etc/runlevels/default/
```

best ... khay

----------

## mlisicki

Here you are. And thanks for the response.

```

$ awk '!/(^#|^$)/' /etc/rc.conf

rc_shell=/sbin/sulogin

rc_logger="YES"

unicode="YES"

rc_tty_number=12

$ ls /etc/runlevels/default/

consolekit  dbus  local  net.enp2s0  netmount  sshd  syslog-ng

```

For me it looks like I didn't commit/refresh something. Maybe the answer is obvious? I said I'm a noob in Gentoo yet. I completely restarted the system though. I don't assume I have to recompile the kernel or load any new modules. Maybe after the update something is not loading on boot correctly? Although I don't seem to have any more errors there.

Cheers.

----------

## khayyam

mlisicki ... 

I was looking for where net.enp1s0 might be, as its not set in the default runlevel and there is no symlink to net.lo. From the above it doesn't seem to be anywhere so its a bit of a mystery. Did you perhaps add some {use,need,after} definition to any of the files in /etc/conf.d/?

```
# grep enp1s0 /etc/conf.d/*
```

I'm really not sure where this is coming from, is your system clock correct? You might try the following:

```
# rc-update --update
```

You could also explicitly state that net.enp1s0 doesn't provide 'net' ... but this doesn't really tell us why netmount expects to start it and not net.enp2s0.

/etc/rc.conf

```
rc_net_enp1s0_provide="!net"

rc_dhcpcd_provide="!net"
```

If neither of these provides a solution then please post /var/log/rc.log and any relevant sections from dmseg.

best ... khay

----------

## krinn

netmount no more provides nfs, this is provide by nfsmount.

netmount still provides network, but even correct, i'm not sure any samba shares should be default state as "network" in a linux env. For me network would more fit nfs.

Perhaps you were saying "network" to tell us "nfs" shares are no more mount?

Might also disable new name scheme, as it fail for you (wow i was thinking that thing never fail !) ; because for whatever reason name was change, it mean it might change again soon or later.

rc_need="net.enp2s0" should also be change to rc_need="net"  in order to prevent next name change failure.

And i share khayyam suspicion that net.enp1s0 was add into some use,need,after config files. Maybe instead of changing it to enp2s0 better change it to net also, so anyone providing net will run instead to wait for a specific interface.

----------

## mlisicki

Wow. I would never expect this to be a solution. The same day I did my update I was also changing some hardware in my machine and I had a reason to restart the bios. After that I didn't care so far to adjust the clock there. Doing that solved all the issues. Thanks a lot Khay! (and everyone esle trying to help).

----------

## Majed17

had the same problem. the problem was the clock skew and i solved it by emerging ntp

----------

## Cyker

Wow, good catch guys!

I didn't realise an incorrect RTC could break the network card init... how does that even happen!?   :Shocked: 

----------

## khayyam

 *Cyker wrote:*   

> I didn't realise an incorrect RTC could break the network card init... how does that even happen!?

 

Cyker ... because openrc keeps a dependency tree cache, if a file in /etc/init.d/ is newer than the clock then the cache is askew.

best ... khay

----------

