Logged in this morning to a small VPS that I have hosted at DigitalOcean and saw a notice that Ubuntu 14.04 was available, and that I should upgrade from 12.04 that was currently on the box. Did a bit of research, and figured I'd go ahead and do the upgrade. Nothing really critical was on the server, so it didn't seem all that important, but I didn't like the idea of having an outdated version of Ubuntu on my VPS.
So, I did exactly what was suggested...
Appeared to be working okay, until about half way through and errors started popping up that files couldn't be found - 404 status codes.
The VPS restarted and that's when the real fun began. Got an error that the file system was read only and to go to a recovery console, which I did. An fsck determined that the file system was okay.
What I decided to do, after much Googling, was to try the upgrade again from the recovery console.But I had to overcome a few snags.
First step was to remount / in read / write mode. In recovery it was read only.
mount -o remount,rw /dev/vda /
/dev/vda might also be /dev/vda1 depending on how you setup the droplet originally. This gave me access to where I could write to files.
Next I needed networking. Originally I went and manually setup eth0 to the settings for my droplet which are, very conveniently, shown under the VNC window in the DigitalOcean control panel. Turns out, there was an easier way.
service networking restart
This loaded eth0, which I had already done, but also lo and eth1. Didn't need those two, but it was also a shorter command.
This didn't bring up DNS though. I could ping remote IP addresses, but not look up domain names. The DNS servers were correctly set, just not working.
So what I wound up doing was to set the two domain names I needed, mirrors.digitalocean.com and nyc2.mirrors.digitalocean.com, in the /etc/hosts file so they didn't need DNS with the following two lines.
You'll probably want to review that those two IPs are still correct, and also change from nyc2 to whatever data center you're in.
Then, ran the upgrade command again and after about 30 minutes of watching the console scroll by version 14.04 was up and ready.
Only snag I've found so far is that Apache is giving me a forbidden error which is probably just some permissions deal coming from a newer version of Apache in 14.04 compared to 12.04. But, SSH is working again so I can now go through PuTTY instead of the VNC console and get everything back where it needs to be.