Benutzer-Werkzeuge

Webseiten-Werkzeuge


becki:linux:slack_upgrade

Slackware Upgrade Mini-Howto

Abstract

This page describes how to keep your Slackware system up to date.

Keep your system up to date

Check if updates are necessary at all:

slackpkg check-updates

Make sure you don't have any old .new files somewhere:

find /etc -name '*.new' # Output must be empty!
find /usr -name '*.new' # Output must be empty, except titletoc.new & titletoc.new in /usr/share/texmf/...
find /var -name '*.new' # Output must be empty!

Make a (becki)backup of your whole system

Make copies of these dirs, to be on the save side:

rm -r /boot.bak
cp -a /boot /boot.bak
rm -r /etc.bak
cp -a /etc /etc.bak

Check if sbMergeEtcConfig is up to date

Make sure to have a copy of the original version of every file you modified in /etc. Give the original files a uniform extension, eg. .sborg

Especially check if group.sborg gshadow.sborg passwd.sborg shadow.sborg have been created at initial install or at a former update. If not, the original versions of these files can be found at any mirror in package a/etc.

If /etc/rc.d/rc.inet1.conf has been modified, eg via netconfig make sure, that all regarding config files have their backuped originals as .sborg files. These are: etc/rc.d/rc.inet1.conf /etc/HOSTNAME /etc/hosts /etc/networks /etc/resolv.conf

Check if mirror url in /etc/slackpkg/mirrors points to the right slackware version

Take care, slackpkg clean-system removes unofficial packages as well. You have to put unofficial packages into the blacklist. Check /etc/slackpkg/blacklist. At least kernel, kernel-modules ans sbo packages should be blacklisted:

kernel-generic
kernel-generic-smp
kernel-huge
kernel-huge-smp
kernel-modules
kernel-modules-smp
[0-9]+_SBo

If the kernel is to be updated: Manually download the new kernel and its modules from patches/packages/linux-<new-kernel-version>. Note that in the 64-bit versions of Slack, SMP is the default, so there are no explicit SMP-packages of kernel or modules. Install with installpkg (not with upgradepkg!)

Sync your local mirror for the multilib packages if you use them

Check if there is enough empty space in the / partition for the uptdate. With full KDE and kernel-source, 3 GiB is not enough. Without X and kernel-source 2 GiB should work. (Upate 14.1 → 14.2).
If you don't have enough space, you might fist deinstall unnecessary packages in kde, kdei series and the kernel-source package (Go to a Slack mirror and sort packages by size). Moreover you can reconfig the slackpg cache dir in /etc/slackpkg/slackpkg.conf to a dir in another partition.

Update the package list and upgrade the package manager itself:

slackpkg update
slackpkg upgrade slackpkg

Then fix /etc/slackpkg/mirrors and /etc/slackpkg/blacklist using sbMergeEtcConfig and update the package list again:

slackpkg update

If necessary, install the synced multilib packages (see below) or without multilib just upgrade glibc-solibs:

slackpkg upgrade glibc-solibs

Now, only for Slack current or upgrade to next Slackware version:

slackpkg install-new

According to http://docs.slackware.com/howtos:slackware_admin:systemupgrade install-new installs ony new packages. It does not install packages you intentionally skipped on installaton.

Finally install the new versions of existing packages:

slackpkg upgrade-all

Again, only for current and distupgrade:

slackpkg clean-system

Remove unnecessary installed packages (kde… kompare kopete…) using removepkg. If necessary remove old unused kernel packages as well.

merge *.new files with sbMergeEtcConfig. See below.

If the kernel was updated:

  1. An initrd must be created if the generic kernel is used
  2. (e)Lilo must be reinstalled
  3. If the new kernel boots, the packages conaining the old kernel and its modules can be removed.

Do some cleanup:

  1. /var/www/htdocs/index.html may be created by the update if it did not exist before. This may conflict with your custom start page, eg index.php
  2. CHANGES_AND_HINTS.TXT for Slack 14.2 recommends to chmod -x rc.alsa
  3. VGA settings for lilo changed for Slack 14.2. Hence it is probably better to create a new lilo.conf with liloconfig
  4. As of 14.2 set mplayer to use pulse as output device
  5. As of Slack 14.2 the symlink /etc/rc.modules seems not to be used any more. It still points to old rc.modules-<oldkernel>. ⇒ Rename it!
  6. Start php in the console php -v and make sure no libs are missing. (On a headless server without X11 it may be necesssary to install libXpm)

Consider creating bootstick of old kernel or, on in case of a vserver log into VCP, start VNC console and reboot from there, to see boot messages

Slackpkg usage for a multilib system

1st manually sync your local mulilib mirror, then

slackpkg check-updates        # to see if updates are necessary at all
slackpkg update               # to update the package list
slackpkg upgrade slackpkg 
 
cd <local_mulitlib_mirror>
upgradepkg --reinstall --install-new *.t?z
upgradepkg --install-new slackware64-compat32/*-compat32/*.t?z
 
slackpkg install-new          # only for Slack current or upgrade to next Slackware version!
slackpkg upgrade-all          # to finally install the new versions of existing packages
slackpkg clean-system         # only for current and distupgrade (?)

Continue with lilo etc. See above!

Howto fix Config Files in /etc

After slackpkg has installed the new packages you will be asked how to treat the new config files. Select the first option, i.e. old config files are preserved and new config files get the extension .new.

Search in /var/log/scripts with /var/log/scripts$ grep -h 'config [^e].*\.new' * | sort has shown, that in /usr and /var .new files are created as well. sbMergeEtcConfig is updated accordingly.

For everey new config file, it is most convenient to do an automated mv or merge with the script sbMergeEtcConfig FIXME

Attic

Partitions

FIXME Move this to slack_install

Have at least 2 partitions: A /-partition where the linux distribution is installed and a /home where all distribution independend things are located. During upgrade, / will be completely overwritten by the new distribution, while /home remains untouched.

FIXME Not tested yet: If your current system isn't split like this, you can copy the content of the disk to an image file on a separate drive (eg. USB-drive), then re-partion the drive and restore the content afterward. Use commands like:

dd if=/dev/hda1 of=harddisk-image # Make the image
dd if=harddisk-image of=/dev/hda1 # Restore the disk content

See http://ldp.bootet.net/LDP/sag/html/sag.html#DISK-NO-FS . Maybe also the cat command is an option. See slackware-11.0/rootdisks/README.TXT

Cookies helfen bei der Bereitstellung von Inhalten. Diese Website verwendet Cookies. Mit der Nutzung der Website erklären Sie sich damit einverstanden, dass Cookies auf Ihrem Computer gespeichert werden. Außerdem bestätigen Sie, dass Sie unsere Datenschutzerklärung gelesen und verstanden haben. Wenn Sie nicht einverstanden sind, verlassen Sie die Website. Weitere Information
becki/linux/slack_upgrade.txt · Zuletzt geändert: 2018-09-15 08:33 von becki

Impressum - Datenschutzerklärung