Upgrading Kubuntu 7.04 (Feisty Fawn) to 7.10 (Gutsy Gibbon) from a shell (mostly)

I figured I would try and beat the rush and upgrade my desktop computer to Kubuntu 7.10 (Gutsy Gibbon) tonight. Tomorrow and in the near future the servers hosting the Ubuntu package repositories are likely to be slow. I also feel that I needed to get some practice in tonight in order to assist people I know with the upgrade. In the past I have always performed version upgrades through the shell use the apt-get commands. I wanted to try in this release to see how the graphical upgrade utilities were working. As a user who is frequently trying new things and changing the system I wasn’t optimistic.

I read that the upgrade should be as simple as typing update-manager -d. However upon typing that command I got:

The program ‘update-manager’ is currently not installed. You can install it by typing:
sudo apt-get install update-manager

When I typed sudo apt-get install update-manager I learned why I did not have it installed as the installation said it would use 26.4MB of additional disk space. That’s a little heavy for an application only used to do distribution upgrades. Besides, since I run Kubuntu, I like having a Gnome library free system.

So then I decided to search for how to upgrade using adept but the bug reports troubled me. It said that adept did not deal well with configuration files that had been changed by the user. It seemed inevitable that I would end up upgrading using the console. But I decided to see how far I could get with the GUI tools. If they failed it would definitely be an area that needed work by the Kubuntu team.

So I ran Adept Manager and in the menu chose Adept – Manage Repositories – Updates and checked the box next to “Pre-released updates”. Upon hitting the “Close” button I was prompted to “Reload” the repository information and I did so. I then exited Adept Manager and went to the K Menu and selected “Run Command…” and typed kdesu "adept_manager –version-upgrade". I then clicked on the “Version Upgrade” button in the upper right. I clicked the “Next” button twice and then the “Finish” button. I was then treated to a window which showed the steps with a progress bar and a time estimate on each step which was nice. Though it was not entirely accurate it was better than having no estimates at all.

I then received a notice that my third party sources had been disabled. This was good since such sources could prove problematic in upgrading. Unfortunately the nice “Distribution Upgrade” window stopped during “Modifying the software channels” while “Fetching file 46 of 50. My guess is that this was a failed equivalent of sudo apt-get update. The application was still responsive so I clicked the “X” button in the upper right and read through a strong warning to let the upgrade continue. I clicked yes and found myself launching konsole to investigate the problem. I tried running sudo apt-get update only to see that the list directory was locked, meaning another application was still doing something related to apt. Now running well beyond the territory for a novice I ran ps aux | grep apt and found nothing of interest followed by ps aux | grep adept. The latter turned up that though I had canceled the window adept_manager was still running. With no other recource I ran sudo kill 12345 where 12345 was the PID of the process.

At that point I abandoned hope that I was going to get through the upgrade in any way other than through a shell. And this is disappointing because while I love having the shell as an option I feel that anytime I need to use a shell to do something in Ubuntu is a place that needs work for the average user. Having killed the adept_manager process I was able to run sudo apt-get update and got this:

W: Duplicate sources.list entry http://mirrors.kernel.org gutsy/restricted Packages (/var/lib/apt/lists/mirrors.kernel.orgubuntudistsgutsyrestrictedbinary-amd64Packages)
W: Duplicate sources.list entry http://mirrors.kernel.org gutsy-updates/restricted Packages (/var/lib/apt/lists/mirrors.kernel.orgubuntudistsgutsy-updatesrestrictedbinary-amd64Packages)
W: You may want to run apt-get update to correct these problems

I ran sudo apt-get update and it completed successfully. I then ran sudo apt-get dist-upgrade -d. The “-d” option means download only which gives a chance to review before starting the upgrade and I would highly recommend that process. I was given this summary:

1065 upgraded, 159 newly installed, 13 to remove and 1 not upgraded.
Need to get 1105MB of archives.
After unpacking 745MB of additional disk space will be used.

It’s important to pay close attention to packages being removed and not upgraded. In my case they were the following:

The following packages will be REMOVED:
digikamimageplugins ia32-libs-gtk ia32-libs-sdl libexiv2-0.12 libgcj7-awt libkexiv2-0 libmtp5 libnss3 libuniconf4.2 libwnck18 libxine1-kde linux32 qobex

The following packages have been kept back:
kdelibs5

I didn’t see anything that looked like it would cause problems. I was a little dismayed at the 745MB of additional disk space but I figured a post upgrade cleanup would probably help bring that down. For the record I recorded my disk space prior to the upgrade by running df -m which shows the number of megabytes total, used, and available respectively:

/dev/sda1 294655 89138 190550 32% /

I then began the download of packages and after getting a time estimate of about 1 hour I proceeded to do other things in the interim. When I returned I saw a set of “Failed to fetch” messages follower by this error:

E: Some files failed to download

It seems like some sort of connectivity issue while downloading but after running sudo apt-get dist-upgrade -d the remaining 5 packages were downloaded in 15 seconds. To be on the safe side I again ran sudo apt-get update to make sure no packages had been uploaded in the elapsed time. It returned the same errors as previously about “Duplicate sources.list entry” and running sudo apt-get update a second time again fixed the problem.

I then closed as many running programs as I could, just to be on the safe side. Then the magic moment arrived for:

sudo apt-get dist-upgrade

The first question I got was “Services to restart for PAM library upgrade” to which I simply hit “Ok”. I was then told I would need to restart my display manager (kdm) manually. I was then asked about /etc/bash.bashrc having been modified. I usually change this file to enable bash completion. I chose to install the package maintainer’s version. And I suspect I’ll move the bash completion script into my home directory’s .bashrc instead as I’m probably the only user on the computer who will benefit from it. I was then asked about /etc/sysctl.conf which had also been modified. I again chose the package maintainer’s version thought this file will be edited again.

The next file was /etc/kde3/kdm/backgroundrc. This file I do not remember changing by hand though it could have been changed due to some configuration program. I once again selected the package maintainer’s version. This was quickly followed by /etc/kde3/kdm/kdmr which I had similar thoughts: no recollection of changing the file and choosing the package maintainer’s version. I was then asked about /etc/kismet/kismet.conf. Given that I had never gotten kismet to work particularly well I decided to go with the package maintainer’s version and try to configure it again at a later date. The next file was /etc/polipo/config. This is another one that I chose the package maintainer’s version knowing that I would configure it again later.

I was then asked to check my shorewall configuration and decide if I wanted to restart shorewall. However, as this is a desktop machine with a very simple configuration I decided to just restart without checking. If it broke there would not be any problems. And it restarted just fine. Following this the upgrade to network-manager caused the Network Manager service to restart but my network connectivity was only momentarily interrupted.

I was then back at a shell prompt without any fanfare. Before restarting I decided to see if there were any changes during the installation process. I ran sudo apt-get update followed by sudo apt-get dist-upgrade. I was then shown that kdelibs5 would be upgraded and I decided to do so. I then ran df -m again to get a sense of how much disk space had been used:

/dev/sda1 294655 91289 188399 33% /

All told I lost 2151MB of disk space during the upgrade. So this is not to be attempted by anyone short on disk space. At this point I decided to restart my system and work on configuring and cleaning it which I’ll document in my next article. My conclusion is that if you use a shell at all you should upgrade from the shell. For those that never use a shell hopefully the graphical upgrade programs will work better for you than they did for me.

Creative Commons License Except where otherwise noted, content on this site is licensed under a Creative Commons by-nc-sa 3.0 License