Debian Lenny Upgrade

From ivc wiki
Revision as of 15:03, 21 February 2009 by Ivc (talk | contribs)
Jump to navigationJump to search

This is a short summary of the process I went through to update Debian Etch to Debian Lenny.

Preparation

Update etch to the latest available packages.

aptitude update
aptitude upgrade

Read the Potential problems section in the upgrade notes. I had to update Apache2 configs.

Backup the files in /etc, /var/lib/dpkg, /var/lib/aptitude/pkgstates and the output of dpkg --get-selections "*".

Replace lilo with grub bootloader. Lilo can't handle the bigger initrd.

Make sure to process or remove any packages on hold.

dpkg --get-selections | grep hold

Clean and remove any packages stored on the disk.

apt-get clean

Upgrade to Lenny

Update the apt sources.list, replace etch with lenny.

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

Start recording the upgrade session using the script utility.

script -t 2>~/upgrade-lenny.time -a ~/upgrade-lenny.script

Playback using the following command.

scriptreplay ~/upgrade-lenny.time ~/upgrade-lenny.script

Update the packages to reflect Lenny.

aptitude update

Now, install the Lenny version of apt and aptitude to avoid any problems while the upgrade runs.

aptitude install aptitude

The process will install libc6 and locales, and other dependencies. Some services will be restarted, i.e ssh, postfix, etc.

Convert the apt package sources to support the new version of apt.

aptitude search "?false"

Next, first upgrade, the minimal upgrade. This is recommended to update only packages while not removing or installing huge amount of packages that dist-upgrade would do.

aptitude upgrade

Then run dist-upgrade to update the rest of the packages to Lenny.