Situation: Gentoo with kernel 3.8.4


udev 218

no systemd, no initram, no old network udev rules

Previously 3 network interfaces (2 x onboard, 1 pci , all r8189 module ones)

After an short circuit on the network the 2 onboard devices stopped working and i disabled them in Bios and added a PCI R8189 Gibt modul which works nice (internet, ssh , transfer of data, everything fine)

lspci |grep Eth
03:01.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8169 PCI Gigabit Ethernet Controller (rev 10)

However after upgrading samba to version 4 and a restart of the samba service following error message:

 /etc/init.d/samba restart
 * Caching service dependencies ...                                                                               [ ok ]
 * Bringing up interface enp2s0
 *   ERROR: interface enp2s0 does not exist
 *   Ensure that you have loaded the correct kernel module for your hardware
 * ERROR: enp2s0 failed to start
 * ERROR: cannot start samba as enp2s0 would not start

so i tried to find out where the "old" info is still showing:

rc-update show
         bootmisc | boot
       consolekit | boot
            devfs |                       sysinit
            dmesg |                       sysinit
             fsck | boot
           hdparm |      default
         hostname | boot
          hwclock | boot
          keymaps | boot
        killprocs |              shutdown
       lm_sensors |      default
            local |      default
       localmount | boot
         loopback | boot
          modules | boot
         mount-ro |              shutdown
             mtab | boot
           net.lo | boot
         netmount |      default
             nrpe |      default
           procfs | boot
             root | boot
            samba |      default
        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
       vixie-cron |      default

AN grep enp2s0 2>/dev/null /etc/* (and all subdirectorys) showed no entry in any config file.

Searching on the net and here only showed me how to react an non-showing interface, explained the renaming to the now PredictableNetworkInterfaceNames named interfaces. The Similiar Question list did show some promising questions, but nothing was actually related. (OP installed wrong kernel, had problems with renaming the interfaces etc.)

So where is the net script getting the info from that there are still at least 2 active ethernet interfaces?

For now i removed the dependany on "need net" in /etc/init.d/samba but obviously this is just a workarround which only works shortly.

bastille-firewall binfmt bootmisc busybox-ntpd busybox-watchdog   consolefont 
consolekit cpufrequtils cups-browsed cupsd dbus devfs dhcpcd dmesg enp2s0 
fancontrol fsck functions.sh gdm_mine git-daemon gpm hddtemp hdparm heimdal-kadmind 
heimdal-kcm heimdal-kdc heimdal-kpasswdd hostname hwclock ip6tables iptables 
keymaps killprocs kmod-static-nodes lm_sensors local localmount loopback 
modules mount-ro mtab net.lo netmount nrpe ntp-client ntpd numlock openvpn 
osclock pciparm procfs psad pydoc-2.7 pydoc-3.3 reboot.sh root rsyncd 
s6-svscan samba savecache shutdown.sh sntp sshd swap swapfiles swclock 
sysctl sysfs syslog-ng sysstat termencoding tmpfiles.dev tmpfiles.setup udev 
udev-settle udev-trigger urandom vixie-cron

And DMESG output (redacted from the MAC)

dmesg |grep eth
[   10.012637] r8169 0000:03:01.0 eth0: RTL8169sb/8110sb at 0xffffc90010e84c00, [MAC], XID 10000000 IRQ 17
[   10.012641] r8169 0000:03:01.0 eth0: jumbo features [frames: 7152 bytes, tx checksumming: ok]
  • Could you pleas provide the output of ls /etc/init.d and a cat /etc/conf.d? Also, a dmesg | grep eth
    – eyoung100
    Commented Jun 29, 2015 at 23:33
  • @eyoung100 the issue might have gone away after my last updates, needing to check the versions etc, which i can't do right now. If you happen to have a specific reason during March and now which might be a bugreport or similiar, feel free to answer with that. If not, i will post an answer tomorrow with details of the changes and possibly trying to revert until i find the exact fix. Commented Jun 30, 2015 at 10:10
  • nothing in the samba or udev changelogs (samba v 4.1.17 vs samba v 4.1.18, udev 218 vs 220-r3) shows related info directly visible via the package changelogs in portage. Sadly i can't reproduce the issue anymore, need net works fine now. Guess there was some init script lurking arround someone fixed by a cleanup for one of the updates i installed recently. Commented Jun 30, 2015 at 19:22
  • I need a listing to verify that you have removed net.enp2s0.
    – eyoung100
    Commented Jun 30, 2015 at 19:25
  • i did remove net.enp2so (was the first i did) , however there was a file /etc/init.d/enp2so linking to net.lo so feel free to add an answer i can accept. Why this is named that strange is beyond me though (guess usual layer 8) Commented Jun 30, 2015 at 19:28

1 Answer 1


Why The Strange Naming ?

Do you remember this Tidbit from the Handbook? Of particular importance is Handbook:AMD64/Networking/Introduction

To get started configuring the network card, tell the Gentoo RC system about it. This is done by creating a symbolic link from net.lo to net.eth0 (or whatever the network interface name is on the system) in /etc/init.d.

root # cd /etc/init.d
root # ln -s net.lo net.eth0

In your case, this was rewritten to:

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

due to the Persistent Naming Rules in sys-fs/udev and the kernel setting net.ifnames=0 which is the default.


Before doing this, if you wanted to take all networking off-line, you can issue: rc-update del net.lo boot, perform, the first 4 Steps below, then issue: rc-update add net.lo boot, and issue Step 5. This works because all network devices are linked to net.lo

  1. Issue a dmesg | grep renamed to see what enp2s0 was replaced by when you removed it.
  2. Then rm -v /etc/init.d/net.enp2s0, and the other interfaces that don't exist, ie. the grep above will give you what the kernel "sees," so if you have extra net files delete them, but do not remove net.lo!
  3. Recreate the link with ln -s /etc/init.d/net.lo /etc/init.d/net.the_new_names_from_step1 for each device that was in the grep if you have multiple new NICS.
  4. Delete your Samba hack, ie reenable need net
  5. Reboot

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .