2

I'm using a cheap VM that's getting pretty old. So old that recently, apt-get update && apt-get upgrade returned errors, because wheezy packages were removed from the mirrors.

So I decided to update my Debian install. I was overconfident and tried to update wheezy straight to buster.
The main problem is that I'm trying to update through ssh, and every time an error occurs, the ssh connexion closes, and I can't see the error details. I have no idea what the errors were on server-side, I just see that my local ssh client crashes.

What I did:

  • I changed the lines in /etc/apt/sources.list to reference buster rather than wheezy
  • I did a update && upgrade that updated nothing (I'm guessing none of the packages were compatible) then a dist-upgrade that crashed ssh and, as a bonus, did something so that I can't run nano or vim anymore without my ssh crashing.
  • I edited the sources.list (using echo > because no editor works anymore) to point to jessie
  • I did a update && upgrade that upgraded a few things then dist-upgrade that went a bit further than before, then crashed at "Preconfiguring packages ...".

No editor works anymore, every time I try to run nano or vim my local ssh client crashes.
cat /etc/debian_version gets me 8.11 but every time I try to dist-upgrade it stills tries to upgrade everything like nothing was ever upgraded.

I'm guessing I'm in some pretty messed up state and I'll have trouble restoring a stable state, but what can I try to see the actual errors thrown, so I can at least try to make it work again?

1
  • A direct upgrade from Wheezy to Buster without first upgrading to Stretch is not guaranteed to work. If it worked in your specific case, you were lucky and/or your system configuration was simple enough. Commented Jul 15, 2019 at 8:36

1 Answer 1

2

If you have screen or tmux already installed, you could use those to run apt-get in recoverable sessions. This will have two advantages: when you’re disconnected, you can reconnect and see what happened, and apt-get won’t be interrupted by the terminal suddenly going away.

You should also be able to see everything that happened in /var/log/apt/term.log, although I’m not sure that was true back in Wheezy days.

However given that this is a cheap VM I would suggest creating a new Buster VM and copying any data you need from the old to the new, rather than trying to recover the old VM.

1
  • It was a ncurses prompt that broke my local ssh install. Using Putty works fine. Thank you! Commented Jul 11, 2019 at 14:30

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.