networking.service cannot start due to unknown device

Kernels & Hardware, configuring network, installing services

networking.service cannot start due to unknown device

Postby PsySc0rpi0n » 2021-02-21 15:29

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
PsySc0rpi0n
 
Posts: 247
Joined: 2012-10-24 13:54
Location: Portugal

Re: networking.service cannot start due to unknown device

Postby Head_on_a_Stick » 2021-02-21 16:25

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.
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 13317
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: networking.service cannot start due to unknown device

Postby PsySc0rpi0n » 2021-02-21 17:15

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
PsySc0rpi0n
 
Posts: 247
Joined: 2012-10-24 13:54
Location: Portugal

Re: networking.service cannot start due to unknown device

Postby Head_on_a_Stick » 2021-02-21 17:28

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).
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 13317
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: networking.service cannot start due to unknown device

Postby p.H » 2021-02-21 17:36

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.
p.H
 
Posts: 1681
Joined: 2017-09-17 07:12

Re: networking.service cannot start due to unknown device

Postby PsySc0rpi0n » 2021-02-21 17:43

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?
User avatar
PsySc0rpi0n
 
Posts: 247
Joined: 2012-10-24 13:54
Location: Portugal

Re: networking.service cannot start due to unknown device

Postby mm3100 » 2021-02-21 19:41

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
mm3100
 
Posts: 65
Joined: 2020-10-21 21:39

Re: networking.service cannot start due to unknown device

Postby trinidad » 2021-02-22 21:02

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.
trinidad
 
Posts: 157
Joined: 2016-08-04 14:58

Re: networking.service cannot start due to unknown device

Postby mm3100 » 2021-02-23 01:06

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/amd64/release-notes/ch-information.en.html#migrate-interface-names
mm3100
 
Posts: 65
Joined: 2020-10-21 21:39

Re: networking.service cannot start due to unknown device

Postby p.H » 2021-02-23 08:01

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.
p.H
 
Posts: 1681
Joined: 2017-09-17 07:12

Re: networking.service cannot start due to unknown device

Postby trinidad » 2021-02-23 14:12

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.
trinidad
 
Posts: 157
Joined: 2016-08-04 14:58

Re: networking.service cannot start due to unknown device

Postby PsySc0rpi0n » 2021-02-24 21:13

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
User avatar
PsySc0rpi0n
 
Posts: 247
Joined: 2012-10-24 13:54
Location: Portugal


Return to System configuration

Who is online

Users browsing this forum: No registered users and 18 guests

fashionable