CLASS="SECT1" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" >

14. Appendix: Updating from YellowDog 2.3 (Dayton) to 3.0 (Sirius)

Here's how to update Yellow Dog Linux from 2.3 (Dayton) to 3.0 (Sirius). This assumes being done just after finishing the base install (ie: very few packages installed)

If we are running X (the following is based on the "base" install, so we probably aren't), switch to text mode (/sbin/init 3). We assume we have some network access, the fatter the better. We are going to download some packages manually, so check that you're able to do that. Some console-based download tool like ncftp (ftp) or lynx (http) might come handy.

Note for the following: If you get errors from rpm that are not noted here, you can always do an
rm -f /var/lib/rpm/__* ; rpm --rebuilddb
This repairs the rpm database in most cases.

First, ensure that we are running latest versions of all software. This may not be necessary, but whatever.
apt-get update; apt-get dist-upgrade 
Now we change /etc/apt/sources.list to include repositories for 3.0 Note that there are only three repositories for 3.0: base, main, update. Fire up your favourite editor (at least vi should be installed) and update the file. A working sources.list may look like like this:
rpm ftp://ftp.uninett.no/linux/yellowdog/apt 3.0 base main update
rpm-src ftp://ftp.uninett.no/linux/yellowdog/apt 3.0 base main update
Now let's update the package list and check how far-fetched a complete dist-upgrade is:
apt-get update
apt-get -s dist-upgrade  
Woha! Lots of errors there. Let's resolve the worst of them. Start with removing lots of packages. Note that after this, we can't read man pages.
rpm -e kudzu kernel-pcmcia-cs rpm-python yup yi pspell aspell groff man
What's status now?
apt-get -s dist-upgrade again
Still errors, and quite unresolvable. We have to take some more low-level action. The really pain is to get a new version of rpm installed, so let's start with that. Manually download the following packages:
  glibc-2.3.1-51a.ppc.rpm 
  glibc-common-2.3.1-51a.ppc.rpm 
  libelf-0.8.2-2.ppc.rpm 
  popt-1.7-9d.ppc.rpm
  rpm-4.1-9d.ppc.rpm 
  librpm404-4.0.4-8x.27.ppc.rpm
  apt-0.5.5cnc4.1-1b.ppc.rpm
  libgcc-3.2.2-2a.ppc.rpm
  libstdc++-3.2.2-2a.ppc.rpm
  expat-1.95.4-1.ppc.rpm
  fontconfig-2.1-3.ppc.rpm
  freetype-2.1.3-4.ppc.rpm
  XFree86-libs-4.3.0-2.1c.ppc.rpm 
  XFree86-libs-data-4.3.0-2.1c.ppc.rpm
  XFree86-Mesa-libGL-4.3.0-2.1c.ppc.rpm
We don't have use for apt for a while, so let's just remove it:
rpm -e apt
So far, so good. Now, let's upgrade glibc and rpm. This is the most critical part. If we succeed in this, the rest is simple. If we get this wrong, a reinstall may be the only solution. rpm has some dependencies, so we have to include them now.
rpm -Uvh glibc-common-2.3.1-51a.ppc.rpm \ 
         glibc-2.3.1-51a.ppc.rpm        \
         libelf-0.8.2-2.ppc.rpm         \
         popt-1.7-9d.ppc.rpm            \
         rpm-4.1-9d.ppc.rpm             \
         librpm404-4.0.4-8x.27.ppc.rpm 
If your setup is like mine, we're stuck with the following unresolvable error:
rpmlib(PartialHardlinkSets) <= 4.0.4-1 is needed by glibc-common-2.3.1-51a
This seems to be a problem overseen by the packagers of YellowDog (and to be honest, I think they inherited this error from RedHat), so we just ignore it, use some force, and hope this won't bite us later.
rpm -Uvh --nodeps --force glibc-2.3.1-51a.ppc.rpm                \
                          glibc-common-2.3.1-51a.ppc.rpm         \
                          libelf-0.8.2-2.ppc.rpm                 \
                          popt-1.7-9d.ppc.rpm                    \
                          rpm-4.1-9d.ppc.rpm                     \
                          librpm404-4.0.4-8x.27.ppc.rpm 
Uh-oh. Ugly errors from rpm. Let's check if the rpm database still works.
rpm -qa
Well, looks like we've really done it. Now what? Sorry to say, but I've tricked you into ruining your computer installation. Get out and get a life instead of looking on these old dust-collectors. Just kidding. Luckily, rpm is able to rebuild it's databases, so we just remove the old one and build a new.
rm -f /var/lib/rpm/__*
rpm --rebuilddb
Now the database should work again, right?
rpm -qa
If this works, we collect 250 bonus points and two silver stars, and can continue our quest for 3.0. Find the dagger and throw it at the dragon.

If we don't have any special parameters for nsswitch and gconv-modules, we'll use the new ones (if existing):
mv -f /etc/nsswitch.conf.rpmnew /etc/nsswitch.conf
mv -f /usr/lib/gconv/gconv-modules.rpmnew /usr/lib/gconv/gconv-modules
Now let's reinstall apt. Is also have a lot of dependencies that have to be fixed:
rpm -Uvh apt-0.5.5cnc4.1-1b.ppc.rpm            \
         expat-1.95.4-1.ppc.rpm                \
         freetype-2.1.3-4.ppc.rpm              \
         fontconfig-2.1-3.ppc.rpm              \
         libgcc-3.2.2-2a.ppc.rpm               \
         libstdc++-3.2.2-2a.ppc.rpm            \
         XFree86-libs-4.3.0-2.1c.ppc.rpm       \
         XFree86-libs-data-4.3.0-2.1c.ppc.rpm  \
         XFree86-Mesa-libGL-4.3.0-2.1c.ppc.rpm \
I've sometimes got rpm to hang at this place. It's a known bug in rpm and can hit you anytime. If you experience this, get another terminal (Alt+F2 if you're on the main console) , kill rpm, and remove and rebuild the database. Then do the wanted rpm command again.
killall -9 rpm
rm -f /var/lib/rpm/__*
rpm --rebuilddb
Now; the installation of apt may have changed our sources.list, so check it out, and copy back the original if you want to.
mv /etc/apt/sources.list /etc/apt/sources.list.3.0.orig
mv -f /etc/apt/sources.list.rpmsave /etc/apt/sources.list
We should now probably resync the local apt database and check the status
apt-get update && apt-get -s dist-upgrade
Still some unresolved dependencies, but we're getting there. With apt installed, the rest is like chewing boiled fish. Nothing to care about. Ouch! a bone.
apt-get install pam
Drags in the following packages: chkconfig cyrus-sasl cyrus-sasl-gssapi cyrus-sasl-md5 cyrus-sasl-plain db4 hesiod openldap openssh openssh-clients openssh-server openssl perl perl-Filter python sendmail

Unless you have done some special pam configuration, use the new values for system authetication. Then go on updating.
mv -f /etc/pam.d/system-auth.rpmnew /etc/pam.d/system-auth

apt-get install passwd
Drags in the following packages: glib2 libuser
apt-get install kbd
Drags in the following packages: initscripts util-linux
apt-get install compat-db compat-pwdb
Drags in the following packages: compat-libstdc++
apt-get -s dist-upgrade
If no errors, we're with all the difficult parts. Good! Now the final hurdle: A full dist-upgrade. Do an
apt-get -y dist-upgrade
and enjoy getting to the end of this quest. You get all the points. Just kiss the frog and you'll get the princess too. You may want to reboot, just to check that everything comes up like you wish.

You may want to reinstall some packages again. For example "man" may become handy.
apt-get install kudzu rpm-python pspell aspell groff man 
That's all there is to it. It wasn't that difficult, was it?