Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
becki:linux:slack_upgrade [2016-04-19 14:02] becki [Howto fix Config Files in /etc] |
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 | ||
- | ''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 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! | ||
- | :!: Before you start: | + | Make a (becki)backup of your whole 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''. | + | Make copies of these dirs, to be on the save side: |
- | - 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'' | + | rm -r /boot.bak |
- | - Make sure you don't have any old ''.new'' files somewhere in ''/etc'' | + | 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. | 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. | ||
- | First Back up /etc to be on the save side: | + | Finally install the new versions of existing packages: |
- | <code bash> | + | slackpkg upgrade-all |
- | rm -r /etc.bak | + | |
- | find /etc -name '*.new' # Output must be empty! | + | |
- | cp -a /etc /etc.bak | + | |
- | </code> | + | |
- | Slackpkg usage: | + | Again, only for current and distupgrade: |
- | <code bash> | + | slackpkg clean-system |
- | slackpkg check-updates # to see if updates are necessary at all | + | |
- | slackpkg update # to update the package list | + | Remove unnecessary installed packages (kde... kompare kopete...) using ''removepkg''. If necessary remove old unused kernel packages as well. |
- | slackpkg upgrade slackpkg | + | |
- | slackpkg upgrade glibc-solibs | + | merge *.new files with sbMergeEtcConfig. See below. |
- | 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 (?) | + | |
- | </code> | + | |
- | <note warning>If the kernel was updated:</note> | + | If the kernel was updated: |
- An [[slack_initrd|initrd]] must be created if the generic kernel is used | - An [[slack_initrd|initrd]] must be created if the generic kernel is used | ||
- | - Lilo must be reinstalled | + | - (e)Lilo must be reinstalled |
- | - the symlink ''/etc/rc.d/rc.modules'' must be adjusted manually | + | - If the new kernel boots, the packages conaining the old kernel and its modules can be removed. |
- | :!: ''/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'' | + | 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) | ||
- | Go on with fixing config files (below)! | + | 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 == | ===== Slackpkg usage for a multilib system == | ||
Zeile 68: | Zeile 112: | ||
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''. | ||
+ | |||
+ | 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 |