Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

networking.service cannot start due to unknown device

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
User avatar
PsySc0rpi0n
Posts: 322
Joined: 2012-10-24 13:54
Location: Bitcoin World
Has thanked: 8 times
Been thanked: 1 time

networking.service cannot start due to unknown device

#1 Post by PsySc0rpi0n »

Hello,

When I reboot my laptop I can see an error related to Network.service not being able to raise interfaces:

Code: Select all

[FAILED] Failed to start. Raise network interfaces. See 'systemctl status networking.service for details.
So, when I get to my terminal prompt, I run:

Code: Select all

systemctl status networking.service
and I get this:

Code: Select all

$ systemctl status networking.service
● networking.service - Raise network interfaces
   Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sun 2021-02-21 16:10:07 WET; 22s ago
     Docs: man:interfaces(5)
  Process: 18065 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1/FAILURE)
 Main PID: 18065 (code=exited, status=1/FAILURE)
So, I try to run that command on my own, like this:

Code: Select all

sudo ifup -a --read-environment
and I get this:

Code: Select all

$ sudo ifup -a --read-environment
Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Cannot find device "eth0"
Failed to get interface index: No such device

If you think you have received this message due to a bug rather
than a configuration issue please read the section on submitting
bugs on either our web page at www.isc.org or in the README file
before submitting a bug.  These pages explain the proper
process and the information we find helpful for debugging.

exiting.
ifup: failed to bring up eth0
From here I follow to check what's inside /etc/network/interfaces and I see:

Code: Select all

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback
There is no eth0 but there is an included file, so I go for it an check the contents of /etc/network/interfaces.d/setup and I see this:

Code: Select all

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp
So, why can't my debian see my eth0 device?

I run:

Code: Select all

sudo ifconfig -a
and I get this:

Code: Select all

$ sudo ifconfig -a
enp3s0f2: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet6 fe80::290:f5ff:fed2:7d56  prefixlen 64  scopeid 0x20<link>
        ether 00:90:f5:d2:7d:56  txqueuelen 1000  (Ethernet)
        RX packets 392  bytes 25320 (24.7 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 899  bytes 282343 (275.7 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  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 1000  (Local Loopback)
        RX packets 1611528  bytes 43959533865 (40.9 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1611528  bytes 43959533865 (40.9 GiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp4s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.112  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::864b:f5ff:fe16:b1cf  prefixlen 64  scopeid 0x20<link>
        ether 84:4b:f5:16:b1:cf  txqueuelen 1000  (Ethernet)
        RX packets 1049742  bytes 551666012 (526.1 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 762483  bytes 171822591 (163.8 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
There is no eth0 but there is this enp3s0f2 device. Seems that newer systems are using these names instead. So, what can I do to fix this problem? If I try to connect a TP Link repeater I have here to my laptop ethernet port, it just can't get an IP. I can't also connect to it directly by wireless despite the fact that my laptop can see it's wireless network. If I click on it, it just doesn't connect So I was trying to setup this repeater via ethernet but I can't make it work.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: networking.service cannot start due to unknown device

#2 Post by Head_on_a_Stick »

That's some good detective work OP, well done.

If you want to use ifupdown to configure your ethernet connection then correct the name of the interface in /etc/network/interfaces.d/setup or add a stanza for it in /etc/network/interfaces and delete the "setup" file. If you want to keep the "setup" file then perhaps delete the redundant loopback interface stanza. An alternative approach would be to disable the "predictable" interface nomenclature by following one of the methods described at the bottom of this page, that will cause the interface to be named "eth0" again.

If you would prefer to use NetworkManager (or another "high level" networking solution) then just delete /etc/network/interfaces.d/setup or disable networking.service with the systemctl command.

Not sure about your repeater problem though, I've never used one of those.
deadbang

User avatar
PsySc0rpi0n
Posts: 322
Joined: 2012-10-24 13:54
Location: Bitcoin World
Has thanked: 8 times
Been thanked: 1 time

Re: networking.service cannot start due to unknown device

#3 Post by PsySc0rpi0n »

Head_on_a_Stick wrote:That's some good detective work OP, well done.
Thank you sir. Problem is that I can't fix the problems. But I acknowledge that at least finding them is already not bad.
Head_on_a_Stick wrote: If you want to use ifupdown to configure your ethernet connection then correct the name of the interface in /etc/network/interfaces.d/setup or add a stanza for it in /etc/network/interfaces and delete the "setup" file. If you want to keep the "setup" file then perhaps delete the redundant loopback interface stanza. An alternative approach would be to disable the "predictable" interface nomenclature by following one of the methods described at the bottom of this page, that will cause the interface to be named "eth0" again.

If you would prefer to use NetworkManager (or another "high level" networking solution) then just delete /etc/network/interfaces.d/setup or disable networking.service with the systemctl command.

Not sure about your repeater problem though, I've never used one of those.
I ok with the naming scheme that names my ethernet device as "enp3s0f2" I can keep it.
The problem is that I'm not comfortable with networking in general and I'm afraid of messing my internet connection at all, and I can't afford that because my daughter is using my laptop for her online classes. I just can't afford to mess up the internet configuration (wireless internet) and make my daughter miss her classes.

I would like to use the command line to set it up and preferably just leave Wireless connection intact. Just don't mess with it so that I don't lose internet connection.

So, to make it short:
I can use the current naming shceme. "enp3s0f2" it is.
So, I should delete /etc/network/interfaces.d/setup file and add what you call a stanza (is this a line?) to /etc/network/interfaces, right? What would be this stanza/line?

Edited;
I read the link you sent me!

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: networking.service cannot start due to unknown device

#4 Post by Head_on_a_Stick »

If you're using a wireless connection then just delete /etc/network/interfaces.d/setup (or delete the line in /etc/network/interfaces that sources that file).
deadbang

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: networking.service cannot start due to unknown device

#5 Post by p.H »

Head_on_a_Stick wrote:(or delete the line in /etc/network/interfaces that sources that file).
I would not do that. It is a default line. Remove the bogus /etc/network/interfaces.d/setup is the right option.
By the way, does someone know what creates this file ? I read several reports about it and the trouble it causes, but have never seen it on any of my Debian installations.

User avatar
PsySc0rpi0n
Posts: 322
Joined: 2012-10-24 13:54
Location: Bitcoin World
Has thanked: 8 times
Been thanked: 1 time

Re: networking.service cannot start due to unknown device

#6 Post by PsySc0rpi0n »

p.H wrote:
Head_on_a_Stick wrote:(or delete the line in /etc/network/interfaces that sources that file).
I would not do that. It is a default line. Remove the bogus /etc/network/interfaces.d/setup is the right option.
By the way, does someone know what creates this file ? I read several reports about it and the trouble it causes, but have never seen it on any of my Debian installations.
You mean to delete the file or delete some line inside it?

mm3100
Posts: 336
Joined: 2020-10-21 21:39
Has thanked: 8 times
Been thanked: 13 times

Re: networking.service cannot start due to unknown device

#7 Post by mm3100 »

It is enough to comment out source /etc/network/interfaces.d/*,

Code: Select all

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

#source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

trinidad
Posts: 290
Joined: 2016-08-04 14:58
Been thanked: 14 times

Re: networking.service cannot start due to unknown device

#8 Post by trinidad »

Just out of curiosity for my own information as I see the same boot error on Buster which was not there on Stretch on the same machine: Did you set a static IP for your device during installation? I did with Stretch but I didn't with Buster. Stretch did not report the no eth0 error and I used the same logical naming convention for connections (no eth0) and in fact the interface uses the same logical name on both systems on the same machine. Not surprising since alx is a kernel mod. Everything works the same on Buster as it did on Stretch on the same machine, including wake-on-lan, shared wifi, multiple ssh connections, but Buster reports the error for me and Stretch did not, which makes me think systemd is slightly different and the installer sets up DHCP differently between the two, which makes me think not setting a static IP address may be the cause of the error.

Then again it may be changes in Internet connection parameters.
https://downloads.isc.org/isc/dhcp/4.4. ... 2-RELNOTES

TC
Last edited by trinidad on 2021-02-23 14:14, edited 1 time in total.
You can't believe your eyes if your imagination is out of focus.

mm3100
Posts: 336
Joined: 2020-10-21 21:39
Has thanked: 8 times
Been thanked: 13 times

Re: networking.service cannot start due to unknown device

#9 Post by mm3100 »

It has nothing to do with static IP, rather network naming scheme , which was changed from stretch to buster.
https://www.debian.org/releases/buster/ ... face-names

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: networking.service cannot start due to unknown device

#10 Post by p.H »

PsySc0rpi0n wrote:You mean to delete the file or delete some line inside it?
Delete the file /etc/network/interfaces.d/setup.
mm3100 wrote:It is enough to comment out source /etc/network/interfaces.d/*
Don't do that. It is a standard line. The line itself is fine. Only the file /etc/network/interfaces.d/setup is wrong.

trinidad
Posts: 290
Joined: 2016-08-04 14:58
Been thanked: 14 times

Re: networking.service cannot start due to unknown device

#11 Post by trinidad »

It has nothing to do with static IP, rather network naming scheme , which was changed from stretch to buster
Does NOT apply. I did not upgrade from Stretch to Buster. Clean new installs in both cases, and Stretch already used the new naming convention as I was well into the Buster release cycle before I installed it, and as I said both systems already used the logical naming convention, in fact the same interface name. Nothing to do with the issue reported from the OP, and a dumb reply.

Issue is somewhere here with the Debian package:
https://manpages.debian.org/buster/isc- ... .8.en.html

TC
You can't believe your eyes if your imagination is out of focus.

User avatar
PsySc0rpi0n
Posts: 322
Joined: 2012-10-24 13:54
Location: Bitcoin World
Has thanked: 8 times
Been thanked: 1 time

Re: networking.service cannot start due to unknown device

#12 Post by PsySc0rpi0n »

Well, I think I got lost but in the meantime, I think everything is working now as it was supposed to.

If anyone wants to keep the discussion going, I won't prepend [solved] to the thread title!

Psy

ramsamba
Posts: 4
Joined: 2022-03-14 13:41

Re: networking.service cannot start due to unknown device

#13 Post by ramsamba »

Psy,
I had exactly the same problem in Debian 11.
eth0 kept appearing from nowhere, and neither did it appear in /etc/network/interfaces.

I never made that entry in the 'setup' file, it was just a fresh Debian server installation. Cost me a whole day trying to figure it out until I came across this posting.

Thanks to p.h. and others, I removed the file 'setup', and all is now working fine.

You can safely mark "Solved" to this thread title, seeing the word 'Solved' does help when it appears in Google Search as 'Solved'.

Post Reply