Unit networking.service could not be found

I created a node and followed the instructions for installing a custom distro several times (Ubuntu). After installing the OS everything looks normal to me except for the network. I'm not able to ping or anything else related to network.

Maybe these commands will be more helpful to you than they are to me. I am not able to use net-tools because I don't know how to install it without network access.

$ cat /etc/network/interfaces
$ ls -l /etc/network/interfaces 
-rw-r--r-- 1 root root 0 Dec  2 20:37 /etc/network/interfaces
$ 
$ systemctl status networking.service
Unit networking.service could not be found.
$ 
$ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether f2:3c:92:78:cd:0c brd ff:ff:ff:ff:ff:ff
$ 
$ ip route
$ 
$ ls /etc/systemd/network/
$
$ ping google.com
ping: google.com: Temporary failure in name resolution
$ 
$ ping 1.1.1.1
ping: connect: Network is unreachable

Linode instructions: https://www.linode.com/docs/guides/install-a-custom-distribution-on-a-linode/

Ubuntu 20.04 server installation
I originally used LUKS encryption and btrfs file system. When this I got this issue I rebuilt the node and used the defaults for everything. I was hoping to remove some variables. Same result.

Language: English
Installer available: Update to the new installer
Keyboard configuration: English (US)
Network connections: enp0s4 eth (no changes)
Configure proxy: None
Configure Ubuntu archive mirror: default
Guided storage configuration:
[X] Use entire disk
[ ] Set up this disk as an LVM group
[ ] Encrypt the LVM group with LUKS
Storage configuration: (no changes)
partition 1 new, bios_grub 1.000M
partition 2 new, to be formatted as ext, mounted at /
SSH Setup:
[X] Install OpenSSH server
Import SSH identity: No
Snaps: None

If you are asking why I'm using a "custom" distribution for ubuntu, I simply want to use btrfs and an encrypted disk. Once this is resolved I will rebuild the node with the options I want. Thank you for looking at it.

2 Replies

I'm sorry to hear that you're having trouble getting networking to work on your Linode. Hopefully, this answer will point you in the right direction, and you are able to enable networking on your server. Since you're using Ubuntu 20.04, you'll want to make sure to enable systemd-networkd.

systemctl enable systemd-networkd

With this distribution, you will also want to use the file below instead of /etc/network/interfaces. Here is a template configuration that should work for you. Just make sure to replace any variables with your own information.

/etc/systemd/network/05-eth0.network

[Match]
Name=eth0

[Network]
DHCP=no
DNS={{DNSRESOLVERSSINGLELINE}}
Domains=your.domain.here
IPv6PrivacyExtensions=false

Gateway={{GATEWAY}}
Address={{ADDRESS}}/{{SUBNET_CIDR}}

One thing to keep in mind is that, since this is a custom installation, your network interface might use the naming scheme enp0s4 rather than eth0.

Additional Resources

SOLVED

@rdaniels, thank you!

As you suggested, I enabled systemd-networkd and added a file at /etc/systemd/network/05-eth0.network

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct