Feb 15, 11:57 AM
Category  

Well Debian 5.0 is finally out. And like it’s Christmas day, it’s time to upgrade one of my servers :). I specifically want the ipv6 support that Shorewall has for kernels > 2.6.25. My starting point may be a little odd because I have been running stable/testing for some packages, but I’m going to fix that right now.

As always:

  1. Take a backup
  2. Test the backup
  3. Read the release notes

Then proceed:

Edit /etc/apt/sources.list to point at lenny instead of etch. Here’s mine:

deb http://ftp.us.debian.org/debian/ lenny main contrib non-free
deb-src http://ftp.us.debian.org/debian lenny main contrib non-free
deb http://security.debian.org/ lenny/updates main contrib non-free
deb http://www.backports.org/debian lenny-backports main contrib non-free
deb-src http://ftp.us.debian.org/debian squeeze main contrib non-free
deb-src http://ftp.us.debian.org/debian sid main contrib non-free
deb http://mirror.noreply.org/pub/tor  lenny main

The deb-src lines are in case I want to build packages from testing or unstable from source, this usually works.

You’ll see I’ve been using etch-backports. As recommended by the Release Notes, to avoid conflicts and start from scratch, I’m going to pin lenny at 1001 in /etc/apt/preferences:

Package: *
Pin: release a=stable
Pin-Priority: 1001

Then I’ll start recording the upgrade session, because why not?

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

Update aptitude/apt-get first:

$ sudo aptitude update; sudo aptitude install aptitude apt debian-archive-keyring

Minimal upgrade to be safe:

$ sudo aptitude upgrade
[...]
387 packages upgraded, 115 newly installed, 6 to remove and 14 not upgraded.
Need to get 418MB of archives. After unpacking 448MB will be used.

Update the kernel if not already, and make sure it’s not marked auto (so aptitude doesn’t try to remove it later).

$ sudo aptitude install linux-image-2.6-686
$ sudo aptitude unmarkauto $(dpkg-query -W 'linux-image-2.6-*' | cut -f1)

Make sure you got it (2.6.18 is my old one):

$ dpkg -l | grep "ii  linux-image-*"
ii  linux-image-2.6-686                2.6.26+17                  Linux 2.6 image on PPro/Celeron/PII/PIII/P4
ii  linux-image-2.6.18-6-686           2.6.18.dfsg.1-24           Linux 2.6.18 image on PPro/Celeron/PII/PIII/
ii  linux-image-2.6.26-1-686           2.6.26-13                  Linux 2.6.26 image on PPro/Celeron/PII/PIII/

Note: I got the following error from the aptitude upgrade:

update-initramfs: Generating /boot/initrd.img-2.6.26-1-686
gzip: stdout: Input/output error
cpio: write error: Broken pipe
update-initramfs: failed for /boot/initrd.img-2.6.26-1-686
dpkg: subprocess post-installation script returned error exit status 1

It was because my /boot ran out of disk space. Whoops, partition too small.

And now.. dist-upgrade !!

$ sudo aptitude dist-upgrade

As mentioned in the changelogs, I then do:

$ sudo aptitude install vim-addon-manager mlocate

Then as mentioned in the release notes:

sudo aptitude install rsyslog sysklogd-

The moment of truth! Reboot!

alucard@kenobi:~$ uname -a
Linux kenobi 2.6.26-1-686 #1 SMP Sat Jan 10 18:29:31 UTC 2009 i686 GNU/Linux

In this case, I neither had to rename ethernet interfaces (perhaps because I’ve had ifrename set up for years), nor change /dev/hdX to /dev/sdX in grub. YMMV.

That was pretty painless, the only problem I see so far is that my (propietary) UPS agent daemon is segfaulting now :). Will update if more problems ensue.

Two weekends from now I’m going be reinstalling Testing from scratch on my laptop. Stay tuned!

Comment

Commenting is closed for this article.