Upgrading KDE 1.1.2 to KDE 2.0.1 on Slackware Linux 7.1

Geschrieben am 02.09.2011 in KDE | Tags: , , , , , , | Kommentar schreiben

Since the release of KDE 2.0.0 a lot of people have asked me to help them upgrade their existing Slackware based boxes from KDE 1.1.2 (which ships with Slackware 7.1) to KDE 2.0.1 that can be found in the slackware-current tree. So instead of answering the same question over and over, I decided to write this article, and describe the entire procedure in detail. I hope you’ll enjoy reading it and that it will be of use to anyone wanting to upgrade to KDE 2.

First of all you should be aware that the packages you need to install come from the slackware-current tree, and since that is the development tree things may not be completely in sync with your installed system. Usually the procedure I describe below works fine, but as the files in -current change quite often you may experience problems if your installed system is a lot older that the stock 7.1.

Since KDE 2 depends on very recent versions of some other libraries, these will need to be upgraded as well and a few new ones will need to be installed. This is not a difficult procedure, but it can lead to big problems if done incorrectly, so please follow the instructions carefully. The libraries in question are; glibc, qt and openssl.

Ok, let’s get on with it.
Read it all through once before making any changes (just to make sure you know what steps are involved), then start at the top again and do everything in the order shown.

And remember, BACKUP ANY IMPORTANT DATA NOW! An upgrade involves overwriting old files with new ones, installing completely new files and deleting some existing files completely. If there should happen to be errors in some of the packages or something fails or something unforeseen happens, then you could loose data. It is always a good idea to have recent backups before performing an operation such as this one. Make those backups NOW – you have been warned :-)

First of all make sure you have all the needed files before we begin.

Start by making a directory called /updates and then make sure you have all of the following files in that directory (these should all be downloaded from the slackware-current tree from the slackware ftp server, I have shown what subdirectory the packages can be found in):

[Note: The following instructions to update KDE will also update Glibc to 2.2, I suggest you read and follow David Cantrell's instructions on upgrading to glibc 2.2 then continue reading here. -keskoy]

glibcso.tgz (slakware/a1/) !
glibc.tgz (slakware/d1/) !
qt2.tgz (slakware/kde1/) !
mesa.tgz (slakware/x1/) !
openssl.tgz (slakware/n1/) !
ksupport.tgz (slakware/kde1/) !
kdelibs.tgz (slakware/kde1/) !
kdebase.tgz (slakware/kde1/) !
kdeutils.tgz (slakware/kde1/) *
kadmin.tgz (slakware/kde1/) *
htdig.tgz (slakware/kde1/) *
kdoc.tgz (slakware/kde1/) *
kde-i18n.tgz (slakware/kde1/) -
kdegames.tgz (slakware/kde1/) -
kdepim.tgz (slakware/kde1/) -
kdetoys.tgz (slakware/kde1/) -
kgraphic.tgz (slakware/kde1/) -
kmedia.tgz (slakware/kde1/) -
knetwork.tgz (slakware/kde1/) -
koffice.tgz (slakware/kde1/) -

You will notice that I have marked the packages with 3 different symbols (!, * and -). Packages marked with ‘!’” are packages that you MUST HAVE, we cannot do this if you do not have those. Packages marked with ‘*’” are those that I consider very nice to have but not absolutely essential. And the ones marked with ‘-’ are the ones I consider to be optional.
If you don’t know very much about what are in the packages and want to make sure you have a complete KDE 2 desktop (and you have enough diskspace) then install everything – at least install the packages marked ‘!’” and ‘*’.

For the purpose of this guide, make sure that the /updates directory contain ONLY the files shown above. This is important for some of the commands that I run at the very end of the guide.

Secondly, we are about to update some central system libraries and your graphical user interface, so you should not be running said user interface while we do this. In other words; exit from KDE completely and use a plain textmode commandline to do ALL of the following. If your system boots directly into X then change that to have it boot to a textmode console (you can change it back when we are done).
To make sure that you boot to a text console and not X, use a text editor (as the root user) to edit the file ‘/etc/inittab’ and find the lines that looks like this:

# Default runlevel. (Do not set to 0 or 6)
id:4:initdefault:

These lines are close to the top of the file. The number in the second line is the important one – if it is set to 4 (as in my example) then your machine boots into X by default, and if it is 3 then you boot to a text mode console and type startx to start the GUI (this is what we want for now). Change the number to be 3 (or leave it like that if it is already 3) save the file, and reboot your machine. It is possible to do the entire upgrade without rebooting, but it will make it a bit more complicated so I will not describe that.

When your machine boots up it should present you with a plain text login prompt. Log in as the root user (the administrator).
We are now ready to start the real upgrade process. This is where the fun starts :-)

Creating a Bootable Slackware 9 Beta ISO Under Windows 2000

I found myself in a bit of a predicament the other day when I wanted to install the Slackware 9 beta on one of my Windows 2000 boxes at a friends house. As there is no iso of the beta, and none of the pc’s there had Linux on it, I needed to somehow create my own iso. I know I could have used a boot disk, but I wanted a bootable iso I could use later as well. After a little research, I soon figured out that making a bootable iso image of Slackware 9 Beta using Windows 2000 is fairly easy. So I thought I would pass this information along in case anyone else found themselves in a similar situation.

To do this you will need the mkisofs for Win32 utility and a cd burning application capable of burning iso’s to cd (Nero worked fine for me). Mkisofs is part of a suite of command line Linux CDR utilities, and it allows you to create iso images that you can then burn to CD. This utility has been ported to the Win32 platform and will allow you to create your own Slackware iso with little change to the instructions listed in the readme.txt file in the isolinux directory under slackware-current. The instructions below should work for any Win32 platform, but I have only tried it under Windows 2000.

Instructions:

  1. Download the latest slackware-current directory1. Mirrors available at http://www.slackware.com/getslack/
  2. Download the mkisofs for Win32 utility. (It’s in the cdrtools zip linked below) Available at ftp://ftp.fokus.gmd.de/pub/unix/cdrecord/alpha/win32/cdrtools-1.11a12-win32-bin.zip
  3. Extract the contents of the cdrtools zip2 to your windows directory (i.e., C:\Winnt) This will put the mkisofs utility and needed cygwin1.dll in the search path so the utility can be run from any directory.
  4. Next we will need to exclude some of the directories from the slackware-current directory so the iso image we create will fit on a cd. There are suggestions in the readme.txt file in the isolinux directory as to what you may want to exclude.
  5. You can exclude directories and files two ways:
    • use the -x parameter with mkisofs3
    • Move the directories/files you want to exclude to another location not under the slackware-current directory or its subdirectories.
      I chose to move all directories but the slackware, kernels, and isolinux directories. Then I further moved all the kernels in the kernels directory except for “bare.i”, as I did not need scsi or any other special support. Finally, I moved the kdei directory as I did not need the internationalization support for kde.
  6. If you don’t already have one, make a temporary directory outside of slackware-current to create your iso image in. I used “C:\temp”.
  7. Using a text editor such as notepad, create a one line “.cmd” file4 to run the mkisofs utility with all its parameters. I called mine “iso.cmd”.If you are using “C:\temp” for your iso image directory and you are moving out the directories you wish to exclude, as I did, you can just cut and paste the code below for your batch file. mkisofs -o /temp/slackware.iso -R -J -V “Slackware Install” -hide-rr-moved -v -d -N -no-emul-boot -boot-load-size 32 -boot-info-table -sort isolinux/iso.sort -b isolinux/isolinux.bin -c isolinux/isolinux.boot -A “Slackware Install CD” . Copy or type all of this code into your editor on one line, without any returns. Otherwise windows will treat separate lines as separate commands and all of the parameters will not be passed to mkisofs. If you are using a directory other than \temp or \temp is on a different drive than slackware-current, you will need to edit the “/temp/slackware.iso” part of the code to match your drive or directory.
    If you are not moving out the directories you wish to exclude, you will need to use the -x parameter5 in your batch file to exclude these directories from the iso image. Important! Please note the trailing “.” at the end of the code listed above. This is the source path for mkisofs to copy files/directories from.
  8. Save your batch file in the slackware-current directory using .cmd as the file extension. If you save and execute your batch file from a directory other than slackware-current, you will need to change the “.” at the end of the mkisofs code listed above to the path to your slackware-current directory.
  9. Drop to a command prompt (click start > click run > type command > press enter) and change to your slackware-current directory. Run your batch file (for example, type iso.cmd then press enter). You should now see the mkisofs progress status as it creates your iso image.
  10. Burn the image file (i.e., slackware.iso) to cd using your favorite cd burning app. I used Nero 5.5.
  11. Enjoy your new Slackware 9 Beta bootable iso!

Notes:

  1. For the sake of a bootable iso only, it is not necessary to download the entire slackware-current directoy. You can get by with the file contents of slackware-current and the directories named slackware, isolinux and kernels.
  2. I don’t think it’s necessary to extract all the files in the zip. You may be able to get by with just the mkisofs.exe and cygwin1.dll
  3. Examples of the -x parameter are listed in the readme.txt in the isolinux directory. I would recommend reading through the readme.txt anyway to get a better understanding of using mkisofs.
  4. A “.cmd” file is the equivalent of a Win2000 batch file. The reason for the batch file is because the number of parameters we need to pass is too long to execute from the command line directly. (There may be a way to increase the size of the command line buffer, but I am not currently aware of it.) Creating a “.cmd” file gets around this problem neatly with the added benefit of allowing you to change your parameters later without alot of unnecessary typing.
  5. The man page for mkisofs can be found at: http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/man/mkisofs-1.13.html
  6. The homepage for mkisofs is available at: http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/cdrecord.html