Updating Ubuntu server from 8.10 to 10.04

I have a VPS that has Ubuntu 8.10 Server Edition installed on it and I would like to upgrade it to 10.04. What would be the correct way of doing this? I only have ssh access to it and a "Start/Shutdown VPS" in the client panel of the vendor. In other words, I do not have physical access to it.

Also worth noting is that I apparently cannot install programs any more since the sources (osuosl.org ?) are not online. Not the ones this server has set anyway.

# apt-get update
Ign http://ubuntu.osuosl.org intrepid Release.gpg
Ign http://ubuntu.osuosl.org intrepid/main Translation-en_US
Ign http://ubuntu.osuosl.org intrepid/universe Translation-en_US
Ign http://ubuntu.osuosl.org intrepid Release
Ign http://ubuntu.osuosl.org intrepid/main Packages
Ign http://ubuntu.osuosl.org intrepid/universe Packages
Err http://ubuntu.osuosl.org intrepid/main Packages
  404 Not Found
Err http://ubuntu.osuosl.org intrepid/universe Packages
  404 Not Found
W: Failed to fetch http://ubuntu.osuosl.org/ubuntu/dists/intrepid/main/binary-amd64/Packages.gz  404 Not Found

W: Failed to fetch http://ubuntu.osuosl.org/ubuntu/dists/intrepid/universe/binary-amd64/Packages.gz  404 Not Found

E: Some index files failed to download, they have been ignored, or old ones used instead.

Ok, I managed to get it solved using wojox' tip as a kickstart.

  1. The main issue was the inability to access the repos and thus run a proper upgrade. This is resolved by editing /etc/apt/sources.list and changing every occurance of intrepid into jaunty. You can do this manually or use wojox' oneliner (which requires perl to be installed). Note that we assume that the jaunty repos are still up, which they were at the time of writing.

    sudo perl -p -i.intrepid -e 's/intrepid/jaunty/' /etc/apt/sources.list
    

    Note - Ubuntu provides mirrors to old releases: https://help.ubuntu.com/community/EOLUpgrades/Intrepid

  2. Update the package list

    sudo apt-get update
    
  3. Install update-manager-core

    sudo apt-get install update-manager-core
    
  4. Run do-release-upgrade which will handle the update to the next version properly (and make sure being on ssh is not a hindrance). Keep in mind that although we changed the source list earlier, we are still on the version we started out. So in my case, I had to do step 4 three times. Be sure to reboot between each upgrade. Note that in case of doubt on your current Ubuntu version, you can always issue

    cat /etc/issue
    

It may not work because you you have to go in chronological order. 8.10 > 9.04 > 9.10 > 10.04 and 9.04 is EOL as well.

sudo perl -p -i.intrepid -e 's/intrepid/jaunty/' /etc/apt/sources.list

I haven't tried this, but it may be possible, instead of doing a manual upgrade, to switch your /etc/apt/sources.list from using "http://*archive.ubuntu.com/ubuntu/" to using "http://old-releases.ubuntu.com/ubuntu/". Then try the normal path of using do-release-upgrade. The updater will likely complain that you're not using an "official mirror", but go ahead with it. Once you're at 9.04, you can switch the sources.list back to the official mirrors and upgrade to 9.10 and continue normally, maybe.

I am worried that do-release-upgrade will just bomb out since it doesn't know about the EOL releases at all.