Slicehost CentOS 5.2 to 5.3 Upgrade (or “fun with package management one”)

One of the things about having your own little server, not really used for anything absolutely critical to anyone is that you can install updates as soon as you like. Non critical updates are one of those things that you have to do sooner or later and for non critical systems it can often be appropriate to install them as and when they arrive, rather than spending a larger amount of time performing monolithic updates once a year or more. They also tend to challenge the techie in you from time to time… like this little lot on my x86_64 CentOS Slice.

Downloading Packages:
Running rpm_check_debug
ERROR with rpm_check_debug vs depsolve:
Package mkinitrd needs nash = 5.1.19.6-28, this is not available.

Oh dear. Messages like this are occasionally just a mistake somewhere in the chain, leave the updates a few days if you were only doing it because you were bored anyway and the error might just have solved itself by the time you come back…

…Not in this case however. So on we go.

The error message produced by Yum in this case is a bit useless as it omits information about the architecture of the package, let’s see exactly what’s installed with “rpm -q“.

# rpm -q mkinitrd
mkinitrd-5.1.19.6-28
mkinitrd-5.1.19.6-28

Two packages.  I vaguely remember a discussion from the Slicehost forums on possibly unnecessary packages installed by default. So, let’s see if these packages are from different architectures.

# rpm -q –qf ‘%{name}-%{version}-%{release}.%{arch}\n’ mkinitrd
mkinitrd-5.1.19.6-28.x86_64
mkinitrd-5.1.19.6-28.i386

So they are. If we’re feeling brave and we’re reasonably sure we don’t actually need the i386 package,we can remove it.

rpm -e mkinitrd.i386

Which get’s us past that error. But then another pops up with a variety of packages, all of the below variety.

file /usr/share/man/man8/avcstat.8.gz from install of libselinux-utils-1.33.4-5.1.el5 conflicts with file from package libselinux-1.33.4-5.el5

So, exactly what other packages are on here that aren’t x86_64?

yum list *.i386

At this point, if we’re sure we don’t want the i386 packages the above command returns (i.e you’re sure you aren’t making use of multilib and don’t require the packages on your system) we can remove them using Yum, as this will tell us whether any software we’ve installed via the package manager actually depends on them. Anything you’ve compiled yourself however won’t be reported.

yum erase *.i386

This also showed up an i686 package, which we can double check for others of the same type and remove in a similar manner to above.

The CentOS upgrade then proceeded as expected :D

  • Note: Before removing packages, be sure to keep a log of exactly what you’re doing and everything that was output to terminal for each command run if you aren’t sure what you’re doing. This will be invaluable if you have to call for help.
  • If there are packages knocking around on your system and you aren’t sure why, a good place to start is /var/log/yum.log – it may well jog your memory on anything you’ve installed and forgotten about ;)
  • If you’re upgrading a remote system make sure you have a way to access it if it won’t boot, on Slicehost of course you have this with the recovery console available in Slicemanager, otherwise you may want to ask your provider to hook you up a KVM for that nailbiting first reboot after the upgrade.

1 comment to Slicehost CentOS 5.2 to 5.3 Upgrade (or “fun with package management one”)

Leave a Reply

  

  

  

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre user="" computer="" escaped="">