upgrading glibc?

Peter B. Steiger wyo_wl001 at bresnan.net
Wed Aug 24 14:22:26 PDT 2005


On Wed, 2005-08-24 at 14:45 -0400, Douglas J Hunley wrote:
> Currently running glibc-2.3.2 on my LFS 5.0 (CVS snapshot 20030522) system 
> (many packages upgraded since then) and would like to upgrade to glibc-2.3.4 
> as per the 6.1 book. However, I'm completely unclear on how to 'upgrade' 
> glibc without all hell breaking loose.

I know you have already seen plenty of anecdotal evidence suggesting
that all hell really will break loose, but let me add my own experience.

My first Linux install was Red Hat 6.something many years ago, and I
knew nothing about Unix, C, modules, shared memory, etc. - in other
words, your basic mindless, obedient Microsoft drone.

At some point I wanted to install a new package I had downloaded, and it
needed a newer version of glibc than I had.  By then I considered myself
quite the expert at grabbing new packages from Freshmeat and using RPM
to install or upgrade them, so I figured this would be the same thing.

Wouldn't you know it, RPM refused to upgrade glibc even though I used
the "force" flag.  Fine, I said, I'll just uninstall glibc and then
install the new one.  Again, RPM refused to cooperate until I used both
"force" and "ignore dependencies", and glibc was gone.

So were all shell utilities - RPM no longer worked, nor did ls, cd, or
anything else.  I basically had a flashing cursor at a shell prompt that
would only give error messages no matter what I typed.  I couldn't even
reboot or power off cleanly because the files used by the shutdown
sequence all relied on glibc.  And when I powered off and back on
again... no working kernel.

That's when I discovered lfs... now that I know what goes into the
system, why it's there, and what it does, I don't break anything
irreplacable any more.

I can't say with absolute certainty that stuff compiled against the
older glibc will stop working, but I can tell you that unless you have a
way of seamlessly removing the old glibc files and replacing them with
the new ones, you're going to be at least for a moment without a working
glibc, and that's when you'll lose all functionality.  At best you'll
need to boot from an alternative partition or emergency floppy (I have
spent many hours rebooting with Tom's Root Boot) and build the initial
lfs toolchain just as you did with the original lfs, even if you just
recopy the new glibc/gcc/etc. over top of the existing installations
when you're done.  But I'd make extra sure you have a reliable boot
floppy or CD, and/or back up everything irreplacable before you try it.

-- 
Peter B. Steiger
Cheyenne, WY





More information about the blfs-support mailing list