Benutzer-Werkzeuge

Webseiten-Werkzeuge


becki:linux:slack_upgrade

Dies ist eine alte Version des Dokuments!


Slackware Upgrade Mini-Howto

Abstract

FIXME

Keep your system up to date

slackpkg is a very convenient tool for that job. It can download update packages from the net and install them. In order to use it, you first have to uncomment a Slackware mirror close to your location for your Slackare version in the file /etc/slackpkg/mirrors

( ftp://ftp.gwdg.de/pub/linux/slackware/slackware-current/ works good for Germany )

Slackpkg Usage:

rm -r /etc.bak;        # Back up /etc to be on the save side
cp -a /etc /etc.bak
slackpkg check-updates # to see if updates are necessary at all
slackpkg update        # to update the package list
slackpkg upgrade-all   # to finally install the new versions of existing packages
If the kernel was updated as well, the symlink /etc/rc.d/rc.modules must be adjusted manually

Keeping up with Slackware current or upgrade System to another Slackware version

rm -r /etc.bak;
cp -a /etc /etc.bak
slackpkg check-updates
slackpkg update
slackpkg install-new
slackpkg upgrade-all
slackpkg clean-system
Take care, slackpkg clean-system removes unofficial packages as well. You have to put unofficial packages into the blacklist. See comments in /etc/slackpkg/blacklist and man slackpkg.
install-new would install packages you intentionally skipped (e.g KDEI) as well. To avoid this add those package to the blacklist!

Whole package series can be blacklisted as well, eg

./slackware64/kdei

blacklists everything from the kdei series (tested). See also

Howto fix Config Files in /etc

Make sure to have a copy of the original version of every file you modified. Give the original files a uniform extension, eg. .sborg
Make sure you don't have any old .new files somewhere 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. Now locate all new config files with:

find /etc -name '*.new'

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

#!/bin/bash
# file: sbmergeEtcConfig
 
# stettings start
SEARCHDIR='/etc'
NEWSFX='new'
ORGSFX='sborg'
MRGSFX='merged'
# stettings end
 
DRYRUN=''
if [ "$1" != 'real' ]; then
    echo "DRYRUN MODE. Use \"$(basename $0) real\" for real changes!"
    DRYRUN='true'
fi
 
mergeit() {
    local new="$1"
    local cur="$(dirname "$new")/$(basename "$new" ".$NEWSFX")"
    local org="$cur.$ORGSFX"
    local mrg="$cur.$MRGSFX"
    if [ ! -r $new ]; then
        echo "ERROR: Can't read $new!"
        return
    fi
    if [ ! -r $cur ]; then
        echo "ERROR: Can't read $cur!"
        return
    fi
    if [ -r $org ]; then
        echo "merge -p $cur $org $new > $mrg"
        $DRYRUN merge -p "$cur" "$org" "$new" > "$mrg"
        if [ $? -ne 0 ]; then
            echo "ERROR: Merge conflict $cur!"
            return
        fi
        echo "cat $mrg > $cur"
        if [ "$DRYRUN" != 'true' ]; then
            cat "$mrg" > "$cur"
        fi
        if [ $? -ne 0 ]; then
            echo "ERROR: Can't cat $mrg to $cur!"
            return
        fi
        echo "mv $new $org"
        $DRYRUN mv "$new" "$org"
        if [ $? -ne 0 ]; then
            echo "ERROR: Can't mv $new to $org!"
            return
        fi
    else
        echo "mv $new $cur"
        $DRYRUN mv "$new" "$cur"
        if [ $? -ne 0 ]; then
            echo "ERROR: Can't mv $new to $cur!"
            return
        fi
    fi
}
 
for new in $(find "$SEARCHDIR" -name "*.$NEWSFX"); do
    mergeit "$new"
done

See also Upgrading Configuration Files with a three-way File Merge

Note that your php.ini needs manual treatment. If your php.ini is based on php.ini-production, you have to check if your model php.ini-production was modified by the update and merge the differences into your php.ini. This is becaus currently (Slack 13.37) no .new files are created for PHP.

Attic

Upgrade your system to another Slackware version

Obsolete. Keep with Slack current!

Requirements

Partitions

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

We assume that /home has its own partition which will be conserved during upgrade. Everything which has to be saved and is locatet in the / partition has to be moved and symlinked to the /home partition:

mkdir /home/redirects
 
cp -a /usr/local /usr/local.org
mv /usr/local /home/redirects/usr.local
ln -s /home/redirects/usr.local /usr/local
 
cp -a /opt /opt.org
mv /opt /home/redirects
ln -s /home/redirects/opt /opt
 
cp -a /var/www /var/www.org
mv /var/www /home/redirects/var.www
ln -s /home/redirects/var.www /var/www
 
# as of Slack 12.2 you might update the symlinks for the apache document root as well:
cp /srv/httpd /srv/httpd.org
cp /srv/www   /srv/www.org
ln -s /home/redirects/var.www /srv/httpd
ln -s /home/redirects/var.www /srv/www

Thest if your moved data and applications are still available and working after that step!

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.1389251562.txt.gz · Zuletzt geändert: 2014-01-09 07:12 von becki

Impressum - Datenschutzerklärung