Tag Archives: debian

update: Debian 4 etch -> 5 lenny

http://www.debian.org/releases/stable/i386/release-notes/ch-upgrading.ru.html

0.
It is reccomended to mount disks by UUID.
Several ways to get UUID info.
$ ls -l /dev/disk/by-uuid
more trustworthy info:
$ blkid /dev/sda6
output example:
/dev/sda6: UUID="bdddb5e7-04d0-4ae1-86be-aef5ade3b6a6" SEC_TYPE="ext2" TYPE="ext3"
Edit /boot/grub/menu.lst:
# kopt=root=/dev/hda6 ro
should be changed to:
# kopt=root=UUID=bdddb5e7-04d0-4ae1-86be-aef5ade3b6a6 ro
update-grub
Edit /etc/fstab. Example:
/dev/hda6 / ext3 defaults,errors=remount-ro 0 1
should be changed to:
UUID=bdddb5e7-04d0-4ae1-86be-aef5ade3b6a6 / ext3 defaults,errors=remount-ro 0 1

Do not forget about possibility of nic rename by udev.
/etc/udev/rules.d/70_persistent-net.rules

1. Create backup:
tar -vcpzf /home/backup.tgz --exclude=/proc --exclude=/lost+found --exclude=/home --exclude=/mnt --exclude=/sys --exclude /var/cache/apt/archives /

2.
Make sure etch is updated.
Check for unfinished business: aptitude, g.
Check: /etc/apt/preferences/.
dpkg --audit
aptitude search "~ahold" | grep "^.h"
dpkg --get-selections | grep hold

edit /etc/apt/sources.list:
deb http://mirror.yandex.ru/debian/ lenny main
deb-src http://mirror.yandex.ru/debian/ lenny main
deb http://security.debian.org/ lenny/updates main
deb-src http://security.debian.org/ lenny/updates main
deb http://volatile.debian.org/debian-volatile lenny/volatile main
deb-src http://volatile.debian.org/debian-volatile lenny/volatile main

3.
script -t 2>~/upgrade-lenny.time -a ~/upgrade-lenny.script
aptitude update
aptitude -y -s -f --with-recommends dist-upgrade
aptitude install aptitude apt dpkg
aptitude search "?false"

optional step, specific for webhosting server:
aptitude install proftpd nginx
aptitude install postfix
aptitude install apache2 apache2-mpm-prefork apache2.2-common apache2-suexec-custom
update custom suexec
copy new cgi: php5.2.latest and php5.3.latest

aptitude safe-upgrade
aptitude dist-upgrade
dpkg -l "linux-image*" | grep ^ii

4.
Rebuild perl modules
cpan