Upgrading my Ubuntu virtual server makes the network interface disappear

2

0

I have a Ubuntu 14.10 VPS. Everytime I try to upgrade to 15.04 I experience weird symptoms. I was able to upgrade from 14.04 to 14.10 with no problems. After the upgrade is successful and the server reboots, it is no longer reachable by normal means, only through the emergency ssh interface of my provider.

When connected my ifconfig output is as follows:

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:16436 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:0 
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

Previously I also had this:

venet0    Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          inet addr:127.0.0.2  P-t-P:127.0.0.2  Bcast:0.0.0.0  Mask:255.255.255.255
          UP BROADCAST POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1
          RX packets:14177 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12143 errors:0 dropped:1 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:8039529 (8.0 MB)  TX bytes:7086087 (7.0 MB)

venet0:0  Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          inet addr:XXXXXXXXXX  P-t-P:XXXXXXXXXXXXXX  Bcast:XXXXXXXXXXXXX  Mask:255.255.255.255
          UP BROADCAST POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1

So basically after upgrading my virtual network interface disappears and I have to restore a backup. I also noticed that there are almost no processes running (like 5). For example apache2 and mysqld which are supposed to start automatically did not. I did roll back to 14.04 for now, but I would really like to upgrade without having to install everything again. Are there some kind of config files which I should back up before trying again? How can I upgrade without breaking everything?

Andreas Hartmann

Posted 2015-06-05T14:36:45.523

Reputation: 1 072

Answers

0

Ensure these three files are the same, you could make a copy of them and then restore them on the new system.

/etc/network/interfaces
/etc/resolv.conf
/etc/hosts

See if that works. Also you might want to check that the device names have not changed. For example if venet0 has changed to venet1 or something of that nature. You can check this by looking at the kernel log (dmesg).

Also as for the rest of the services they may not be started since they depend on the network interface being up.

Fred

Posted 2015-06-05T14:36:45.523

Reputation: 116

Thanks, I tried this, but none of the files are changed. – Andreas Hartmann – 2015-06-13T10:43:28.773

0

This might fix your problem :

  1. Delete the input group with this command :
    sudo groupdel input
  2. In /var/lib/dpkg/info/udev.postinst, delete the line :
    addgroup --quiet --system input
  3. reboot - there should now be an interface through which you can update your system.

This is based on this Ask Ubuntu post, where devices are missing after boot :
Udev problem after updating to ubuntu 15.04.

I reproduce below the answer by Shengolol that explains the problem.


Yesterday I stumbled into the same problem. I upgraded from 14.10 to 15.04 and during the upgrade I got the same errors as you get. Luckily I was able to pinpoint the cause of the issue. There are two ways to fix this:

First way (EASY) Go to the terminal and execute the command sudo groupdel input. Now run sudo apt-get update && sudo apt-get dist-upgrade.

Only read the second way if you are interested in the cause of the issue or if the first way didn't work.

Second way (I just posted this to explain the issue)

A certain line in the dpkg configuration script is the problem, we want to delete this line. First open the file via terminal:

sudo nano /var/lib/dpkg/info/udev.postinst

Now search for the line addgroup --quiet --system input and delete it. This line is the first part of the config script. It adds the group 'input' to your system. Strangely it crashes the whole script when the group already exists. Obviously members of this group have access to your systems input, but it isn't needed, as input also works without this group. Save your edited file and run sudo apt-get update && sudo apt-get dist-upgrade.

I hope this fixed the issue for you and will be helpful for other users in the future. Until this is fixed we have to apply one of the fixes everytime there is an update for udev. I have no idea how to report this bug, otherwise I would have done it.

harrymc

Posted 2015-06-05T14:36:45.523

Reputation: 306 093

This didn't fix it, possibly because I can't run apt-get update without a network interface. – Andreas Hartmann – 2015-06-13T12:15:06.487

The second way is more suitable. I copied the entire answer for completeness. – harrymc – 2015-06-13T12:28:03.137

1@AndreasHartmann Delete the input group, sudo groupdel input, delete the line in /var/lib/dpkg/info/udev.postinst, reboot, there should be an interface through which you can update your system. – MariusMatutiae – 2015-06-16T05:18:04.603

@MariusMatutiae: I have incorporated your comment in my answer. – harrymc – 2015-06-17T13:46:25.953

Perfectly fine with me! – MariusMatutiae – 2015-06-17T14:31:57.340