Upgrading your Debian VPS from lenny to squeeze

From BitFolk
Revision as of 15:12, 26 October 2012 by Strugglers (talk | contribs) (→‎Before shutting down: Clarify that this is before booting into squeeze kernel)
Jump to navigation Jump to search

Below are my notes recorded when migrating from Debian 5.0 (lenny) to 6.0 (squeeze) on my BitFolk VPS; hopefully others will expand upon it with their own notes.

Background work

  • Recommended: Move to UUIDs or LABELs in /etc/fstab and /boot/grub/menu.list (kernel and kopt lines) if that isn't already the case.
  • Remove clocksource=jiffies from your kopt line if you have it in /boot/grub/menu.list.
  • Is your root partition on /dev/xvda1 (as opposed to /dev/xvda)? If so, make sure that fdisk -l /dev/xvda works. If it doesn't you need to have your /dev/xvda1 device renamed to /dev/xvda. Contact support if that's the case.
  • Check if you have xen.independent_wallclock in /etc/sysctl.conf; remove it if you do.
  • Ensure you have working console access in case networking doesn't come up
  • Recommended: Contact support and request a snapshot of the VPS before upgrading in case it goes wrong

Perform the upgrade

  • Add the following to /etc/apt/sources.list for stable (non-security) updates:
deb http://apt-cacher.lon.bitfolk.com/debian/ftp.uk.debian.org/debian/ squeeze-updates main non-free

Before shutting down

The final thing you will want to do to complete your upgrade after upgrading the user land is to shut down and boot into the new squeeze kernel. Before this you'll want to:

  • Make sure you have grub-legacy installed.
  • Run update-grub to see which kernels it finds.
  • Make sure that your /boot/grub/menu.lst is actually going to boot into the right kernel. For squeeze this is usually linux-image-686-bigmem.

You're now ready to shut down and boot your VPS again.


Warning Warning: DO NOT REBOOT! You need to shut down (using shutdown -h from the VPS, or shutdown from Xen Shell) and boot again from your Xen Shell. If you reboot then the virtual machine will not be restarted; you'll end up booting into the old kernel again.


After booting into squeeze

  • Make sure all of your services are working properly

After a Successful Upgrade

  • Remember to let support know they can release your VPS snapshot, but make sure everything is ok first

Alternatives to upgrading in-place

If you can't afford the down time then you might like to take advantage of BitFolk's free offer of a new VPS to migrate to over a period of two weeks.

You can also completely reinstall your VPS yourself to a range of distributions. Upgrading Debian distributions in-place usually works well, however.