Recently, I had an issue where I had no loopback device in Linux Mint 18.2 MATE, which occurred after upgrading from 18.1 MATE.
ping localhost
fails, nc -v -l -p 1234
followed by nc localhost 1234
does not connect, etc. Running ifconfig
does not show a loopback device present.
Running sudo service network-manager restart
and sudo service networking restart
doesn't fix the issue, nor does restarting.
The only clue shows up when inspecting /var/log/syslog
:
$ grep "NetworkManager" /var/log/syslog
Sep 11 14:11:11 kyle-mint NetworkManager[31855]: <info> [1505164271.1727] device (enp0s31f6): state change: prepare -> config (reason 'none') [40 50 0]
Sep 11 14:11:11 kyle-mint NetworkManager[31855]: <info> [1505164271.1728] device (enp0s31f6): state change: config -> ip-config (reason 'none') [50 70 0]
Sep 11 14:11:11 kyle-mint NetworkManager[31855]: <info> [1505164271.1729] device (enp0s31f6): state change: ip-config -> ip-check (reason 'none') [70 80 0]
Sep 11 14:11:11 kyle-mint NetworkManager[31855]: <info> [1505164271.1743] ofono is now available
Sep 11 14:11:11 kyle-mint NetworkManager[31855]: <info> [1505164271.1744] ModemManager available in the bus
Sep 11 14:11:11 kyle-mint NetworkManager[31855]: <info> [1505164271.1745] device (enp0s31f6): state change: ip-check -> secondaries (reason 'none') [80 90 0]
Sep 11 14:11:11 kyle-mint NetworkManager[31855]: <info> [1505164271.1747] device (enp0s31f6): state change: secondaries -> activated (reason 'none') [90 100 0]
Sep 11 14:11:11 kyle-mint NetworkManager[31855]: <info> [1505164271.1747] manager: NetworkManager state is now CONNECTED_GLOBAL
Sep 11 14:11:11 kyle-mint NetworkManager[31855]: <info> [1505164271.1748] manager: NetworkManager state is now CONNECTED_SITE
Sep 11 14:11:11 kyle-mint NetworkManager[31855]: <info> [1505164271.1748] manager: NetworkManager state is now CONNECTED_GLOBAL
Sep 11 14:11:11 kyle-mint NetworkManager[31855]: <info> [1505164271.1795] dns-mgr: Writing DNS information to /sbin/resolvconf
Sep 11 14:11:11 kyle-mint NetworkManager[31855]: <info> [1505164271.2218] device (enp0s31f6): Activation: successful, device activated.
Sep 11 14:11:11 kyle-mint NetworkManager[31855]: <warn> [1505164271.2222] failed to enumerate oFono devices: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.ofono was not provided by any .service files
Sep 11 14:11:21 kyle-mint NetworkManager[31855]: <info> [1505164281.5448] device (lo): link disconnected
After some inspection in a VM with a fresh install of Linux Mint 18.2 MATE, the only difference in my /etc/{networking,NetworkManager}
directories was the ifupdown2
directory. After some investigation, ifupdown2
turned out to be a package that I had installed, which replaced the system-default ifupdown
.
If the above is what caused this issue, the fix is really easy:
- Run
apt install ifupdown
. Note that this will replaceifupdown2
withifupdown
! Proceed with caution if you depend on features fromifupdown2
- (optional) Remove the
/etc/network/ifupdown2
directory and its contents - Run
sudo service network-manager restart && sudo service networking restart
Now, ping localhost
should work again!