Benutzer-Werkzeuge

Webseiten-Werkzeuge


becki:linux:slack_upgrade

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
becki:linux:slack_upgrade [2014-11-06 14:20]
becki
becki:linux:slack_upgrade [2018-09-15 08:33] (aktuell)
becki [Keep your system up to date]
Zeile 2: Zeile 2:
 ===== Abstract == ===== Abstract ==
  
-FIXME+This page describes how to keep your Slackware system up to date.
  
 ===== Keep your system up to date == ===== 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''​+Check if updates are necessary at all: 
 +  ​slackpkg ​check-updates
  
-( ftp://ftp.gwdg.de/pub/linux/slackware/slackware-currentworks good for Germany )+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!
  
-Slackpkg Usage: +Make (becki)backup ​of your whole system
-<code bash> +
-rm -r /​etc.bak; ​       # Back up /etc to be on the save side +
-cp -/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 +
-</​code>​+
  
-<note important>​If the kernel was updated as well, the symlink ''​/etc/rc.d/rc.modules''​ must be adjusted manually<​/note>+Make copies of these dirsto be on the save side: 
 +  rm -r /boot.bak 
 +  cp -a /boot /boot.bak 
 +  rm -r /etc.bak 
 +  cp -a /etc /etc.bak
  
-Go on with fixing config files (below)!+Check if ''​sbMergeEtcConfig''​ is up to date
  
-===== Keeping up with Slackware current or upgrade System ​to another Slackware ​version ​==+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''​
  
-<code bash> +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''​.
-rm -r /etc.bak; +
-cp -a /etc /etc.bak +
-slackpkg check-updates +
-slackpkg update +
-slackpkg install-new +
-slackpkg upgrade-all +
-slackpkg clean-system +
-</​code>​+
  
-<note warning>​Take care, ''​slackpkg clean-system'' ​removes unofficial packages ​as wellYou have to put unofficial packages into the blacklistSee comments in ''/​etc/​slackpkg/blacklist'​' ​and ''man slackpkg''​.</​note>​+If ''/​etc/​rc.d/​rc.inet1.conf''​ has been modifiedeg via ''​netconfig'' ​make sure, that all regarding config files have their backuped originals ​as .sborg filesThese are: ''​etc/​rc.d/​rc.inet1.conf ​/etc/HOSTNAME ​/etc/hosts /​etc/​networks /​etc/​resolv.conf''​
  
-<note important>​''​install-new'' ​would install packages you intentionally skipped (e.g KDEI) as well. To avoid this add those package ​to the blacklist!</​note>​+Check if mirror url in ''​/​etc/​slackpkg/​mirrors'' ​points ​to the right slackware version
  
-Whole package series can be blacklisted ​as well, eg  +Take care, ''​slackpkg clean-system''​ removes unofficial packages ​as well. You have to put unofficial packages into the blacklistCheck ''​/etc/slackpkg/blacklist''​. At least kernel, kernel-modules ans sbo packages should be blacklisted:​ 
-  ​./​slackware64/​kdei +  kernel-generic 
-blacklists everything from the kdei series (tested)[[https://www.linuxquestions.org/questions/​slackware-14/slackpkg-blacklist-entire-branch-4175419214/​|See also]]+  kernel-generic-smp 
 +  kernel-huge 
 +  kernel-huge-smp 
 +  kernel-modules 
 +  kernel-modules-smp 
 +  [0-9]+_SBo
  
-Go on with fixing config files (below)!+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''​!)
  
-===== Howto fix Config Files in /etc ==+Sync your local mirror for the multilib packages if you use them
  
-Make sure to have a copy of the original version of every file you modifiedGive the original files uniform extension, eg. ''​.sborg''​+Check if there is enough empty space in the ''/''​ partition for the uptdateWith 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 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.
  
-Make sure you don't have any old ''​.new''​ files somewhere in ''/​etc''​+Update the package list and upgrade the package manager itself: 
 +  slackpkg update 
 +  slackpkg upgrade slackpkg
  
-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''​+Then fix ''/​etc/​slackpkg/​mirrors'' ​and ''​/​etc/​slackpkg/​blacklist'' ​using ''​sbMergeEtcConfig''​ and update the package list again:
  
-For everey new config file, it is most convenient to do an automated ''​mv''​ or ''​merge''​ with the following script: +  slackpkg update
-Link FIXME+
  
-==== Notes ==+If necessary, install the synced multilib packages (see below) **or** without multilib just upgrade glibc-solibs:​ 
 +  slackpkg upgrade glibc-solibs
  
-''/​var/​www/​htdocs/​index.html''​ may be created by the update if it does not exist. This may conflict with your custom start pageeg ''​index.php''​+Nowonly for Slack current or upgrade to next Slackware version: 
 +  slackpkg install-new
  
-Your ''​php.ini'' ​may need manual treatmentIf 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 because currently (Slack 13.37-14.1) no .new files are created for PHP.+According to http://​docs.slackware.com/​howtos:​slackware_admin:​systemupgrade ​''​install-new'' ​installs ony new packagesIt does //not// install packages you intentionally skipped ​on installaton.
  
-Recommended approach for php.ini:+Finally install the new versions of existing packages: 
 +  slackpkg upgrade-all
  
-Afer OS installationbefore any OS update+Againonly for current and distupgrade
-<code bash>mv php.ini-production php.ini.sborg +  ​slackpkg clean-system
-cp php.ini.sborg php.ini +
-echo '​Renamed php.ini-production to php.ini.sborg for updates'​ >> php.ini +
-echo 'This file php.ini is based on php.ini.sborg'​ >> php.ini +
-# now furhter edit php.ini to satisfy your needs +
-</​code>​+
  
-After OS update, but before running the ''​sbMergeEtcConfig''​ script, a (new) ''​php.ini-production'' ​may exist again. Then do: +Remove unnecessary installed packages ​(kde... kompare kopete...using ''​removepkg''​. ​If necessary remove old unused kernel packages as well.
-<code bash>mv php.ini-production php.ini.new</​code>​+
  
-Now run ''​sbMergeEtcConfig''​+merge *.new files with sbMergeEtcConfig. See below.
  
-===== Attic == +If the kernel was updated: 
-==== Upgrade your system to another Slackware version ==+  - An [[slack_initrd|initrd]] must be created if the generic kernel is used 
 +  - (e)Lilo must be reinstalled 
 +  - If the new kernel boots, the packages conaining the old kernel and its modules can be removed.
  
-<note warning>​ObsoleteKeep with Slack current!<​/note>+Do some cleanup: 
 +  - ''/​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''​ 
 +  - CHANGES_AND_HINTS.TXT for Slack 14.2 recommends to chmod -x rc.alsa 
 +  - VGA settings for lilo changed for Slack 14.2. Hence it is probably better to create a new lilo.conf with ''​liloconfig''​ 
 +  - As of 14.2 set mplayer to use [[sound#​select_output_driver|pulse]] as output device 
 +  - 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! 
 +  - 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)
  
-=== Requirements == +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
-== Partitions ==+
  
-Have at least 2 partitions: A ''/''​-partition where the linux distribution is installed and ''/​home''​ where all distribution independend things are located. During upgrade, ''/''​ will be completely overwritten by the new distribution,​ while ''/​home''​ remains untouched.+===== Slackpkg usage for multilib system ==
  
-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: +1st manually ​[[slack_multilib#​download|sync]] your local mulilib mirror, then
-  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 [[slackmirror>​slackware-11.0/​rootdisks/​README.TXT]]+
  
-== Symlinks ==+<code bash> 
 +slackpkg check-updates ​       # to see if updates are necessary at all 
 +slackpkg update ​              # to update the package list 
 +slackpkg upgrade slackpkg ​
  
-We assume that /home has its own partition which will be conserved during upgradeEverything which has to be saved and is locatet in the partition has to be moved and symlinked to the /home partition:+cd <​local_mulitlib_mirror>​ 
 +upgradepkg --reinstall --install-new *.t?z 
 +upgradepkg --install-new slackware64-compat32/*-compat32/*.t?z
  
-<​code ​bash> +slackpkg install-new ​         # only for Slack current or upgrade to next Slackware version! 
-mkdir /​home/​redirects+slackpkg upgrade-all ​         # to finally install the new versions of existing packages 
 +slackpkg clean-system ​        # only for current and distupgrade (?) 
 +</code>
  
-cp -a /usr/local /usr/local.org +Continue with lilo etcSee above!
-mv /usr/local /​home/​redirects/​usr.local +
-ln -s /​home/​redirects/​usr.local /usr/local+
  
-cp -a /opt /opt.org +===== Howto fix Config Files in /etc ==
-mv /opt /​home/​redirects +
-ln -s /​home/​redirects/​opt /opt+
  
-cp -a /var/www /var/www.org +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''​.  
-mv /var/​www ​/home/redirects/var.www + 
-ln -/home/redirects/var.www /var/www+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 [[slackmirror>​slackware-11.0/​rootdisks/​README.TXT]]
  
-# 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 
-</​code>​ 
-Thest if your moved data and applications are still available and working after that step! 
  
becki/linux/slack_upgrade.1415283616.txt.gz · Zuletzt geändert: 2014-11-06 14:20 von becki

Impressum - Datenschutzerklärung