This really was an adventure. In my previous three Linux upgrades -- Red Hat 8 to Xandros 2, Xandros 2 to Xandros 4, and Xandros 4 to Debian 4.0 -- I've simply done a fresh install of the new operating system, copied my user files over, and then reinstalled all the applications I use. This time I decided to try Debian's vaunted ability to automatically upgrade a working Debian system from one version to the next.
The good news: the upgrade from Debian 4.0 "Etch" to Debian 5.0 "Lenny" worked. The bad news: it needed
lots of knowledgable intervention. The process reinforced my belief that Debian is
not for newcomers to Linux. Also, this approach is not for those with limited Internet bandwidth. If you have dial-up service, you'd probably be better off obtaining a Debian 5.0 CD and doing a completely fresh install.
Skip the rest if you're not interested in the details of my upgrade.
Sunday. I spent the day backing up my "Etch" system to DVD-Rs. Since the DVD writer requires a lot of processing time, I stop all CPU-intensive tasks (like web browsing) while running the backup programs. Fortunately I had some text editing to do.
I've mentioned before that we have satellite Internet service. At 512 kilobits/second (about 200 MB/hour), this is not "broadband" by the modern definition. More to the point, download activity is capped to roughly 15 to 20 megabytes per hour during the day and evening. Large downloads need to be run overnight. And the updates to Debian 4.0 "Etch" -- a prerequisite for the upgrade to Debian 5.0 "Lenny" -- required 129 MB of downloads. So I started it late Sunday night and went to bed. Then I got up an hour later to start it again, because the ftp.ca.debian.org mirror doesn't transfer files reliably -- about half end up with the "connection dropped by peer".
The good news was that the updates ran without problem. This was step 2 of the
HowToForge instructions. One thing that wasn't mentioned in those instructions: aptitude warned me that a reboot would be necessary. I did this after the "aptitude upgrade" completed.
Monday. I got up at 1:30 am Monday night (Tuesday morning) to start Step 3 of the instructions, which began with switching to the "Lenny" repository -- no problem there -- and then installing a few key packages. After the first nineteen packages
all failed to download, I stopped and edited /etc/apt/sources.list to use the U.S. "ftp.us.debian.org" instead of the Canadian "ftp.ca.debian.org" repository.
Then the packages downloaded without a hitch.
"aptitude upgrade" informed me that the preferred usage is now "aptitude safe-upgrade", but it ran anyway....and informed me that it was going to install 239 MB from the repository! I went back to bed. At 4 a.m. I got up, just as it was finishing the downloads...and a good thing too, because installing those downloads asks lots of questions. Mostly about services that need to be restarted, or whether to replace files that have been changed since installation.
I knew what they were asking, but a newbie would have been intimidated. Fortunately the default answers were good in every case.
One of the cryptic warnings I received -- again not mentioned in the HowToForge instructions -- was that kdm (the KDE display manager) would need to be restarted. This would definitely have puzzled a beginner. In fact, since I wasn't sure exactly where kdm was started, I simply elected to reboot the system.
I saw several other warnings scroll by on the screen, which I jotted down for future reference:
a) I must edit /etc/pdnsd.conf and /etc/default/pdnsd to restore pdnsd function (the DNS cache that I use).
b) It was unable to remove "obsolete major version" 7.4 of postgresql; I would need to install the latest packages ("see the manpage") and then remove 7.4 manually. (Not crucial, since I don't use postgresql.)
c) It was unable to update the mail transfer agent exim4 because /var/log/exim4/paniclog is "not null" (not empty). Fortunately, I know what exim4 is, and that I don't need it. I'll deal with this later.
The next step was "aptitude full-upgrade", which reported that it would be downloading
1303 MB from the repository. Yikes! That needs a full 7 hours of unrestricted download, so at 4 a.m. I couldn't finish. I decided to wait. Fortunately, even with the "minimal" upgrade I had already performed, Debian continued to run all my applications.
Tuesday. 11:30 pm: Type "aptitude full-upgrade", and confirm. Go to bed.
Wednesday. I woke up at 7 am to yet more messages about files which had changed, and should they be replaced? Again, the default answer ("no") in all cases. It took about an hour to finish installing all the new packages, and then I was able to reboot into the new kernel.
Except that it booted into text mode, not graphical. And when I typed "startx" to launch the graphical display, I was informed that it was unable to load the "mga" module (the driver for my video card). Did Lenny drop support for my video card?
a) Another "aptitude full-upgrade" didn't fetch any missing packages (I thought perhaps one failed to download during the night.)
b) Attempting to use dselect to load xserver-xorg-video-mga reported a conflict. A strange circularity of three packages requiring each other, but two conflicting with each other.
c) The old standby "dpkg-reconfigure xserver-xorg" didn't do anything, except to report that now it couldn't load the "vesa" driver either.
d) A bit of work with Google (on another computer) revealed that the new X.org package uses "Xorg -configure" to regenerate the configuration. Alas, that didn't help either.
In that hour and a half, I learned quite a lot about the text-mode tools for package management (dpkg, dselect, and apt-get). For whatever reason, "apt-get xserver-xorg-video-mga" worked when dselect did not. And "Xorg -configure" then generated a valid xorg.conf file.
Except that for some reason, it configured my monitor as 1280x960 instead of 1280x1024. And in the process, I lost the dual-monitor function (both monitors displayed the same image). Fortunately, I've dealt with video configuration before, and I was able to manually edit xorg.conf (a) to restore the dual-screen function, and (b) to restore 1280x1024 resolution.
Finally, by about 10 am, I was up and running.
I speculate that this all happened because I was in KDE, using a console window, when I did the upgrade. Perhaps if I had booted into text mode for the "aptitude full-upgrade", the mga driver would have been installed. I'm sure I would still have had to edit xorg.conf, though.
Loose ends. There are still some things that need fixing.
a) The very useful "locate" function disappeared in the upgrade. Fortunately, I was able to find this quickly in the repository.
b) The new version of Icedove (Thunderbird) was unable to upgrade the Enigmail encryption plugin. I was able to fix this by deleting the old plugin, and then downloading and installing the new version manually.
c) As mentioned above, postgresql and exim4 need to be manually upgraded. A low priority.
d) Another module that didn't get upgraded was 'netatalk'. I presume this is because it was running, and unable to be shut down, during the upgrade. I don't use AppleTalk, so this isn't a problem, but I should fix it for completeness' sake.
e) Virtualbox is now reporting that its kernel module doesn't support my new kernel. This probably means that I will have to download and install a new copy of Virtualbox. I'll need to do this soon.
I mustn't overlook the bright side: the upgrade worked, no files were damaged, and all of my old applications are still installed and apparently all functioning. I think I probably saved time doing the upgrade -- it would have taken me days to re-install all the applications I use.
All in all, a lot of work, but a success.