SmoothLinux Blog

Budgetvm Xen VPS Upgrade Debian 6 To Debian 7

23 September, 2014 | xen

Budgetvm or Enzu still do not have Debian 7 AKA (Wheezy) Xen build template for what ever reason. I’m going to show you how I upgraded there Debian 6 Template to Debian 7. All commands below were ran as root and I will assume you are root on the server going forward.

Warning!!!

The most important thing here is to NEVER change the kernel major release version. Mean do not upgrade the kernel from 2.6.32-5 to 2.6.33-5 Personally I have never been able to fix the VPS after a major release version kernel change. Please note this is not fool proof and I have trashed the VPS more then once trying to upgrade to Debian 7 which is why I’m making this. I have only done this on a clean VPS so there was no fear of data lose.

Step 1: Updating squeeze

aptitude upgrade

Step 2: This installs all the updates for squeeze.

aptitude -y full-upgrade

Step 3: Rebooting the server after updates

shutdown -r now

Step 4: Next I put a hold on the active kernel version.

You will need to replace the x.x.xx.x what ever version of the kernel your VPS is currently running. If your not sure of the kernel version that you need to place a hold on you can run the following command:

aptitude search linux-image | grep ^i

This places a hold on the current version of your kernel:

aptitude hold linux-image-x.x.xx-x-amd64 ; aptitude hold linux-image-amd64

Step 5: Next I made a change to update-initramfs so that initramfs will not updated anymore.

Edit: /etc/initramfs-tools/update-initramfs.conf
change update_initramfs=yes to update_initramfs=yes

Step 6: This changes the codename of the apt repos from squeeze to wheezy

sed -i s/squeeze/wheezy/g /etc/apt/sources.list

Step 7: Pulls down updates for wheezy

aptitude update

Step 8: This will upgrade squeeze to wheezy

aptitude dist-upgrade

Step 9: Reboot hopefully the VPS comes back up

shutdown -r now

Step 10: Checking release version

lsb_release -a

You should see something like the following if all went well:

No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 7.6 (wheezy)
Release: 7.6
Codename: wheezy

Comments

comments powered by Disqus