2

Since I attempted to set up an encrypted swap partition (Encrypted swap partition does not show up in /dev/mapper), I get an error during boot that the networking.service could not be started.

Here's the info I get when running the command described in the error message:

$ systemctl status networking.service 
● networking.service - Raise network interfaces
   Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
  Drop-In: /run/systemd/generator/networking.service.d
           └─50-insserv.conf-$network.conf
   Active: failed (Result: exit-code) since Mi 2016-08-10 22:57:45 CEST; 10min ago
     Docs: man:interfaces(5)
  Process: 4424 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1/FAILURE)
  Process: 4417 ExecStartPre=/bin/sh -c [ "$CONFIGURE_INTERFACES" != "no" ] && [ -n "$(ifquery --read-environment --list --exclude=l
 Main PID: 4424 (code=exited, status=1/FAILURE)

Aug 10 22:57:45 BC-AlkaliMetal systemd[1]: Starting Raise network interfaces...
Aug 10 22:57:45 BC-AlkaliMetal ifup[4424]: RTNETLINK answers: File exists
Aug 10 22:57:45 BC-AlkaliMetal ifup[4424]: Failed to bring up lo.
Aug 10 22:57:45 BC-AlkaliMetal systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
Aug 10 22:57:45 BC-AlkaliMetal systemd[1]: Failed to start Raise network interfaces.
Aug 10 22:57:45 BC-AlkaliMetal systemd[1]: networking.service: Unit entered failed state.
Aug 10 22:57:45 BC-AlkaliMetal systemd[1]: networking.service: Failed with result 'exit-code'.

Thanks to @Rinzwind, this problem can temporary be solved by flushing the lo device:

bytecommander@BC-AlkaliMetal:~$ sudo ip addr flush dev lo
bytecommander@BC-AlkaliMetal:~$ sudo service networking start
bytecommander@BC-AlkaliMetal:~$ systemctl status networking.service 
● networking.service - Raise network interfaces
   Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
  Drop-In: /run/systemd/generator/networking.service.d
           └─50-insserv.conf-$network.conf
   Active: active (exited) since Mi 2016-08-10 22:55:06 CEST; 5s ago
     Docs: man:interfaces(5)
  Process: 9057 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=0/SUCCESS)
  Process: 9052 ExecStartPre=/bin/sh -c [ "$CONFIGURE_INTERFACES" != "no" ] && [ -n "$(ifquery --read-environment --list --exclude=l
 Main PID: 9057 (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/networking.service

Aug 10 22:55:06 BC-AlkaliMetal systemd[1]: Starting Raise network interfaces...
Aug 10 22:55:06 BC-AlkaliMetal systemd[1]: Started Raise network interfaces.

I get the same problem again during the next reboot though.

This is my /etc/network/interfaces config file:

# interfaces(5) file used by ifup(8) and ifdown(8)
iface lo inet static
   address 127.0.0.1
   netmask 255.0.0.0

What is wrong here and how to fix it?

  • Can we see your /etc/network/interfaces? – Kaz Wolfe Aug 29 '16 at 1:55
5
+50

The loopback interface was configured incorrectly in /etc/network/inerfaces:

iface lo inet static
    address 127.0.0.1
    netmask 255.0.0.0

The loopback interface (lo) is considered "special" to the system and needs to be classified as such. In order to facilitate this, any references to the loopback interface should be removed and replaced with the default:

auto lo
iface lo inet loopback

Restarting the networking service after making this change should allow the system to grab it properly and fix the error in bringing up lo.

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.