Upgrading Slackware

From SlackWiki
Jump to: navigation, search

Introduction

Subject: Upgrading Slackware
Author: Chris Clymer aka:omal / Pat Volkerding
Why: I've found this all very useful
When: Fri Aug 26 07:11:53 EDT 2005
Running: Slackware-current kernel 2.6.11


Rather than waiting to upgrade every 6 months or so when theres a release, I like my Slackware systems to be current. The way I do this is by mirroring most of the Slackware ftps on my own fileserver with a handy little tool called "rsync". Rsync downloads only the parts of files that have changed, so by having it run nightly, I always have an up-to-date mirror, with little bandwidth being used up. You'll want to add a script something like the following to crontab, probably by executing "crontab -e":

#!/bin/sh
/usr/bin/rsync -avz rsync://inferno.bioinformatics.vt.edu/slackware/slackware-current/ 
/mnt/mirror/slackware/

This inferno.bioinformatics server is one i've found to be fairly reliable...they even have -current isos if what one really wants is a fresh install off a CD! The script just syncs that directory on their server with /mnt/mirror/slackware on the target server...obviously this will probably be different on your server.

Now if you are a SMART person, you will copy all of the files you need over to a local machine before upgrading. It's what Pat recommends in the guide I've got below...however it's also something I don't personally do ;) If you like to live on the edge, just mount your shares over SAMBA or NFS, and then proceed, adjusting the guide below accordingly.

Again, this isn't mine but I've always found it useful. In this case it's the official UPGRADE.txt that Pat always includes with slack. Any Slackware release is accompanied by this file on the FTPs. This is my bible for upgrading, and while i deviate in some small ways, it is a very good guide. Straight from the source himself!



Process

Slackware 10.0 to 10.1 Upgrade HOWTO <volkerdi@slackware.com>

This document explains how to upgrade from Slackware 10.0 to Slackware 10.1



Before you begin, I would strongly recommend making a backup of your system, or, if not the entire system, at least the /etc directory. You might find that you need to refer to a few things about the upgrade process is complete. Back it up, or take your chances.

OK, now that everything is safely backed up, let's proceed. :-)

To do this, you'll need the Slackware 10.1 packages. If these are on a CD, create a new directory to mount the CD on so that it doesn't get in the way during the upgrade:

mkdir /packages
mount /dev/cdrom /packages

The packages don't have to be on a CD-ROM, as an alternative you could copy the slackware directory (the one with the various package subdirectories in it, basically the "slackware" directory from the install CD) to someplace like /root/slackware/. The important thing is that you know where the slackware packages directory is. We'll use /root/slackware in the following examples.


0. Put your machine in single-user mode:

   telinit 1


1. Upgrade your glibc shared libraries. This is important, or things might go haywire during the first part of the upgrade:

   upgradepkg /root/slackware/a/glibc-solibs-*.tgz


2. Upgrade your package utilities:

   upgradepkg /root/slackware/a/pkgtools-*.tgz


3. Install sed. You should already have this, but since it's used by the package utilities it is best to be sure:

   upgradepkg --install-new /root/slackware/a/sed-*.tgz


4. Upgrade everything else (and install new packages):

   upgradepkg --install-new /root/slackware/*/*.tgz


5. Make sure your system will boot. If you use LILO, make sure the paths in /etc/lilo.conf point to a valid kernel and then type 'lilo' to reinstall LILO. If you use a bootdisk, you'll need to use makebootdisk to make a new bootdisk using the kernel in /boot.


6. Fix your config files. Some of the config files in /etc are going to need your attention. You'll find the new incoming config files on your system with the ".new" extension. You may need to fill these in with information from your old config files and then move them over.

Feel brave? You can use this little script to install all of the .new config files in /etc. If you've made any local changes you'll need to add them to the newly installed files. Your old config files will be copied to *.bak. Anyway, it might be an easier starting point. Here it is:

    #!/bin/sh
    cd /etc
    find . -name "*.new" | while read configfile ; do
      if [ ! "$configfile" = "./rc.d/rc.inet1.conf.new" \
        -a ! "$configfile" = "./group.new" \
        -a ! "$configfile" = "./passwd.new" \
        -a ! "$configfile" = "./shadow.new" ]; then
        cp -a $(echo $configfile | rev | cut -f 2- -d . | rev) \
          $(echo $configfile | rev | cut -f 2- -d . | rev).bak 2> /dev/null
        mv $configfile $(echo $configfile | rev | cut -f 2- -d . | rev)
      fi
    done

You'll probably also need to edit your /etc/X11/xorg.conf to change the name of the keyboard driver from "Keyboard" to "kbd". I don't know why this changed, but it did.


7. Return to multi-user mode:

   telinit 3


8. Remove obsolete packages.

If you go into /var/log/packages and take a look at the package list:

   ls -lt | less

You may spot some old, obsolete, or discontinued packages. If so, you can remove these using 'removepkg'.


9. Remove KDE language bloat. By upgrading all packages using --install-new you've probably installed all of the KDE language translations from the KDEI series, which will use up about 500MB. If you need only US English, you may remove the KDE language packs like this:

   cd /var/log/packages
   removepkg kde-i18n* koffice-i18n*

Even if you need one of these, it might be best to start by removing them all, and then go back and install the ones you need with installpkg.


At this point you should be running Slackware 10.1.  :-)

I wish everyone good luck with this!

--- Patrick Volkerding volkerdi@slackware.com


Conclusion

You could of course omit the KDE International packages from your download scripts, or not copy them over for your install. For most people this is logical. It's possibly you don't even want all of KDE...I personally install it despite the fact that I don't run it, and reccomend you do the same. Why? Because somewhere down the road you may grab a package that depends on one of those KDE libraries, or even find you want a KDE app or two. Even with KDE slackware is only about 3GB, so unless you are really hardup for drive space, it makes good sense.

Also, I should mention that one way I track slackware-current is through a nice little superkaramba script I wrote(which of course, depends on those KDE libraries!). There are other ways that may suit you better, like mailing lists and RSS feeds. I find that for me, this is simplest.

If you want my script, you can grab it here: http://kdelook.org/content/show.php?content=23384

The requirements are basically just superkaramba, and whatever KDE libraries it requires. If you have the latest KDE, superkaramba is already included.

Related Links