Mandriva Linux Upgrades from Repositories Using urpmi
Mandriva Linux is a Red Hat Package Manager (RPM) distribution. One uses RPM to install, remove and manage software packages on such a distribution. In the past RPM got a reputation for causing “dependency hell” and many folks still think this about RPM based distributions today. However, Mandriva has tools called ‘urpm*‘ created by very smart developers that along with the information stored in ‘hdlist.cz‘ files keeps all the dependencies straight. So, arguments against RPM are now moot if one uses Mandriva and the ‘urpm*‘ tools for package management. Here is a list of these from a Mandriva 2007.1 Linux system:
- /usr/bin/urpmf
- /usr/bin/urpmi.update
- /usr/bin/urpmi_rpm-find-leaves
- /usr/bin/urpmq
- /usr/sbin/urpme
- /usr/sbin/urpmi
- /usr/sbin/urpmi.addmedia
- /usr/sbin/urpmi.removemedia
- /usr/sbin/urpmi.update
My rather old Compaq Armada M700 business laptop was still running Mandriva 2007.1 and I wanted to upgrade it to 2008.1 to keep getting desktop and security updates. I had heard that one could just change the distribution media repositories and use ‘urpmi –auto-update‘ to get this done. After asking a few questions in #mandriva on irc.freenode.net I decided I would try this and document my experience here.
This takes some time to complete so make certain there is time available before starting this process. Obviously one wants to have a “high speed” internet connection or an on-site repository mirror for this. If using an on-site repository mirror then the easyurpmi.zarb.org step is not needed.
The first order of business was to change my package repositories on the internet from 2007.1 to 2008.0 and remove the old 2007.1 repositories. I went to easyurpmi.zarb.org to get the list of new 2008.0 repositores. I ran ‘urpmi.removemedia -a‘ to get rid of the 2007.1 repositories and then copied and pasted the list created at easyurpmi.zarb.org from my selections there. This created the new repository data and got the dependency files from the repositories I had chosen. Once this was done I logged out of X, switched to a console command line shell, logged in as root and shutdown X using ‘init 3‘. This may not be necessary but I wanted to make sure things went smoothly. Then I issued the command ‘urpmi –auto-update‘ and sat by the system for a while as it got the 1000+ packages needed to upgrade from 2007.1 to 2008.0. Since I started this at night I went to bed and left it running at about 700 packages completed or so. It was at the command prompt waiting for me when I got back in my home office the next morning.
I rebooted the laptop to make sure it still worked with these updates installed using this method. It did. I then went back to easyurpmi.zarb.org and got a new list of repository URLs for the Mandriva 2008.1 packages. I repeated the steps above to remove the previous mirrors and add these new ones. Once again running in runlevel 3 (init 3 as root at the console CLI.) and starting the upgrade with ‘urpmi –auto-update‘. This time there were over 1100 packages to download and install. I accepted the list of packages and left the laptop downloading and processing them as I went about my business day. I checked periodically to make sure the upgrade was running smoothly. After installing packages for several hours, the root prompt returned and I checked to see if the latest kernel was installed. It was.
I rebooted the laptop once more and watched while it went through the startup routine. I noticed a message “ACPI: Transitioning device [C1B2] to D0″ followed by “ACPI: Unable to turn cooling device [cb0c9a50] ‘on’”. A little web searching shows these are common messages with some Linux 2.6.* kernels and there are several suggestions on how to “fix” it. The first reboot loading the upgraded system took quite a bit longer than previous bootups. So long in fact that I walked away from the laptop and did some other work while it booted (The next bootup did not take any longer than previous bootups.). Once the bootup completed I logged into my fluxbox window manager and looked at the menus. Once again Mandriva has changed the menu structure. Come on Mandriva, leave it alone across releases for once. While this is a minor, personal irritation of mine it is not a show stopper for me. In any case everything I tried was working and was upgraded to the latest version available with Mandriva 2008.1 Linux.
Frankly, I think this is an excellent way to upgrade a system rather than doing a fresh install every time. Plus, if it fails one can always go ahead and do that fresh install by wiping out all the partitions except /home and installing from CD or DVD media or by doing a network install. Here is pseudo-code for the logic of doing these ‘urpmi‘ upgrades:
Release Upgrade Steps Using urpmi on MandrivaDo NOT skip over a release, do them in sequence.Example: 2007.0 > 2007.1 > 2008.0 ...----------------------------------------------------------------Remove old repositories with 'urpmi.removemedia -a'Add new repositories (use easyurpmi.zarb.org to get these)Upgrade with 'urpmi --auto-update'While another version is neededRebootRemove and add new repositoriesUpgrade with 'urpmi --auto-update'If new kernel is not installedUpgrade kernel with 'urpmi kernel-latest'If new kernel source is not installed and is neededUpgrade kernel source with 'urpmi kernel-source-latest'Final reboot
Here are things that were a bit wonky following the upgrade.
When I first started OpenOffice.org Writer it gave me an error message:
Error loading BASIC of document file:///usr/lib/openoffice/share/basic/WebWizard/script.xlib/:
General Error.
General input/output error.
This error is caused by having older OpenOffice.org configuration directories in one’s home directory (~/.ooo-2.0 and/or ~/.openoffice). Deleting these directories loses previous settings but eliminates that error.
I have a 10GB hard drive on this laptop with a 5G /, 49M /boot, 3.6G /home and 269M /tmp. Under 2007.1 the root partition was roughly 50% full. After running this urpmi upgrade process it was 76% full. It seems there is some cruft left over from the previous versions that would be cleaned up with a fresh install. Removing old kernels and kernel sources with ‘urpme‘ frees up a bit of space (now / is only 62% full.). It is possible there is a lot of junk in /var that I could clean up but after removing old kernels and kernel sources I have about 1.8G free on the root partition so /var is not a critical problem yet.
The default login manager theme for X shows a Microsoft-ish list of users. For a laptop I prefer no user list to show. So, I went into the configuration menu for the login manager and changed to a theme that does not show a user list. I personally believe it is better to not show a user list by default and let the end-user choose to change that.
That is all I noticed for now. If there are other bits of wonkiness due to this upgrade process I will add them as updates to this article.
This article has been accessed this many times:
| html hit counter code |
[...] Mandriva Linux Upgrades from Repositories Using urpmi [...]