Dec 292008
 

Sponsored Link

Debian Lenny’s release is getting closer and closer and many people will want to upgrade their Etch servers to Lenny.This is currently in testing so it is not recommended to use these instruction in production.

Before Upgrade

Take a complete backup of your debian etch server

Procedure to follow

First you need to take a backup of your sources.list file using the following command

#cp /etc/apt/sources.list /etc/apt/sources.list.backup

Now edit the /etc/apt/sources.list file

#vi /etc/apt/sources.list

Now you need to replace “etch” with “lenny“.

deb http://ftp.gb.debian.org/debian/ etch main contrib non-free
deb-src http://ftp.gb.debian.org/debian/ etch main contrib non-free

deb http://security.debian.org/ etch/updates main contrib non-free

after replacing etch with lenny the file will look like this

deb http://ftp.gb.debian.org/debian/ lenny main contrib non-free
deb-src http://ftp.gb.debian.org/debian/ lenny main contrib non-free

deb http://security.debian.org/ lenny/updates main contrib non-free

The above example is for  a system using the main UK mirrors; your file might use a different local one

WARNING: if for some reason your apt sources doesn’t use etch, but “stable” then your apt commands will start to use lenny the moment it is released. This can result in wrongfully performing the upgrade while you don’t want to do this or even upgrade by mistake.We would always recommend people to use the release name (like etch, lenny) instead of generic names (like stable, testing); this way you will have the control on when you want to upgrade.

Perform upgrade

After changing apt sources we need to update source list using the following command

#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

This will take a while depending on what packages you have installed (that will need to be upgraded) and on your internet connection speed. After this is done you will have to reboot your system in order to activate the kernel upgrade to the lenny 2.6.26 kernel. Also you will want to check and see that all the applications you are using are still working as expected after the upgrade.

Some of the source from here

 Posted by at 12:06 pm

  10 Responses to “HowTo upgrade from Debian Etch (4.0 ) to Lenny (5.0)”

  1. I was curious about debian ‘testing’ and the security of it. I have always used ‘etch’ which has regular security updates. Would it be safe to use Lenny on a machine that was used for online banking or maybe something of that nature?

  2. bjenkins, as long as you have a firewall up and functioning, you’re probably in little danger. It’s the banks security system, which keeps transactions secure.

  3. I run lenny (=the current “testing”) on a Acer Aspire One with no problems for about two months now. Security wise I think with “testing” you are as save as with using “stable” (=the current “etch”). Security updates are as fast for “testing” as for “stable”, if not faster.
    But you should keep in mind that stability wise it *can* brake, which it VERY seldom does.

    Dangerseeker

  4. There are a big document (Debian Release notes) that is the full procedure to do this upgrade in a safe form. You could find the last version for this document at http://www.debian.org/releases/testing/releasenotes

  5. thanks for how to – works a treat after upgrade

  6. You may replace the first part (Before upgrade) by the following :
    sed 's/etch/lenny/' -i'.backup' /etc/apt/sources.list

  7. dont forget
    “apt-get -y dist-upgrade ”
    to ignore all yes answer/ confirmation

  8. Um! one small problem since upgrading from etch to lenny last night. Every time I try to access one of my websites now I get 500 Internal Server Error?
    I followed the instructions here and during upgrade process, keeping default settings when advised, is there something I have missed?
    Can access server via my other apps, its just the urls that cant be accessed.
    I thought it went very well and easy to follow, obviously I have still to do something?
    Any ideas?

  9. Please remove my comment above, not a fault of these instructions.
    Had to alter the suexec var-www to alter the doc root to mine and not default, all sorted.
    Thanks for the instructions very simple to follow.

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>