I recently posted on how to update Debian for vps.net servers and its intricacies, I have since been able to document the process for Rackspace and this guide also works for Virtuozzo or OpenVZ VPS’ where you don’t have direct control over the kernel from your VPS so here goes.
strong>Disclaimer: please test this yourself first on a NON PRODUCTION SERVER. this may or may not work with other server providers but is specifically tailored to the Rackspace system, I do not guarantee its results outside of my tested system (Rackspace Cloud Server US DC from a stock Debian Lenny install).
I have found that on current Rackspace templates the archive key for squeeze has yet to be installed on the template so its best to start by updating the keyring to prevent GPG errors, I always recommend to start by running an apt-get update but this may not successfully complete so you may need to start with:
[bash]apt-get install debian-archive-keyring[/bash]
you may also need to accept the GPG error temporarily, alternatively you can get the squeeze GPG key from https://ftp-master.debian.org/keys.html and adding it into apt by running:
[bash]wget https://ftp-master.debian.org/keys/archive-key-6.0.asc && apt-key add archive-key-6.0.asc[/bash]
after this we can continue the step of updating our Debian install to Squeeze, to continue we must first update our sources.list file:
[bash]nano /etc/apt/sources.list[/bash]
i recommend cleaning out the old list completely if this is a stock install otherwise replace the default Debian mirrors with:
[bash]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
deb http://ftp.uk.debian.org/debian squeeze-updates main
deb-src http://ftp.uk.debian.org/debian squeeze-updates main[/bash]
remembering to update the mirror URL’s to ones closer to you if not using the UK Rackspace cloud.
Update the package lists.
[bash]apt-get update[/bash]
Install locales update (to stop lots of annoying Locales errors while upgrading).
[bash]apt-get install locales[/bash]
Then the final upgrade.
[bash]apt-get dist-upgrade[/bash]
When you are asked for options.
Change to dash – doesn’t matter which is chosen this can be whatever you prefer.
Chainload grub 2 – NO.
Change to dependency based sequencing (i selected both and its fine).
Restart services just hit enter.
Reboot for good luck (Isn’t actually needed because kernel is more up to date than Debian and not updated during the upgrade but better to eliminate issues ahead of crunch time).
[bash]reboot[/bash]
Sit back and Enjoy!
A couple things that might have changed since you wrote this:
1. I didn’t have any trouble with GPG errors.
2. It never said asked me anything about chainloading grub 2.
1. Yep that’s true if you have an upto date Lenny. It’s a special case for starting with base Lenny template which has been a little behind in the past
2. Interesting. I’ll take a look again next time I need to update. It could be because of the fact that rackspace uses a custom compiled kernel as well
I followed these steps a couple of months ago and it worked very well, thanks for taking the time to write this article. What I’ve been thinking about lately is that the Rackspace control panel still shows Debian Lenny as the base distribution. I wonder if this will create problems down the road, once Rackspace discontinues Lenny support, in the ability to restore an upgraded installation from a server image.