Tag Archives: Guide

HOWTO: Upgrade Debian Lenny (5.0) to Debian Squeeze (6.0) on VPS.net

Here are the working upgrade instructions from Lenny to Squeeze (Debian 6) on VPS.net.

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 VPS.net system, I do not guarantee its results outside of my tested system (OnApp Cloud – LON-I from a stock Debian Lenny install).

UPDATE: VPS.net have now released Debian 6 templates on there clouds however upon testing this i have noted several issues with it and as such although it makes the install of debian 6 easier on VPS.net i am not however recommending using the Debian 6 templates that vps.net until they fix the bugs with them – the biggest problem so far is that you cant update the kernel without a fatal error which will occure everytime you use apt to run any updates (which you should be doing regularly), there are also issues with sub-optimal mirrors being selected and at least from what i can see wrong timezone by default in LON clouds. At this time because of the kernel update issue you cannot install ksplice and possibly any program that uses a shell script that interacts with apt for installing.

Other notes: Ksplice is known to work with Debian Squeeze, also despite having success on the older clouds (eg LON-C) I havent been able to document possible pitfalls with non OnApp based clouds therefore its recommended to first TEST your upgrade in any instance and/or migrate to the newer clouds if you can. I assume you can SSH in as root to your server and can handle basic file editing with nano (substitute your preferred text editor as neccesary)

Here goes:

Fully update your lenny system (recommended to avoid some possible gpg errors).

apt-get update && apt-get upgrade

I recommend rebooting here just as a safety measure.


Reconnect to your server then update your apt sources list.

nano /etc/apt/sources.list

Your sources list should look not to different to the following (for UK servers) update the references appropriately to get the closest mirrors to you:

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

Update the package lists.

apt-get update

Install locales update (to stop lots of annoying errors while upgrading).

apt-get install locales

Update the kernel and install udev first.

apt-get install linux-image-`uname -r|sed 's,[^-]*-[^-]*-,,'` udev


When asked for change to UUID’s – select NO

Now edit your /boot/grub/menu.lst and edit any reference of sda1 to xvda1 (should be 3 of them).

also edit your /etc/fstab file and change an references from sdaX to xvdaX  (should only be 2 items)

Then reboot again.


Reconnect to your server and check your kernel version.

uname -r

Should return something starting with 2.6.32 similar to:


Then the final upgrade.

apt-get dist-upgrade

When you are asked for options.

Change to dash – doesnt matter which is chosen this can be whatever you prefer.

Chainload grub 2 – NO.

Change to dependancy based sequencing (i selected both and its fine).

Restart services just hit enter.

Reboot for good luck (isnt actually needed because kernel is already up to date but better to eliminate issues ahead of crunch time).


Sit back and Enjoy!