==============================================================================
KEYWORDS (to help googlers) :)
glibc, recover, recovery, glibc recovery, libc, slackware, upgrade,
Inconsistency detected by ld.so, Assertion bad dynamic tag failed
==============================================================================

For whatever reason, it seems that lots of people manage to avoid reading all
(or *any*) of the documentation available on how to properly upgrade Slackware
from one version to another (and especially from any version to -current), so
they arrive on some help forum or IRC channel with completely unusable systems.
The purpose of this document is to provide some more or less decent guidelines
on how to fix the system.

First, you will need the Slackware install cd for whatever version of Slackware
that you have installed.  Insert that cd into the drive and reboot the system 
(this will probably have to be forced with a manual power off).  
When the install cd boots, you will notice some instructions for booting into 
your system - ignore those.  Instead, let the installer boot (as if you were 
going to do a fresh installation).
  Note: you will probably have better results if you boot the huge26.s kernel
        on a Slackware 11.0 cd, or huge.s or hugesmp.s on later Slackware
	releases.
Once the installer has booted, login as root (no password is needed) and
mount your system's root partition to /mnt
For example, if your system's root partition is /dev/hda1, then do this:
  mount /dev/hda1 /mnt
If your system has other partitions for /usr, /var, /tmp, and such, then you
also need to mount them.  For example, if /dev/hda2 is the /usr partition, 
then do this (after mounting the root partition to /mnt):
  mount /dev/hda2 /mnt/usr
Follow that same pattern for other partitions, but note that you probably don't
want to mount a separate /home partition - that way, if something goes wrong,
it won't be harmed.

Now mount the Slackware CD to /cdrom - for example, if your system's cdrom 
device is /dev/hdc, do this:
  mount /dev/hdc /cdrom

Slackware's package management utilities normally operate on the working
root directory - / - but they will honor an alternate root environment,
which is extremely handy for this sort of situation.  Do this:
  rm -rf /mnt/lib/incoming /mnt/lib/tls
  ROOT=/mnt
  export ROOT
  upgradepkg --reinstall --install-new /cdrom/slackware/a/glibc-solibs-*.tgz
  upgradepkg --reinstall --install-new /cdrom/slackware/a/glibc-zoneinfo-*.tgz
  upgradepkg --reinstall --install-new /cdrom/slackware/l/glibc-*.tgz

According to upgradepkg(8) (that means the manual page for upgradepkg in 
section 8 of the manual), if multiple versions of a matching package are found,
the upgradepkg process will remove all of them, leaving only the new package.
This is what you want :)

Note: there are some other packages that might need to be upgraded (downgraded,
      actually) while you're here; I'm not even going to attempt to list them,
      but for example, if you had already upgraded bash with the package from
      the newer Slackware version, you probably need to do the same thing as 
      above with the a/bash-*.tgz package on the cdrom.

You should now be able to verify that your system is in working order by doing
the following:
  chroot /mnt /bin/bash -l
If that works, you are now inside your installed Slackware system, and all is
probably well.  Exit the chroot environment (type "exit") and then reboot.

Good luck!  :)   --rworkman


ChangeLog: 
  20090105 - added some keywords for google to index
  20080323 - noted additional suggested kernels for 12.0 and later
  20071016 - added /lib/{incoming,tls} removal before reinstall due to 
             potential problems encountered by a few users
  20070607 - added note about multiple system partitions

