Jun 26

Upgrade Debian Etch to Lenny

Category: Linux   — Published by tengo on June 26, 2010 at 5:47 am

In order to upgrade a running server via ssh from Debian Etch 4.0 to Lenny 5.0 I basically followed these steps here and had a perfect result.

Change every line in /etc/apt/sources.list having "etch" to "lenny", then:
> aptitude update
Once this is done we will want to upgrade first the core apt packages
> aptitude install apt dpkg aptitude
and finally perform the full upgrade
> aptitude full-upgrade
Note:-dist-upgrade was renamed to full-upgrade in lenny’s aptitude; or you can use:apt-get dist-upgrade

I avoided to append a force yes -y switch to keep an eye on what was happening. Subsequently a few package configuration dialogs popped up, for example:

If I would like to keep my mysqld configration my.conf.

A dialog to select accepted certificates from the ca-certificates  package.

Dovecot required me to decide on my conf file:
/etc/dovecot/dovecot.conf (with the new one from share)
--- /etc/dovecot/dovecot.conf 2009-11-08 19:59:44.000000000 +0100
+++ /usr/share/dovecot/dovecot.conf 2009-09-23 12:43:25.000000000 +0200

Most changes involved the introduction of managesieve to the newer dovecot, for example:

instead of simply: listen = *
it is now:
protocol managesieve {
listen = *:12000
}
listen = *

Recommended but still commented out login_process_size is now 64:
#login_process_size = 64

I kept my  login_greeting_capability = yes, commented out line is now
# login_greeting_capability = no

And I had a different mail folder path. Anyway, in general most new things in the newer dovecot conf were comments, so I kept my older and working conf.

Of course I kept my highly customized /etc/apache2/sites-available/default and apache related confs: /etc/apache2/apache2.conf, /etc/apache2/ports.conf.

I allowed the replacement of /etc/php5/apache2/php.ini as I do not use php anyway.

And I was through with:
Current status: 0 updates [-445], 13406 new [-7].

To be sure I checked with apt-get:
> apt-get update
> apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Before I had the guts to reboot, I made a quick visit to one of the hosted websites and notices things weren't running smoothly anymore. I got Error 500s.

Running some of the web CGI scripts from command line  revealed that most need perl modules were missing... So I had to manually bring them back:
CGI::Fast YAML CGI::Application Log::Tiny CGI::Application CGI::Application::Plugin::DBH CGI::Application::Plugin::Redirect CGI::Application::Plugin::Forward CGI::Application::Plugin::Authentication Test::Harness ExtUtils::CBuilder ExtUtils::ParseXS Module::Build Test::Taint Algorithm::Diff Date::Calc Captcha::reCAPTCHA XML::Simple HTML::TagCloud HTML::paginator GD and a whole slew of essential cpan modules. As it seems the update/upgrade had wiped my perl module repository or replaced perl 5.8 with 5.10 respectively.

One of these made some problems. I got "Cannot unzip, no unzip program available" . As it turned out cpan was wrongly configured against my now upgraded system. So I started cpan and entered in interactive mode "o conf init" to let cpan reconfigure itself. And it wrote a working /etc/perl/CPAN/Config.pm and the unzip error was gone.