2

I've been setting up a new install of Ubuntu on a Raspberry Pi 3. I started with the image from here, updated and upgraded all packages, upgraded the distro, and upgraded the rPi firmware.

All was going well, but at some point along this path I completely lost my networking. It's hard to say when because I did multiple steps before rebooting.

Since other weird things were happening (booting would sometimes work, sometimes not) I decided to re-pave taking detailed notes of my installation steps along the way. Here they are:

  • write base image to SD card
  • boot
  • change password when instructed during login
  • install rpi-update:
    • sudo curl -L --output /usr/bin/rpi-update https://raw.githubusercontent.com/Hexxeh/rpi-update/master/rpi-update && sudo chmod +x /usr/bin/rpi-update
    • noticed a message "unable to resolve host ubuntu" so added 127.0.0.1 ubuntu to my /etc/hosts file
  • reboot (just to be sure networking is still up)
  • run rpi-update:
    • sudo apt-get install binutils
    • sudo rpi-update
  • reboot to activate new firmware (and confirm that networking still works)
  • sudo apt-get update
  • sudo apt-get upgrade (85 packages upgraded, around 65MB download)
  • reboot

At this point networking no longer works. I noticed these errors in the boot output (taken from /var/log/syslog):

Jul 14 01:18:34 ubuntu systemd[1]: Starting LXD - container startup/shutdown...
Jul 14 01:18:34 ubuntu lxd[18312]: error: open /var/lib/lxd/containers: no such file or directory
Jul 14 01:18:34 ubuntu systemd[1]: lxd-containers.service: Main process exited, code=exited, status=1/FAILURE
Jul 14 01:18:34 ubuntu systemd[1]: Failed to start LXD - container startup/shutdown.
Jul 14 01:18:34 ubuntu systemd[1]: lxd-containers.service: Unit entered failed state.
Jul 14 01:18:34 ubuntu systemd[1]: lxd-containers.service: Failed with result 'exit-code'.
...
Jul 14 01:19:24 ubuntu systemd[1]: Starting Raise network interfaces...
Jul 14 01:19:24 ubuntu dhclient[887]: Internet Systems Consortium DHCP Client 4.3.3
Jul 14 01:19:24 ubuntu ifup[822]: Internet Systems Consortium DHCP Client 4.3.3
Jul 14 01:19:24 ubuntu ifup[822]: Copyright 2004-2015 Internet Systems Consortium.
Jul 14 01:19:24 ubuntu ifup[822]: All rights reserved.
Jul 14 01:19:24 ubuntu ifup[822]: For info, please visit https://www.isc.org/software/dhcp/
Jul 14 01:19:24 ubuntu dhclient[887]: Copyright 2004-2015 Internet Systems Consortium.
Jul 14 01:19:24 ubuntu dhclient[887]: All rights reserved.
Jul 14 01:19:24 ubuntu dhclient[887]: For info, please visit https://www.isc.org/software/dhcp/
Jul 14 01:19:24 ubuntu dhclient[887]: 
Jul 14 01:19:24 ubuntu ifup[822]: Cannot find device "eth0"
Jul 14 01:19:24 ubuntu dhclient[887]: Error getting hardware address for "eth0": No such device
Jul 14 01:19:24 ubuntu ifup[822]: Error getting hardware address for "eth0": No such device
Jul 14 01:19:24 ubuntu ifup[822]: If you think you have received this message due to a bug rather
Jul 14 01:19:24 ubuntu ifup[822]: than a configuration issue please read the section on submitting
Jul 14 01:19:24 ubuntu ifup[822]: bugs on either our web page at www.isc.org or in the README file
Jul 14 01:19:24 ubuntu ifup[822]: before submitting a bug.  These pages explain the proper
Jul 14 01:19:24 ubuntu ifup[822]: process and the information we find helpful for debugging..
Jul 14 01:19:24 ubuntu ifup[822]: exiting.
Jul 14 01:19:24 ubuntu dhclient[887]: 
Jul 14 01:19:24 ubuntu ifup[822]: Failed to bring up eth0.
Jul 14 01:19:24 ubuntu dhclient[887]: If you think you have received this message due to a bug rather
Jul 14 01:19:24 ubuntu dhclient[887]: than a configuration issue please read the section on submitting
Jul 14 01:19:24 ubuntu dhclient[887]: bugs on either our web page at www.isc.org or in the README file
Jul 14 01:19:24 ubuntu dhclient[887]: before submitting a bug.  These pages explain the proper
Jul 14 01:19:24 ubuntu dhclient[887]: process and the information we find helpful for debugging..
Jul 14 01:19:24 ubuntu dhclient[887]: 
Jul 14 01:19:24 ubuntu dhclient[887]: exiting.
Jul 14 01:19:24 ubuntu systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
Jul 14 01:19:24 ubuntu systemd[1]: Failed to start Raise network interfaces.
Jul 14 01:19:24 ubuntu systemd[1]: Dependency failed for Initial cloud-init job (metadata service crawler).
Jul 14 01:19:24 ubuntu systemd[1]: cloud-init.service: Job cloud-init.service/start failed with result 'dependency'.
Jul 14 01:19:24 ubuntu systemd[1]: networking.service: Unit entered failed state.
Jul 14 01:19:24 ubuntu systemd[1]: networking.service: Failed with result 'exit-code'.

I also now have instability during boot. Sometimes it works, sometimes I get an exception trace with a final message of:

Fixing recursive fault but reboot is needed!

I've seen this and running sudo service lxd restart did fix the LXD issue (after a very long delay), but the networking issue remains.

I've also seen this, which seemed like my exact issue until I tried bringing the misnamed ethernet network up:

ifconfig enxb827eb0ecff3 up
SIOCSIFFLAGS: Operation not permitted
sudo ifconfig enxb827eb0ecff3 up
(no output)
sudo ip link set enxb827eb0ecff3 name eth0
RTNETLINK answers: Device or resource busy

So at this point I'm well and truly out of my depth when it comes to Linux trouble-shooting. Can anyone tell me how to revive networking on my system? And perhaps why this happens in the first place on a fresh install?

Output of ifconfig:

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:1600 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1600 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:118400 (118.4 KB)  TX bytes:118400 (118.4 KB)

Output of ifconfig -a:

enxb827eb0ecff3 Link encap:Ethernet  HWaddr b8:27:eb:0e:cf:f3  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:1600 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1600 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:118400 (118.4 KB)  TX bytes:118400 (118.4 KB)

sit0      Link encap:IPv6-in-IPv4  
          NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wlan0     Link encap:Ethernet  HWaddr b8:27:eb:5b:9a:a6  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

Output of networkctl:

IDX LINK             TYPE               OPERATIONAL SETUP     
  1 lo               loopback           n/a         n/a       
  2 sit0             sit                n/a         n/a       
  3 enxb827eb0ecff3  ether              n/a         n/a       
  4 wlan0            wlan               n/a         n/a       

4 links listed.

2 Answers 2

1

I had exactly the same issue. If you are Ok with Predictable Network Interface Names you can simply use the NIC's new name in '/etc/network/interfaces' ...

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

# The loopback network interface
auto lo
iface lo inet loopback

# Source interfaces
# Please check /etc/network/interfaces.d before changing this file
# as interfaces may have been defined in /etc/network/interfaces.d
# See LP: #1262951
source /etc/network/interfaces.d/*.cfg

auto enxb827eb2f0bbd
iface enxb827eb2f0bbd inet static
address 192.168.1.2
netmask 255.255.255.0
gateway 192.168.1.254
#dns-search example.com
dns-nameservers 192.168.1.254

I have not been able to figure out why the name wasn't set to 'eth0'. Systemd has got a proper configuration that should set the name to 'eth0'. Just check '/etc/systemd/network/50-cloud-init-eth0.link'.

I also removed

net.ifnames=0 biosdevname=0

from '/boot/firmware/cmdline.txt' and still it didn't work!!!

The only way to rename the bloody NIC was the udev way. I have reated a new file '/etc/udev/rules.d/10-network.rules' ...

SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="b8:27:eb:2f:0b:bd", NAME="net0"

Once you create this file the NIC will be called 'net0'. Obviously it is not recommended to use this way to rename it to 'eth0'.

But 'net0' was fine with me and I could use the new name in '/etc/network/interfaces' ...

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

# The loopback network interface
auto lo
iface lo inet loopback

# Source interfaces
# Please check /etc/network/interfaces.d before changing this file
# as interfaces may have been defined in /etc/network/interfaces.d
# See LP: #1262951
source /etc/network/interfaces.d/*.cfg

auto net0
iface net0 inet static
address 192.168.1.2
netmask 255.255.255.0
gateway 192.168.1.254
#dns-search example.com
dns-nameservers 192.168.1.254

Quite interesting to see how many different places can influence networking. But to me it also feels a bit "messy".

/Thomas

0

I had the same problem. No Networking after a reboot, but quite often it would be ok after a total shutdown. This appears to be a known issue in the latest network-manager package. In the end I installed wicd using the instructions here: https://help.ubuntu.com/community/WICD All my networking issues are now resolved, except I have no network panel icon. But that's no biggy.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.