|
|
A Slackware Desktop Enhancement Guide
Updating Slackware
© Copyright Darrell Anderson.
(Reviewed and updated: November 2, 2006)
This document is not current for Slackware 12.
Introduction
After a Slackware user takes a first crack at updating Slackware, that person probably will realize that the UPDATE.TXT guide provided in each new release is inadequate to prepare and help non-veterans avoid potential pitfalls associated with updating. The UPDATE.TXT guide is written for people who perform and maintain a full installation. A more thorough procedure is provided here and hopefully will help others.
This guide is written primarily for people who are GUI users and specifically KDE. More knowledgeable users and people who use window managers or desktop environments other than KDE should modify this procedure accordingly. This guide addresses maintenance updating of an existing installation of Slackware, as opposed to updating by performing a new or clean installation. The additional details are for people who do not maintain a full installation of Slackware and although not comprehensive, should provide many people fodder to consider their own updating needs and habits.
This guide probably is detailed, verbose, and overkill for experienced Slackware users, but for the inexperienced and uninitiated, this guide should prove helpful in understanding the process of updating Slackware.
Prerequisites and Precautions
- Always review the Slackware change log before starting. Important to notice are those packages that are new or created from a split from a former package. For example, in Slackware 11, the fontconfig and freetype packages were split from the X11 packages and converted into separate packages. Therefore, mere updating the X11 packages would not update the fontconfig and freetype packages and those packages would have to be updated separately.
- If you are a person who does not maintain a full installation, be sure you have a couple of hours available to dedicate to updating, especially if you are inexperienced at updating Slackware. New and modified configuration files will be added and the only way to merge those files with your existing configuration files is to manually compare the new files with the existing files. The command line diff or KDE Kompare utilities are helpful with this task.
- Obtain copies of the new CDs. Or use ISO images that can be mounted. Or download the entire Slackware distribution tree. A fast and convenient approach is to copy the ISO images or distribution tree and all additional packages to a spare or temporary directory.
- Using ISO images or a local mirror of the Slackware tree is faster than faster than using CDs. However, if using ISO images, do not use those images if located on a FAT32 partition. Strange things tend to happen when GNU/Linux has to operate with FAT32 partitions.
- If necessary, obtain copies of all patches and security packages released subsequent to the original distro release.
- If you use TrueType fonts and enable the Bytecode Interpreter in the Freetype package, then download or compile a current copy of the Freetype package that is compatible with the Slackware release you are updating.
- Be aware that unlike the installation setup, updating packages will not automatically ask you for additional CDs. You must update manually from those disks or ISO images.
- Unless you automatically generate the files from one of the boot scripts, /etc/issue and /etc/issue.net will be out-of-date and incorrect after you finish updating.
- Verify the /etc/slackware-version file is updated.
- If you have modified various system scripts, such as /usr/X11R6/bin/startx, and the new release contains updates to the X files (probable), then those files will be overwritten. Always maintain backups of those files.
- If you are updating KDE and have modified various KDE scripts or configuration files, such as /opt/kde/bin/startkde and the kdm related files, those files will be overwritten. Always have backups of those files.
- If you have modified many configuration files and boot scripts, then do not use the automatic updating script provided in UPDATE.TXT. Otherwise you will lose many precious settings such as printer settings, modem (ppp) settings, ssh settings, etc.
- If updating X you will need to regenerate your font caches.
- If you use ALSA for sound then updating will disable sound until you reconfigure ALSA.
- Most users will be unable to use ALSA with their previously installed kernel because ALSA is always compiled with respect to the currently installed kernel. If you maintain the previous kernel in case you run into problems after updating your system, you won’t have any sound through ALSA.
- Updating will overwrite at least the following files without creating a respective *.new file:
/etc/modules.conf
/etc/rc.d/rc.alsa
/etc/X11/xinit/xinitrc.*
- If you want to preserve your existing kernel sources, then performing a full update will delete those sources and modules. The new kernel sources and modules must therefore be installed individually rather than updated. Understand that using the previous kernel will mean that some updated packages will not work because they were compiled with the newer kernel. But using the older kernel for emergency purposes will work.
- Updating KDE probably is less troublesome by performing a fresh install rather than trying to update. That means removing or renaming the existing files before installing the new packages. However, you likely want to preserve some KDE-specific configurations such as menu structures, the kdm login manager settings, Konqueror service menus, modifications to mimelink files, and possibly any KDE system scripts that you modified. Backup those files before proceeding, or if you have the disk space, instead of deleting the entire KDE directory tree, make a copy of that directory to more easily transfer settings, configurations, themes, etc.
- Although the UPDATE.TXT recommends using the --install-new option when using the upgradepkg tool, users who do not maintain a full installation will not want to use that option. Use that option with caution because you probably want to carefully select which new packages you install. Familiarity with the Slackware change log helps here.
- Consider using Midnight Commander as a more friendly tool to use for many users to manage files and directories rather than the raw command line.
- Starting with Slackware version 11.0, updating X requires some additional attention. The proper method is to 1) update the primary X package, 2) update the fontconfig and freetype packages, then 3) update all desired remaining X packages.
Procedure
- Boot your box into run level 3, even if you normally boot into run level 4. You can do this with an additional boot loader menu option or you can manually modify your existing boot loader options at boot time. Add the boot option init 3 to boot into run level 3 instead of run level 4.
- After logging in, if you are more comfortable using X than the command line, go ahead and run X (startx).
- Open a text editor and prepare a new boot loader menu option that will recognize the new kernel. For example, if the new release of Slackware contains kernel 2.4.99, then prepare a new menu option for that kernel. Do not replace the existing menu options — only add new options. Maintain the existing options should things go haywire.
- Create new boot loader menu options for both run level 3 and run level 4.
- If uncomfortable mounting CDs or ISO images from the command line, then use your GUI tools now to mount the disk or image. However, if updating from CD, then you will have to unmount the first disk and mount the second disk, so you might as well mount from the command line. If using ISO images, then mount them all now.
- If you want to preserve your current kernel sources (/usr/src/linux-2.x.x) and library modules (/lib/modules/2.x.x), then make a backup of those directories.
- Backup the entire /etc directory.
- With this backup you’ll have both a backup copy of the original files and later you can perform a diff -qr to notice additional file changes not mentioned in this document.
- Backup any additional system scripts you might have modified, such as /usr/X11R6/bin/startx, /opt/kde/bin/startkde, the kdm related files, KDE global menus, Konqueror service menus, mimelink modifications, etc.
- If you have the disk space, then make a copy of the KDE directory tree.
- Take a snapshot of the /etc/rc.d directory by printing a listing to a text file. This way you’ll remember the current executable condition of all rc.d scripts:
ls /etc/rc.d > /tmp/rc.d.txt
- Take a snapshot of the /etc/profile.d directory by printing a listing to a text file. This way you’ll remember the current executable condition of all profile.d scripts:
ls /etc/profile.d > /tmp/profile.d.txt
- Exit X and return to the console.
- If you are logged in as a normal user, then log out and log in as root.
- Type telinit 1 to enter single user mode.
- Log in as root.
- If you want to watch the updating process without interruption then disable screen blanking:
setterm -blank 0 -powersave off -powerdown 0
- Remove the current KDE (or use pkgtool):
removepkg /var/log/packages/arts*
removepkg /var/log/packages/kde*
removepkg /var/log/packages/koffice*
removepkg /var/log/packages/qt*
removepkg /var/log/packages/k3b*
- If unsure whether the previous commands completely removed KDE, merely verify the /opt/kde directory is empty (ls -alR /opt/kde). If the directory is not empty, then use pkgtool to list and remove the remaining packages. If you manually added additional service menus, mime links, etc., then those files will remain after removing the KDE packages.
- Change the current directory (cd) to the CD or ISO image mount point.
- Change the directory to slackware.
- List (ls -al) the directory to verify you are in the correct directory. You should see the familiar Slackware package tree directories (/a, /ap, /d, etc.).
- Update the glibc shared libraries:
upgradepkg a/glibc-solibs-*.tgz
- Update the Slackware package utilities:
upgradepkg a/pkgtools-*.tgz
- Update sed:
upgradepkg --install-new a/sed*.tgz
- If you want to preserve your existing kernel sources, headers, and modules, then perform the following (replace each x with the appropriate number of the new kernel):
installpkg a/kernel-modules-2.x.x*.tgz
installpkg d/kernel-headers-2.x.x*.tgz
installpkg k/kernel-source-2.x.x*.tgz
- Now update the whole shebang. Be forewarned that if typically you do not maintain a full installation then using the --install-new option will add many additional packages to your system that you do not want. This is where reviewing the change log is helpful. More than likely, the --install-new option should be used for all /a packages because those packages are considered critical to Slackware. But using that option should be used carefully with respect to all other packages. Of course, if you always perform a full installation then using the --install-new option makes sense.
upgradepkg --install-new */*.tgz
or
upgradepkg */*.tgz
or
upgradepkg --install-new a/*.tgz
upgradepkg ap/*.tgz
upgradepkg d/*.tgz
upgradepkg e/*.tgz
upgradepkg f/*.tgz
upgradepkg k/*.tgz
upgradepkg l/*.tgz
upgradepkg n/*.tgz
upgradepkg t/*.tgz
upgradepkg tcl/*.tgz
upgradepkg x/x11-6.9.0*.tgz
installpkg x/fontconfig*.tgz
upgradepkg x/*.tgz
upgradepkg xap/*.tgz
upgradepkg y/*.tgz
- If necessary, mount the second CD or ISO image.
- Unless you prefer a full installation, you probably do not want to install everything from the subsequent disks. Therefore replace each x with the appropriate directory and repeat as necessary:
upgradepkg --install-new x/*.tgz
or
upgradepkg x/*.tgz
- Install KDE (note: arts was installed with the /l packages):
installpkg kde/*.tgz
- If you need the KDE internationalization packages then install them now:
installpkg kdei/*.tgz
- If using K3B, then update that package:
upgradepkg x/k3b-x.x.tgz
- If using the Bytecode Interpreter in a third-party Freetype package, then update that package (replace each x with the appropriate directory and number). Notice that the stock Slackware Freetype package does not enable the Bytecode Interpreter. You must use a third party package to enable that important feature.
upgradepkg [third party package location]/freetype-2.x.x.tgz
- Update any additional packages in the same manner, including new packages provided with the new Slackware release but not installed using the upgradepkg process.
- If you performed a full installation or used the --install-new option to update KDE and do not need or want the internationalization package then remove that package:
removepkg /var/log/packages/kde-i18n* koffice-i18n*
- If desired then manually run ldconfig.
- If you updated the X packages then run fc-cache -fv now.
- Edit and update both /etc/issue and /etc/issue.net.
- If desired then rename /etc/rc.d/rc.alsa to /etc/rc.d/rc.alsa.new.
- From your backups, copy rc.alsa to your system as /etc/rc.d/rc.alsa.
- Using your printed list of /etc/rc.d scripts, adjust the executable permissions as necessary (use chmod +x or chmod -x).
- Using your printed list of /etc/profile.d scripts, adjust the executable permissions as necessary (use chmod +x or chmod -x).
- If you are preserving your previous kernel and modules, then from your backups copy /lib/modules/2.x.x to your system as /lib/modules/2.x.x.
- Return to run level 3 by typing telinit 3.
- Log off.
- Reboot using run level 3 using your boot loader menu option using the new kernel.
- Verify the system boots with no unexpected errors. You likely will receive ALSA error messages.
- Log on.
- You likely received ALSA error messages. Configure ALSA:
alsaconf
alsamixer
alsactl store
- If you updated /etc/modules.conf when running alsaconf, then update all kernel module dependencies now:
depmod -a
- Create a copy of the new fully commented kdm login manager configuration file:
cp –p /opt/kde/share/configuration/kdm/kdmrc /opt/kde/share/configuration/kdm/kdmrc.sample
- If you modify some system scripts, then create a copy of the new startx script:
cp –p /usr/X11R6/bin/startx /usr/X11R6/bin/startx.orig
- If you modify system scripts, then create a copy of the new startkde script:
cp –p /opt/kde/bin/startkde /opt/kde/bin/startkde.orig
- If you modify system scripts, then create copies of the new xinitrc scripts:
cp –pR /etc/X11/xinit /etc/X11/xinit/xinitrc.new
- Start X/KDE by typing startx.
- Inspect /var/log/Xorg.0.log for any error (EE) or warning (WW) messages.
- Inspect /var/log/messages for any unusual errors or messages.
- Inspect /var/log/syslog for any unusual errors or messages.
- Inspect /var/log/dmesg for any unusual errors or messages.
- Open the KDE Control Center and verify the correct KDE and kernel versions.
- Open the KDE Control Center and run the Font Installer. If necessary then enter Administrative mode and let the Font Installer update the font directories.
- Verify your printer is configured properly.
- Create and print a list of all *.new files:
find /etc -name "*.new" > ~/dot-new-list.txt
- Using the Kompare front-end for diff, compare and merge all system scripts that were overwritten, such as /usr/X11R6/bin/startx, /opt/kde/bin/startkde, the kdm related files, etc.
- Review the list of installed packages for anything that might be obsolete and should be removed. All packages not date-stamped today might need reviewing:
ls -lt /var/log/packages | less
- Using Kompare, begin comparing and merging all *.new files with your existing configuration files. This a slow process!
- Compare your backup copy of /etc directory to the new /etc.
- Exit X/KDE and reboot into run level 4. Verify things seem to be functioning normally.
- After rebooting into KDE, verify there are no .font-cache-1 files in your home directory. If there are, then you’ll need to revise your xorg.conf font list, regenerate the system font caches with fc-cache -fv, and re-run the KDE Font Installer.
- Update or install all subsequent Slackware patches and security updates.
- Update or install any additional third party packages as desired.
- Run updatedb.
- At this point you are finished updating. However, for several days be watchful of anything that might seem abnormal — there is a good reason why a particular bumper sticker remains popular (things happen!).
You probably can automate many of these tasks by writing a comprehensive script. This procedure probably is overkill for any Slackware veterans, but nonetheless I hope this document helps you!
Finis.
Table of Contents
|
|