Recover from shutdown during Ubuntu distribution upgrade
Solution 1:
If you can get to a place where you can use dpkg as root, you can run dpkg --configure -a
However, you might find that explodes for a borked dist-upgrade, so you might need:
dpkg --configure -a --abort-after=99999
Solution 2:
Try pressing CTRL-ALT-F1 and see if you get a command prompt. See if you can login, then try running sudo apt-get dist-upgrade. This should allow you too finish the upgrade. You may get errors so you might also need to try using sudo dpkg --configure -a.
To get a list of the installed software you can run the command dpkg --get-selections. If you save they output of that command to a file you can use the command cat selections | sudo dpkg --set-selections and then use the command sudo apt-get dselect-upgrade to actually get all the packages installed.
If you do go that route you probably should backup your /etc and /home folders to another device.