Upgrading Lenny to Squeeze on Rackspace Cloud
Debian 5 (Lenny) is now out of support it will not be receiving any more security or bug fix updates, meaning an upgrade to 6 (Squeeze) is required. The procedure is reasonably simple, however if you are using Lenny on a Rackspace Cloud server, you will get an error relating to "dependency based startup". Furthermore, if you are using MySQL 5, you will need to upgrade that to 5.1 and this itself has a pitfall if you have based your config on the stock my.cnf. Below is the procedure for upgrading Debian Lenny to Squeeze on Rackspace Cloud with MySQL installed.
Preparation
apt-get autoremove
apt-get install debian-archive-keyring -y
wget https://ftp-master.debian.org/keys/archive-key-6.0.asc && apt-key add archive-key-6.0.asc
# LSB style init header:
#
### BEGIN INIT INFO
# Provides: Nova-Agent
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start nova-agent at boot time
# Description: nova-agent is a guest agent for OpenStack nova.
### END INIT INFO
deb http://ftp.uk.debian.org/debian/ squeeze main
deb-src http://ftp.uk.debian.org/debian/ squeeze main
deb http://security.debian.org/ squeeze/updates main
deb-src http://security.debian.org/ squeeze/updates main
# squeeze-updates, previously known as 'volatile'
deb
http://ftp.uk.debian.org/debian/ squeeze-updates maindeb-src http://ftp.uk.debian.org/debian/ squeeze-updates main
Run the distribution upgrade
apt-get update
apt-get autoremove
apt-get install apt dpkg
apt-get install locales
apt-get dist-upgrade
apt-get install mysql-server-5.1