Difference between revisions of "Debian Lenny Upgrade"
(5 intermediate revisions by the same user not shown) | |||
Line 12: | Line 12: | ||
Read the [http://debian.org/releases/lenny/i386/release-notes/ch-information.en.html#problems Potential problems] section in the upgrade notes. I had to update Apache2 configs. | Read the [http://debian.org/releases/lenny/i386/release-notes/ch-information.en.html#problems 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 "*". | Backup the files in /etc, /var/lib/dpkg, /var/lib/aptitude/pkgstates and the output of dpkg. | ||
dpkg --get-selections "*" > dpkg-get-selections.txt | |||
Replace ''lilo'' with ''grub'' bootloader. Lilo can't handle the bigger initrd. | Replace ''lilo'' with ''grub'' bootloader. Lilo can't handle the bigger initrd. | ||
Line 19: | Line 21: | ||
dpkg --get-selections | grep hold | dpkg --get-selections | grep hold | ||
Use aptitude in GUI mode and remove any obsolete or unused packages. Press "-" to mark as remove and "g" to purge. | |||
aptitude | |||
Clean and remove any packages stored on the disk. | Clean and remove any packages stored on the disk. | ||
Line 57: | Line 63: | ||
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. | 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. | ||
The bulk of the upgrade is done here, lots of packages are updated. | |||
aptitude upgrade | aptitude upgrade | ||
I had to update the following configurations. | I had to update the following configurations. | ||
/etc/issue | |||
/etc/issue.net | |||
/etc/bash.bashrc | /etc/bash.bashrc | ||
/etc/login.defs | |||
/etc/securetty | /etc/securetty | ||
/etc/logrotate.conf | /etc/logrotate.conf |
Latest revision as of 16:37, 21 February 2009
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.
dpkg --get-selections "*" > dpkg-get-selections.txt
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
Use aptitude in GUI mode and remove any obsolete or unused packages. Press "-" to mark as remove and "g" to purge.
aptitude
Clean and remove any packages stored on the disk.
apt-get clean
Upgrade to Lenny
I upgrade the system over ssh. Two sessions open will let you upgrade in one and check the updated configuration files in the other (the .dpkg-old files).
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.
The bulk of the upgrade is done here, lots of packages are updated.
aptitude upgrade
I had to update the following configurations.
/etc/issue /etc/issue.net /etc/bash.bashrc /etc/login.defs /etc/securetty /etc/logrotate.conf /etc/sysctl.conf /etc/smartd.conf
Then run dist-upgrade to update the rest of the packages to Lenny.
aptitude dist-upgrade
There might be some issues, either accept the proposed solution or fix the issues manually.
Finally, upgrade the kernel. Find the installed kernels using the following command.
dpkg -l "linux-image*" | grep ^ii
Find available kernel metapackages.
apt-cache search linux-image-2.6- | grep -v transition
My system had everything in order. Maybe remove some of the older kernels not used anymore.