Startup Debian 10 error: networking.service loading failed
Solution 1
The underlying problem seems to be:
Jul 14 20:59:05 debian ifup[799]: Cannot find device "eth0"
You should run ip link show
to verify the names of your network interfaces. Your system might be using the new predictable network interface names, and so if your NIC is built in to the system's motherboard, it might be eno1
instead of the classic eth0
. But if the DMI data within the system firmware does not properly declare the NIC as an integrated, it might be something like enp#s#
where # represents numbers corresponding to the PCI bus and slot IDs of the NIC.
Since the message comes from ifup
, you apparently aren't using NetworkManager, so if the name of the network interface is not eth0
, you'd only need to edit the /etc/network/interfaces
file and/or any files in directory /etc/network/interfaces.d/
to specify the correct name of the network interface to configure.
If, on the other hand, the ip link show
output only lists the loopback interface, like this:
# ip link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
Then the system has failed to automatically load the correct kernel module to drive your NIC. In that case, the output of lspci -nn
(or just the line identifying your NIC) would be helpful in identifying the exact make and model of your NIC.
Solution 2
User telcoM's suggestion of grepping for eth0 helped me resolve this issue when I encountered it. In file /etc/network/interfaces.d/setup, I found two references to eth0 and changed them to enp0s3, which is the Ethernet interface on the system I'm working with (Debian 10.0 running on VirtualBox's Intel PRO/1000 MT Desktop adapter.)
The contents of this file now look like this:
auto lo iface lo inet loopback # auto eth0 # auto eth0 inet dhcp auto enp0s3 iface enp0s3 inet dhcp
Hopefully this will be useful to someone else. Thanks, telcoM!
Related videos on Youtube

George G.
Updated on September 18, 2022Comments
-
George G. 3 months
I've noticed that every time I turn on my PC, there is a line in red. My PC is pretty fast so I don't get to read the problem. I haven't experienced or noticed any problem with my system, but I'm curious.
I've run
systemctl --failed
and I get the following output.UNIT LOAD ACTIVE SUB DESCRIPTION ● networking.service loaded failed failed Raise network interfaces LOAD = Reflects whether the unit definition was properly loaded. ACTIVE = The high-level unit activation state, i.e. generalization of SUB. SUB = The low-level unit activation state, values depend on unit type. 1 loaded units listed. Pass --all to see loaded but inactive units, too. To show all installed unit files use 'systemctl list-unit-files'.
systemctl status networking.service
then outputs the following.networking.service - Raise network interfaces Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled Active: failed (Result: exit-code) since Sun 2019-07-14 20:59:05 AWST; 4min 27s ago Docs: man:interfaces(5) Process: 799 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1/FAILURE Main PID: 799 (code=exited, status=1/FAILURE)</code></pre><pre><code>sudo journalctl _SYSTEMD_UNIT=networking.service</pre><code><pre><code> -- Logs begin at Sun 2019-07-14 20:59:03 AWST, end at Sun 2019-07-14 21:06:14 AWST. -- Jul 14 20:59:05 debian dhclient[863]: Internet Systems Consortium DHCP Client 4.4.1 Jul 14 20:59:05 debian dhclient[863]: Copyright 2004-2018 Internet Systems Consortium. Jul 14 20:59:05 debian ifup[799]: Internet Systems Consortium DHCP Client 4.4.1 Jul 14 20:59:05 debian ifup[799]: Copyright 2004-2018 Internet Systems Consortium. Jul 14 20:59:05 debian ifup[799]: All rights reserved. Jul 14 20:59:05 debian ifup[799]: For info, please visit https://www.isc.org/software/dh Jul 14 20:59:05 debian dhclient[863]: All rights reserved. Jul 14 20:59:05 debian dhclient[863]: For info, please visit https://www.isc.org/softwar Jul 14 20:59:05 debian dhclient[863]: Jul 14 20:59:05 debian ifup[799]: Cannot find device "eth0" Jul 14 20:59:05 debian dhclient[863]: Failed to get interface index: No such device Jul 14 20:59:05 debian ifup[799]: Failed to get interface index: No such device Jul 14 20:59:05 debian ifup[799]: If you think you have received this message due to a b Jul 14 20:59:05 debian ifup[799]: than a configuration issue please read the section on Jul 14 20:59:05 debian ifup[799]: bugs on either our web page at www.isc.org or in the R Jul 14 20:59:05 debian ifup[799]: before submitting a bug. These pages explain the prop Jul 14 20:59:05 debian ifup[799]: process and the information we find helpful for debugg Jul 14 20:59:05 debian ifup[799]: exiting. Jul 14 20:59:05 debian dhclient[863]: Jul 14 20:59:05 debian dhclient[863]: If you think you have received this message due to Jul 14 20:59:05 debian dhclient[863]: than a configuration issue please read the section Jul 14 20:59:05 debian dhclient[863]: bugs on either our web page at www.isc.org or in t Jul 14 20:59:05 debian dhclient[863]: before submitting a bug. These pages explain the Jul 14 20:59:05 debian dhclient[863]: process and the information we find helpful for de Jul 14 20:59:05 debian dhclient[863]: Jul 14 20:59:05 debian dhclient[863]: exiting. Jul 14 20:59:05 debian ifup[799]: ifup: failed to bring up eth0</code></pre>
What is happening? Is anything wrong with my system?
-
George G. over 3 yearsWhat if the only line in
/etc/network/interfaces
issource-directory /etc/network/interfaces.d
and then in/etc/network/interfaces.d/setup
two lines showsauto lo iface lo inet loopback auto eth0 iface eth0 inet dhcp
-
telcoM over 3 yearsThen also check any files in directory
/etc/network/interfaces.d
for references toeth0
, and replace them with the actual name of your NIC. -
George G. over 3 yearsShould i replace
auto eth0 iface eth0 inet dhcp
withauto nameofactualnameofnic iface nameofactualnameofnic inet dhcp
-
George G. over 3 yearsall seems to have worked but now I am getting another error
NetworkManager-wait-online.service loaded failed failed
-
telcoM over 3 yearsYes, your replacement strategy looks correct. The failure of
NetworkManager-wait-online.service
is expected if NetworkManager is not used. To get rid of the message, you can usesystemctl reset-failed NetworkManager-wait-online.service
, thensystemctl mask NetworkManager-wait-online.service
to stop it from happening again. If you install NetworkManager later, then usesystemctl unmask NetworkManager-wait-online.service
to allow that service to run again. -
George G. over 3 yearsNow I don't get a failure anymore but
a start job is running for Raise network interfaces
takes at least 1 minute and it makes the boot process really slow. Is there anything else I can do? -
telcoM over 3 yearsFrom your
systemctl status networking.service
output, it looks like something is still trying to findeth0
and would need to be updated to use the actual name of your NIC. It might be some script in/etc/network/if-*.d/
directories. I'd suggest running agrep -r eth0 /etc |less
and checking all the places it finds. -
h3dkandi about 2 yearsSure this fixed the network fail problem but now something else broke and I don't have internet. So reverted the change.
-
h3dkandi about 2 yearsThis morning I didn't have network connection. Decided to make the change you suggested again. After restarting PC now I have internet. I just dunno what is going on. When I go to settings -> network it says my wired connection is unplugged. So people reading this answer should check for them selves if it works for them or not.