3

I was upgrading an Ubuntu server (using the do-release-upgrade) command over SSH (I know it's a bad idea, but it was the only choice; I don't have physical access to the server). It seemed to go fine and was going thru the 'setting up package name' part when it froze on the line

Installing new version of config file /etc/mysql/debian-start ...

The SSH connection appears to be still active, as pressing the up arrow echoes back ^[[A, and so on. When I log in on another SSH connection I can log in fine, but the ** system needs restart ** message shows up. Is it safe to ^C the release-upgrade command, or try to reboot the server? Should I ^C the upgrade and try it again? Anything else I could try?

7

I usually do release upgrades over VPN, so I've tried this a few times. Whenever it updates my openvpn package I lose connection, so I reconnect afterwards.

do-release-upgrade starts a backup SSH session on port 1022 and a backup screen session. If you do not have screen installed this will NOT be available.

You can get the screen session by running:

sudo screen -list
There is a screen on:
    2953.ubuntu-release-upgrade-screen-window   (09/13/2012 04:48:02 AM)    (Detached)
1 Socket in /var/run/screen/S-root.

Then to reattach do:

sudo screen -d -r root/2953.ubuntu-release-upgrade-screen-window

Using the previously listed screen after root/

You should be back to where you lost connection.

  • this is the best and safest solution, worked perfectly! – Dénes Papp Jun 26 '17 at 20:18
7

I got nervous when this happened to me today. It froze for about 15 minutes.

Trying to solve this, I got a second SSH connection running, found mysql PIDs via ps aux | grep mysql and killed them. It didn't seem to help, so I used service mysql stop - thankfully it worked and after a few seconds do-release-upgrade did its remaining job.

That was close. No more upgrades for tonight :)

3

I'm having the exact same problem.

I'm not sure if it's a fix, or the right way of going about it....

but I Ctrl+C the process, then.

sudo rm /var/lib/dpkg/lock sudo dpkg --configure -a (you'll probably get some errors) sudo apt-get remove mysql-server # we can fix this later. I'm mainly concerned with getting the OS to boot properly

Once that was complete, I ran apt-get dist-upgrade

I think I'll end up having to do the dpkg --configure -a and dist-upgrade several times before all the bugs get ironed out.

Not perfect, and messy.. but a suggestion?

  • Great thanks! I ctrl-C'd it and did dpkg-configure -a, rebooted and it seems to be ok! my hang was pretty late into the upgrade so it was almost finished, so I guess you'd have more bugs, or totally kill the system, if it happened earlier. From what I saw after ctrl-C, the actual do-release-upgrade hung, not the ssh session. Anyway thanks for the help! Lifesaver! – Chris Oct 21 '11 at 20:21

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.