January 17, 2014

Ubuntu Gutsy Gibbon Hardy Heron update failed OEL upgrade

So today while trying to VM an old server at work I ran into a problem. It was running Ubuntu 7.10 (Gutsy Gibbon) and would not virtualize properly. I tied to upgrade it using the EOL Path at ubuntu.com to 8.04 (Hardy Heron) but it just wouldn’t work I ended up with the following.

#do-release-upgrade
Checking for a new ubuntu release
Failed Upgrade tool signature
Failed Upgrade tool
Done downloading
extracting '/tmp/tmpGEx2kl/hardy.tar.gz'
Failed to extract
Extracting the upgrade failed. There may be a problem with the network or with the server.

This clearly isn’t good but after paring my /etc/apt/sources.list down to the following I was still getting the same error.

deb http://old-releases.ubuntu.com/ubuntu dapper main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu dapper-updates main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu dapper-security main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu dapper-proposed main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu dapper-backports main restricted universe multiverse

With the modification from archive.ubuntu.com to old-releases.ubuntu.com I figure it was really just modifying the server it was retrieving the files from and even though the remote server could be using the host header I though I would try modifying my /etc/hosts file to point to the same ip for archive.ubuntu.com as was resolved for old-releases.ubuntu.com.

/etc/hosts
91.189.88.17 archive.ubuntu.com

It worked running do-release-upgrade now returns

Checking for a new ubuntu release
Done Upgrade tool signature
Done Upgrade tool
Done downloading
extracting '/tmp/tmpXpWtyk/hardy.tar.gz'
authenticate '/tmp/tmpXpWtyk/hardy.tar.gz' against '/tmp/tmpXpWtyk/hardy.tar.gz.
gpg'

Reading cache

Checking package manager

Continue running under SSH?

This session appears to be running under ssh. It is not recommended
to perform a upgrade over ssh currently because in case of failure it
is harder to recover.

If you continue, a additional ssh daemon will be started at port
'9004'.
Do you want to continue?

So apparently really old versions of ubuntu have archive.ubuntu.com hard coded in the updater and this trick should get around it. Thank god they don’t use virtual hosts for their archives.