Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
General advice; Start the upgrade inside a screen next time. At least that way you can reattach to the session if it's the ssh-connection that messes up. – Kvisle Oct 20 '11 at 19:47
do-release-upgrade already starts itself in a screen session. – Giovanni Toraldo Oct 20 '11 at 20:59
up vote 5 down vote accepted

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

ssh into the box, if SSH does not work there is a backup SSH session on port 1022.

Do a

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.

share|improve this answer

I got nervous when this happened to me today. It hang up 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 :)

share|improve this answer

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?

share|improve this answer
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 posting your answer, you agree to the privacy policy and terms of service.

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