On febrary 14th the Debian distribution 5.0 (lenny) passed from testing to stable, so I need to upgrade. Probably I will do it also on production server in office, but now I start whith my home server, since it's my first
dist-upgrade.
Backup
First of all a complete backup:
rsync -vrpoglHDIt --delete --progress \
--exclude=/proc --exclude=/sys --exclude=/tmp --exclude=/var/run \
--exclude=/var/lock --exclude=/var/tmp --exclude=/var/backups \
--exclude=/var/cache --exclude=/var/tmp \
--exclude=/mnt/multimedia --exclude=/mnt/mp3 \
/ /mnt/multimedia/backup
It's also possible to use a
not_rsync file, but I prefer this way. For future synchronization the only difference is the missing I parameter of rsync. Here what states the man page:
-I, --ignore-times don't skip files that match size and time
--size-only skip files that match in size
--modify-window=NUM compare mod-times with reduced accuracy
In this way new synchronization will be more precise. Now a cronjob can be useful.
Upgrade
I'm now ready for the upgrade. I suggest a reading of
relase-notes on debian.org site.
I modity /etc/apt/sources.list just to point on lenny repository:
deb http://ftp.it.debian.org/debian/ lenny main
deb-src http://ftp.it.debian.org/debian/ lenny main
deb http://security.debian.org/ lenny/updates main
deb-src http://security.debian.org/ lenny/updates main
The next command starts session logging, just in case something goes wrong:
script -t 2>~/upgrade-lenny.time -a ~/upgrade-lenny.script
Packet list update
aptitude update
app and aptitude upgrade, plus some dependencies
apt-get install apt
Now I've got the first difference from relases-note, the previous command remove/upgrade/install a lot of packet. Asking in forums and mailinglists I noted that it happened to other people, so I go forward, crossing finger

I have to re-install aptitude through apt-get, since the last command removed it. After that I need an update
aptitude install aptitude
Again a lot of packet removed, upgraded and installed.
aptitude search "?false"
A minimal system upgrade:
aptitude upgrade
And now the real upgrade. I don't need to upgrade X, so it's sufficient the following:
aptitude dist-upgrade
At the end I tell lilo that it have to boot with the new 2.6.26-1 kernel
lilo -v
After a deep reading of possible problem I proceed with the reboot:
reboot
Here you are my new lenny-box
g4b0@debian:~$ more /etc/debian_version
5.0
g4b0@debian:~$ uname -a
Linux debian 2.6.26-1-686 #1 SMP Sat Jan 10 18:29:31 UTC 2009 i686 GNU/Linux
g4b0@debian:~$
All information in this post is provided "as is" without warranty of any kind, use it at your own risk. Happy linuxing!
Ma io ogni tanto leggerei anche il tuo blog, ma cristo se non ci capisco una sega…
Ahahah, hai ragione.. è che o scrivo post tecnici, o scrivo post polemici. Roba porno non la posso mettere, ed ho esaurito i miei argomenti…