Please report any bugs to Chris Lumens ============================================================================= These are some instructions for moving your libc5 based system to glibc. Note that this will leave your system a little broken and a little messy. Basically, anything you have compiled custom for your system will probably need to be recompiled. But, this procedure should allow you to move to glibc as your primary libraries while letting old stuff still run. This should be possible to do without a reboot, and even from a remote location. I'd like to put a little disclaimer here: this is not in any way the official word of Slack and if stuff gets really messed up, please don't blame any of us. This is a screwy procedure, and things could get pretty messy. You have been warned :) Here's another warning: you must not logout until these directions say it is safe to do so! With glibc, we switched password formats. If you logout, you will not be able to log back in and will have to use a boot disk to go in and fix things. Again, you have been warned. Here's what you need to do... - First step, back up everything of importance...just in case. Remember that you're moving your libraries, which is what everything is linked against. This is especially important for your config files in /etc. Take care to backup your /etc directory because the package tools will overwrite your old ones. That would be bad. - Now, copy your libc5 libraries out of the way: mkdir -p /usr/i386-slackware-linux-gnulibc1/lib cp -a /lib /usr/i386-slackware-linux-gnulibc1/lib - That last copy command gets a bunch of stuff you don't want: cd /usr/i386-slackware-linux-gnulibc1/lib rm -r modules/ rm ld* - Copy your header files out of the way: cp -a /usr/include /usr/include.libc5. - Go into /lib and (very carefully) do the following: remove everything except the modules directory and ld*. I repeat, make sure to leave everything beginning with "ld" in place! - Edit /etc/ld.so.conf and add the following to the end of the file: /usr/i386-slackware-linux-gnulibc5/lib - Run ldconfig. At this point, all your programs should be looking for the libraries in /usr/i386-slackware-linux-gnulibc1/lib. So try to do something...even if bash still goes, you are fine. To check that bash still goes, run "ldd /bin/bash" and you should see something like the following: chris@monolith:/bin$ ldd bash libtermcap.so.2 => /usr/i386-slackware-linux-gnulibc1/lib/libtermcap.so.2 libdl.so.2 => /usr/i386-slackware-linux-gnulibc1/lib/libdl.so.1 libc.so.5 => /usr/i386-slackware-linux-gnulibc1/lib/libc.so.5 lib/ld-linux.so.2 => /lib/ld-linux.so.2 - Remove the Slack 4.0 glibc{1,2} packages from if you've installed them. These are just going to get in the way later. Might be a good idea to run ldconfig and make sure everything still goes. - Okay, scary time. Since all your libc5 libraries are now located in /usr/i386-slackware-linux-gnulibc5/lib, you can go ahead and remove the libc5 package from Slack 4.0 Everything should still be working, since your binaries are now looking elsewhere for the libc5 libraries. - Now, install the glibc package from Slack 7.0 and run ldconfig (just to be sure). Also, install the Slack 7.0 binutils and egcs packages from the D series. You should now be set up to build programs against glibc2. - Next, you need to switch out ld.so (the dynamic linker) and the /lib/ld* libraries that it uses. I would recommend using upgradepkg to do this. If you attempt to run anything after doing this, you will probably get an error saying that a library cannot be loaded. Running ldconfig should fix this. - At this point, you have essentially finished with the library move. Any new programs you build should be linked against glibc2, and your old programs should be running just fine. BUT, your system is still very much in a state of brokenness. If you are doing this procedure from the console, now would be a good time to drop it into single user mode by issuing "telinit 1". If you are remote, I would recommend killing off all non-essential processes. Killing inetd would be a bad idea, since that will drop your telnet connection. - Let's fix up the issues with the passwords. Go into /etc and edit login.defs. Look for this line: MD5_CRYPT_ENAB yes Set that to "no". Now, you can use your old passwords on this new system. At this point, it should be safe to logout if you want to. - Okay, now all you have to do is upgrade all the remaining packages and you'll be done :). Start with D and A, then do N next. I would use upgradepkg on the important stuff. Then do everything else at your leisure. Note that your lastlog is now corrupt, as we are using a different format for that with glibc2. So, you should go and clean out the following files: /var/log/{wtmp,utmp} /var/run/utmp You will need to upgrade any program that uses the lastlog so that it will understand the new format, otherwise you'll just keep getting a corrupt lastlog. These programs include: login, telnet, ssh, xterm (and derivatives), ssh, and others. Also remember that you will not be able to upgrade a program if it is currently running. So you will need to kill them off first. Therefore, I recommend using ssh so that you can upgrade inetd. Just do things one at a time and all should be well. - A few programs are a little screwy to upgrade. If the need for directions for those arises, I will be happy to post a little howto. For now, try it yourself and see what you can do. The worst part is now done... - Chris