Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
becki:linux:slack_upgrade [2015-05-11 12:06] becki [Keep your system up to date] |
becki:linux:slack_upgrade [2018-09-15 08:33] (aktuell) becki [Keep your system up to date] |
||
---|---|---|---|
Zeile 6: | Zeile 6: | ||
===== Keep your system up to date == | ===== Keep your system up to date == | ||
- | FIXME Keep old kernel. See http://docs.slackware.com/howtos:slackware_admin:systemupgrade :!: | + | Check if updates are necessary at all: |
+ | slackpkg check-updates | ||
- | FIXME Multilib considerations: | + | Make sure you don't have any old ''.new'' files somewhere: |
- | <code> | + | find /etc -name '*.new' # Output must be empty! |
- | Starting with the release of compat32-tools for Slackware 14.0 you can simply add two lines to the /etc/slackpkg/blacklist file: | + | find /usr -name '*.new' # Output must be empty, except titletoc.new & titletoc.new in /usr/share/texmf/... |
- | [0-9]+alien | + | find /var -name '*.new' # Output must be empty! |
- | [0-9]+compat32 | + | |
- | slackpkg check-updates # to see if updates are necessary at all | + | Make a (becki)backup of your whole system |
- | slackpkg update # to update the package list | + | |
- | slackpkg upgrade slackpkg | + | |
- | # skipped slackpkg upgrade glibc-solibs, instead in dir multilib: | + | Make copies of these dirs, to be on the save side: |
- | # sync from mirror...then | + | rm -r /boot.bak |
- | upgradepkg --install-new *.t?z | + | cp -a /boot /boot.bak |
- | upgradepkg --install-new slackware64-compat32/*-compat32/*.t?z | + | rm -r /etc.bak |
+ | cp -a /etc /etc.bak | ||
- | slackpkg upgrade-all | + | Check if ''sbMergeEtcConfig'' is up to date |
- | </code> | + | |
- | ''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'' | + | 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'' |
- | ftp://ftp.gwdg.de/pub/linux/slackware/slackware-current/ works good for Germany | + | 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''. |
- | <note important>Before you start: | + | 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'' |
- | - 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''. | + | |
- | - 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'' | + | |
- | - Make sure you don't have any old ''.new'' files somewhere in ''/etc'' | + | |
- | </note> | + | |
- | <note>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.</note> | + | Check if mirror url in ''/etc/slackpkg/mirrors'' points to the right slackware version |
- | Slackpkg Usage: | + | 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: |
- | <code bash> | + | kernel-generic |
- | # Back up /etc to be on the save side: | + | kernel-generic-smp |
- | rm -r /etc.bak | + | kernel-huge |
- | find /etc -name '*.new' # Output must be empty! | + | kernel-huge-smp |
- | cp -a /etc /etc.bak | + | 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: | ||
+ | - 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. | ||
+ | |||
+ | 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) | ||
+ | |||
+ | 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 [[slack_multilib#download|sync]] your local mulilib mirror, then | ||
+ | |||
+ | <code bash> | ||
slackpkg check-updates # to see if updates are necessary at all | slackpkg check-updates # to see if updates are necessary at all | ||
slackpkg update # to update the package list | slackpkg update # to update the package list | ||
slackpkg upgrade slackpkg | slackpkg upgrade slackpkg | ||
- | slackpkg upgrade glibc-solibs | + | |
+ | 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 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 upgrade-all # to finally install the new versions of existing packages | ||
- | slackpkg clean-system | + | slackpkg clean-system # only for current and distupgrade (?) |
</code> | </code> | ||
- | <note warning>If the kernel was updated: | + | Continue with lilo etc. See above! |
- | - An [[slack_initrd|initrd]] must be created if the generic kernel is used | + | |
- | - Lilo must be reinstalled | + | |
- | - the symlink ''/etc/rc.d/rc.modules'' must be adjusted manually | + | |
- | </note> | + | |
- | + | ||
- | <note important>''/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''</note> | + | |
- | + | ||
- | Go on with fixing config files (below)! | + | |
===== Howto fix Config Files in /etc == | ===== Howto fix Config Files in /etc == | ||
Zeile 68: | Zeile 113: | ||
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''. | 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''. | ||
- | <note important>Your ''php.ini'' may need 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 because currently (Slack 13.37-14.1) no .new files are created for PHP. This issue seems to be fixed as of slack 14.1</note> | + | 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 | For everey new config file, it is most convenient to do an automated ''mv'' or ''merge'' with the script ''sbMergeEtcConfig'' FIXME |