Score:4

Ethernet is disabled after reboot - Ubuntu server 20.04.3

cn flag

Problem

I had a working internet connection over ethernet prior to shutting down, but now that I've booted back up I can't connect to my own network, let alone the internet.

I had a very similar network issue (along with a myriad of display issues) on a previous install of Ubuntu 20.04 Desktop (as opposed to server, which I'm on now) that was installed on the same SSD, which is pretty old (boot drive on a Windows machine for ~6 years). Possibly a corrupted drive?

I run sudo lshw -C network and get the following:

*-network DISABLED
    description: Ethernet Interface
    product: Killer E220x Gigabit Ethernet Controller
...
    logical name: enp2so

First Attempt at Solution

Based on the question here (ethernet not working after reboot on Ubuntu Server 20.04.2 ) I ran the command ip link show:

1: lo: ...
2: enp2so: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether d8:cb:8a:a4:0a:b3 brd ff:ff:ff:ff:ff:ff

And I tried to run the commands sudo ip link set enp2s0 up followed by sudo netplan apply, but apparently netplan isn't installed on my instance of Ubuntu for some reason. I did this after confirming that /etc/netplan/00-installer-config.yaml is pointing to enp2s0.

Miscellaneous Info

The only other suggestions I've found refer to editing files that don't exist on my system:

  • /etc/NetworkManager/conf.d (the only file in that folder is dispatcher.d)
  • /etc/network/interfaces (file does not exist)
  • /var/lib/NetworkManager/NetworkManager.state (no such folder in /var/lib/)
  • When I try sudo service network-manager restart I just get an error Failed to restart network-manager.service: Unit network-manager.service not found.

Running Services

~ systemctl list-units --type service --state running
  UNIT                      LOAD   ACTIVE SUB     DESCRIPTION                                 
  atd.service               loaded active running Deferred execution scheduler                
  cron.service              loaded active running Regular background program processing daemon
  dbus.service              loaded active running D-Bus System Message Bus                    
  [email protected]        loaded active running Getty on tty1                               
  irqbalance.service        loaded active running irqbalance daemon                           
  multipathd.service        loaded active running Device-Mapper Multipath Device Controller   
  plexmediaserver.service   loaded active running Plex Media Server                           
  polkit.service            loaded active running Authorization Manager                       
  rsyslog.service           loaded active running System Logging Service                      
  ssh.service               loaded active running OpenBSD Secure Shell server                 
  systemd-journald.service  loaded active running Journal Service                             
  systemd-logind.service    loaded active running Login Service                               
  systemd-networkd.service  loaded active running Network Service                             
  systemd-resolved.service  loaded active running Network Name Resolution                     
  systemd-timesyncd.service loaded active running Network Time Synchronization                
  systemd-udevd.service     loaded active running udev Kernel Device Manager                  
  thermald.service          loaded active running Thermal Daemon Service                      
  udisks2.service           loaded active running Disk Manager                                
  [email protected]         loaded active running User Manager for UID 1000                   

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.

19 loaded units listed.

Edit 12/21

cat /etc/netplan/*.yaml

~ cat /etc/netplan/*.yaml
# This is the network config written by 'subiquity'
network:
  ethernets:
    enp2s0:
      dhcp4: true
  version: 2

sudo lshw -C network

~ sudo lshw -C network
  *-network DISABLED
       description: Ethernet interface
       product: Killer E220x Gigabit Ethernet Controller
       vendor: Qualcomm Atheros
       physical id: 0
       bus info: pci@0000:02:00.0
       logical name: enp2s0
       version: 13
       serial: d8:cb:8a:a4:0a:b3
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm pciexpress msi msix bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=alx latency=0 link=no multicast=yes port=twisted pair
       resources: irq:19 memory:f7c00000-f7c3ffff ioport:e000(size=128)

Edit 12/22 Research (and some helpful comments from @heynnema) has led me to believe that netplan absolutely should be installed on my system for the networking to work - but it is not. Given that networking worked fine before the reboot, does this mean something got corrupted?

Edit 12/23 Some other potentially useful information.

dpkg -l *netplan*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================
un  netplan.io     <none>       <none>       (no description available)

and

grep -i netplan /var/log/dpkg.log*
021-08-24 08:43:10 install libnetplan0:amd64 <none> 0.99-0ubuntu1
2021-08-24 08:43:10 status half-installed libnetplan0:amd64 0.99-0ubuntu1
2021-08-24 08:43:10 status unpacked libnetplan0:amd64 0.99-0ubuntu1
2021-08-24 08:43:22 install netplan.io:amd64 <none> 0.99-0ubuntu1
2021-08-24 08:43:22 status half-installed netplan.io:amd64 0.99-0ubuntu1
2021-08-24 08:43:22 status unpacked netplan.io:amd64 0.99-0ubuntu1
2021-08-24 08:43:34 configure libnetplan0:amd64 0.99-0ubuntu1 <none>
2021-08-24 08:43:34 status unpacked libnetplan0:amd64 0.99-0ubuntu1
2021-08-24 08:43:34 status half-configured libnetplan0:amd64 0.99-0ubuntu1
2021-08-24 08:43:34 status installed libnetplan0:amd64 0.99-0ubuntu1
2021-08-24 08:43:57 configure netplan.io:amd64 0.99-0ubuntu1 <none>
2021-08-24 08:43:57 status unpacked netplan.io:amd64 0.99-0ubuntu1
2021-08-24 08:43:57 status half-configured netplan.io:amd64 0.99-0ubuntu1
2021-08-24 08:43:57 status installed netplan.io:amd64 0.99-0ubuntu1
2021-08-24 08:45:10 upgrade libnetplan0:amd64 0.99-0ubuntu1 0.102-0ubuntu1~20.04.2
2021-08-24 08:45:10 status half-configured libnetplan0:amd64 0.99-0ubuntu1
2021-08-24 08:45:10 status unpacked libnetplan0:amd64 0.99-0ubuntu1
2021-08-24 08:45:10 status half-installed libnetplan0:amd64 0.99-0ubuntu1
2021-08-24 08:45:10 status unpacked libnetplan0:amd64 0.102-0ubuntu1~20.04.2
2021-08-24 08:45:11 upgrade netplan.io:amd64 0.99-0ubuntu1 0.102-0ubuntu1~20.04.2
2021-08-24 08:45:11 status half-configured netplan.io:amd64 0.99-0ubuntu1
2021-08-24 08:45:11 status unpacked netplan.io:amd64 0.99-0ubuntu1
2021-08-24 08:45:11 status half-installed netplan.io:amd64 0.99-0ubuntu1
2021-08-24 08:45:11 status unpacked netplan.io:amd64 0.102-0ubuntu1~20.04.2
2021-08-24 08:45:12 configure libnetplan0:amd64 0.102-0ubuntu1~20.04.2 <none>
2021-08-24 08:45:12 status unpacked libnetplan0:amd64 0.102-0ubuntu1~20.04.2
2021-08-24 08:45:12 status half-configured libnetplan0:amd64 0.102-0ubuntu1~20.04.2
2021-08-24 08:45:12 status installed libnetplan0:amd64 0.102-0ubuntu1~20.04.2
2021-08-24 08:45:17 configure netplan.io:amd64 0.102-0ubuntu1~20.04.2 <none>
2021-08-24 08:45:17 status unpacked netplan.io:amd64 0.102-0ubuntu1~20.04.2
2021-08-24 08:45:17 status half-configured netplan.io:amd64 0.102-0ubuntu1~20.04.2
2021-08-24 08:45:17 status installed netplan.io:amd64 0.102-0ubuntu1~20.04.2
2021-12-11 07:27:39 upgrade libnetplan0:amd64 0.102-0ubuntu1~20.04.2 0.103-0ubuntu5~20.04.5
2021-12-11 07:27:39 status half-configured libnetplan0:amd64 0.102-0ubuntu1~20.04.2
2021-12-11 07:27:39 status unpacked libnetplan0:amd64 0.102-0ubuntu1~20.04.2
2021-12-11 07:27:39 status half-installed libnetplan0:amd64 0.102-0ubuntu1~20.04.2
2021-12-11 07:27:39 status unpacked libnetplan0:amd64 0.103-0ubuntu5~20.04.5
2021-12-11 07:27:39 upgrade netplan.io:amd64 0.102-0ubuntu1~20.04.2 0.103-0ubuntu5~20.04.5
2021-12-11 07:27:39 status half-configured netplan.io:amd64 0.102-0ubuntu1~20.04.2
2021-12-11 07:27:39 status unpacked netplan.io:amd64 0.102-0ubuntu1~20.04.2
2021-12-11 07:27:39 status half-installed netplan.io:amd64 0.102-0ubuntu1~20.04.2
2021-12-11 07:27:39 status unpacked netplan.io:amd64 0.103-0ubuntu5~20.04.5
2021-12-11 07:27:44 configure libnetplan0:amd64 0.103-0ubuntu5~20.04.5 <none>
2021-12-11 07:27:44 status unpacked libnetplan0:amd64 0.103-0ubuntu5~20.04.5
2021-12-11 07:27:44 status half-configured libnetplan0:amd64 0.103-0ubuntu5~20.04.5
2021-12-11 07:27:44 status installed libnetplan0:amd64 0.103-0ubuntu5~20.04.5
2021-12-11 07:27:52 configure netplan.io:amd64 0.103-0ubuntu5~20.04.5 <none>
2021-12-11 07:27:52 status unpacked netplan.io:amd64 0.103-0ubuntu5~20.04.5
2021-12-11 07:27:52 status half-configured netplan.io:amd64 0.103-0ubuntu5~20.04.5
2021-12-11 07:27:52 status installed netplan.io:amd64 0.103-0ubuntu5~20.04.5
2021-12-19 23:12:51 status installed netplan.io:amd64 0.103-0ubuntu5~20.04.5
2021-12-19 23:12:51 remove netplan.io:amd64 0.103-0ubuntu5~20.04.5 <none>
2021-12-19 23:12:51 status half-configured netplan.io:amd64 0.103-0ubuntu5~20.04.5
2021-12-19 23:12:51 status half-installed netplan.io:amd64 0.103-0ubuntu5~20.04.5
2021-12-19 23:12:51 status config-files netplan.io:amd64 0.103-0ubuntu5~20.04.5
2021-12-19 23:12:51 status not-installed netplan.io:amd64 <none>
2021-12-19 23:16:52 status installed libnetplan0:amd64 0.103-0ubuntu5~20.04.5
2021-12-19 23:16:52 remove libnetplan0:amd64 0.103-0ubuntu5~20.04.5 <none>
2021-12-19 23:16:52 status half-configured libnetplan0:amd64 0.103-0ubuntu5~20.04.5
2021-12-19 23:16:52 status half-installed libnetplan0:amd64 0.103-0ubuntu5~20.04.5
2021-12-19 23:16:52 status config-files libnetplan0:amd64 0.103-0ubuntu5~20.04.5
2021-12-19 23:16:52 status not-installed libnetplan0:amd64 <none>

Edit 12/23 Part 2 I noticed a red error message when I boot up - it disappears immediately so I needed to record my boot on my phone in slow-mo (there's presumably a better way...)

The message read [FAILED] Failed to start Service for snap application lxd.activate. I then ran the recommended command and got this output:

● snap.lxd.activate.service - Service for snap application lxd.activate
     Loaded: loaded (/etc/systemd/system/snap.lxd.activate.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Fri 2021-12-24 01:17:58 UTC; 3min 12s ago
    Process: 678 ExecStart=/usr/bin/snap run lxd.activate (code=exited, status=203/EXEC)
   Main PID: 678 (code=exited, status=203/EXEC)

Dec 24 01:17:58 ullr systemd[1]: Starting Service for snap application lxd.activate...
Dec 24 01:17:58 ullr systemd[678]: snap.lxd.activate.service: Failed to execute command: No such file or directory
Dec 24 01:17:58 ullr systemd[678]: snap.lxd.activate.service: Failed at step EXEC spawning /usr/bin/snap: No such file or directory
Dec 24 01:17:58 ullr systemd[1]: snap.lxd.activate.service: Main process exited, code=exited, status=203/EXEC
Dec 24 01:17:58 ullr systemd[1]: snap.lxd.activate.service: Failed with result 'exit-code'.
Dec 24 01:17:58 ullr systemd[1]: Failed to start Service for snap application lxd.activate.

I don't actually know for sure if this is related - but besides the network just not working, it's the only thing out of the ordinary I've noticed.

Edit 12/28 Happy holidays everyone, esp. those helping me out with this. I'm away from the problem computer right now, but my next steps are to reinstall netplan.io and libnetplan0 from a flash drive, as those were apparently uninstalled. Updating those won't be difficult, but right now my priority is understanding how this happened in the first place. Perhaps it's possible that running

sudo apt update
sudo apt upgrade

broke something, but that didn't take effect until the computer was rebooted?

heynnema avatar
ru flag
Your `lshw` output indicates `link=no`, so that suggests a cable problem, physical connection problem, or some other external network issue.
Rustle Branch avatar
cn flag
@heynnema I double checked the cable and connection but nothing was out of the ordinary - I hadn't touched any of that stuff between shutting down (when it was working) and booting back up again to find the issue.
heynnema avatar
ru flag
What happens when you do `sudo netplan generate` and `sudo netplan apply`, then reboot and retest the network. Do you dual-boot with Windows? If so, does the network work there? Do you have a Ubuntu Live USB? Report back.
Rustle Branch avatar
cn flag
@heynnema netplan is definitely not installed. If that is guaranteed to be there for whatever reason, then somehow my crappy old SSD deleted it. I do have a live USB, and I do not dual boot with Windows
Rustle Branch avatar
cn flag
@heynnema thank you for taking the time to look at this with me! I just tried another ethernet cable and port on my router (that I confirmed worked with a different machine), and it didn't change anything. It could be an issue with the ethernet controller I suppose? Or is netplan not being found a more fundamental problem?
heynnema avatar
ru flag
No problem. Did you recently do some Software Updates before this broke? Edit your question and show me `dpkg -l *netplan*`. And just for fun, boot to your Ubuntu Live USB and see if ethernet works there. Report back.
heynnema avatar
ru flag
Do you have wireless access to your network, either via a built-in wireless adapter, or a USB wireless adapter? Or a USB->ethernet adapter?
heynnema avatar
ru flag
Also show me `grep -i netplan /var/log/dpkg.log*`.
Rustle Branch avatar
cn flag
Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/132578/discussion-between-rustle-branch-and-heynnema).
Daniel K avatar
gd flag
I have a very similar problem. I thought I had netplan but it has disappeared. Netplan and libnetplan0 auto-upgraded in November and the problem did not appear until reboot this week.
Score:0
in flag

Hardware change

In my case I had a hardware-change and the enp4s0 turned into enp5s0. Unfortunately /etc/netplan/*.yaml remains having enp4s0 what was not available anymore.

Score:0
gd flag

I had this problem and, like you, my netplan seemed to have disappeared for no reason. This may have happened due to auto-upgrade settings and did not become apparent until a reboot.

You are running systemd-networkd.service and this can be configured manually by placing files in /etc/systemd/network/. Create and edit a file called, for instance /etc/systemd/network/10-wired.network:

[Match]
Name=enp* # make this match your interface

[Network]
    
Gateway=192.168.1.254
Address=192.168.1.55/24
DNS=192.168.1.2 # use setting specific to your network

[Route]
Destination=192.168.1.254
Scope=link

This example is for a static address. You can find examples for DHCP in the man pages for systemd (link).

The you need to restart systemd.networkd with sudo systemctl restart systemd-networkd. This should survive a reboot and you do not need to reinstall netplan.

Score:0
ht flag

I search everywhere for an answer for my ubuntu 22.04 LTS, non ethernet startup at boot. Luckily me, I managed to resolve it by a simple tweak

Conflicting and/or repeated network settings where found at these 3 locations, @Netplan, @ifupdown & @NM. I removed settings at 2 locations.

Voila it works like a breeze

Location:1,@ Netplan, /etc/netplan/*.yaml ;put # comments for all settings *.yaml file:

Location:2,@ ifupdown, /etc/network/interfaces ;put #comments for all settings at /etc/network/interfaces file

Location:3, @ NM, /etc/NetworkManager/system-connections ;Keep this settings

Score:0
cn flag

This isn't a satisfying answer - but I ended up reinstalling the OS from scratch. Nothing else worked.

Rustle Branch avatar
cn flag
This is my own question, I can assure you a better answer will not come along.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.