Upgrade from Debian Lenny to Squeeze in OVH RPS

14 November 2010

This website is hosted in one of these servers: http://www.ovh.co.uk/products/rps_offers.xml

OVH offers a wide list of possible OS to install in your dedicated box and I believe the best one is Debian, I love its simplicity, community support, security and above all its cleanliness, you start with a clean base system and you install and configure just what you need, having full control of it.

In OVH you can install Debian 5 (Lenny), which is ideal for web hosting, but if you want to upgrade Debian 6 (Squeeze), much up-to-date and now stable, this is how to do it:

  • 1. Install Debian50_x64 from the OVH Manager (in one of two partitions, I chose one).
  • 2. Updated it:
aptitude update
aptitude upgrade
  • 3. Changed /etc/apt/sources.list replacing “lenny” with “squeeze”.
  • 4. Prepare the upgrade:
aptitude update
aptitude install apt dpkg aptitude
touch /etc/udev/kernel-upgrade
  • 6. Avoid a problem with locale during the upgrade:
apt-get install locales
dpkg-reconfigure locales
  • 7. Upgrade all packages.
apt-get dist-upgrade
  • 8. During this installation the key questions to respond are the ones regarding the boot, because the system will boot from the Netboot using the OVH kernel the questions about Lilo and Grup should be just set to do nothing.
  • 9. That completes the upgrade, but in my case, after all packages were upgraded, the system for some reason didn’t generate the disk devices in /dev properly. I had the system mounted in /dev/sda1 but the swap was not mounted. In fact there were no /dev/sda or /dev/uba at all. To fix this you would need to create the missing devices and mount your swap (believe me you don’t want a server without swap). So first check the major and minor values from the partition info:
cat /proc/partitions
major minor  #blocks  name

180        0     503808 uba
180        1     497983 uba1
8        0   20971520 sda
8        1   20479969 sda1
  • 10.  Create the devices accordingly to your values above, then you can enable the swap disk again, in my example:
mknod /dev/uba b 180 0
mknod /dev/uba1 b 180 1
swapon -a
mknod /dev/sda b 8 0
mknod /dev/sda1 b 8 1
  • 11. That is all, the system has all packages upgraded now and I am happy running Apache 2.2.16 with PHP 5.3.3 !!

Update: Now that Squeeze is stable you might want to try to upgrade to Debian “wheezy” (testing) in order to have newer versions of packages and still a very robust system. I would say that after upgrading to Squeeze you might just have to edit /etc/apt/sources.list again and replace “squeeze” with “wheezy”, then “apt-get update” and “apt-get dist-upgrade”. If anyone tries please let me know what problems (if any) encountered.


9 Comments

avatar
pistache 14 April 2011

could you reboot after that, in fact ?

avatar
abad 25 April 2011

Thanks for your question. You can reboot of course. Anyway this article is a bit irrelevant now as OVH finally offers Debian 6.0 64-bit in their OS sections.

avatar
Jan! 10 May 2011

“Anyway this article is a bit irrelevant now as OVH finally offers Debian 6.0 64-bit in their OS sections.”

Is that so? I could not see it. Maybe because I registered in The Netherlands? When I choose Linux → Standard, it says:

“Besturingssysteem Debian 5.0 (Lenny)
o 32 bits o 64 bits”

And others like CentOS and Ubuntu. No Squeeze. Could you verify that?

avatar
Vilgefortz 12 May 2011

Hi,

Thanks a lot for your article. With your article, I finally managed how to fix the USB drive problem which didn’t mount correctly.

And I also wanted to say your article is not one bit irrelevant, because OVH still doesn’t provide support for Debian 6 (at least for RPS1 offer).

avatar
abad 7 June 2011

Hi both, sorry for the confusion, I was wrong saying the article is was no longer relevant.

OVH, as per today, seems to offer Debian 6 in their OS options for Kimsufi servers (what is the service I am using now). I incorrectly assumed they did the same with RPS.

Happy the article is still relevant 🙂

avatar
alice ferrazzi 12 June 2011

for me is not working…
i have do everything but at the netboot reboot is say that im missing init parameter and it go in kernel panic

i hate ovh and the lack of support from it

avatar
stefano 15 May 2012

hi
I followed the instructions to create the nodes, but after reboot they disappear!
anyone has idea why?

thanks for this article!

avatar
leonardo 23 May 2012

An add-up that may be useful to Stefano. When the server starts again, you will have no root mounted. This is because, as far as I understand, the kernel you use in the hd has no support for iscsi, while the ovh kernel you use with net-boot does not support the udev version in squeeze, which probably was not the case when this post was written. So what happens (with net-boot) is that the server boots, on the manager you see that a ping has been received, than it probably crashes before you do anything else. The solution I found is to disable udev. so *before* upgrading unistall udev. Else, if you’re already screwed do this:
– login with rescue kernel
– mount root filesystem (also mount proc “mount –bind /proc /mnt/proc” )
– chroot into it
– apt-get remove udev
now you should regenerate devices (cd /dev; MAKEDEV) but in my case it was not necessary.

Look for udev rps on google to have more info.

avatar
Guillaume 5 February 2013

Thank’s for this article.

I try to upgrade a RPS to Squeeze, and now I can not ping it anymore after reboot, I used to follow all the steps listed here.

Any advice to fix ?

Leave a Reply