X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=input%2Fhowto%2Fupgrade-to-wheezy.mdwn;h=21edd0743703a9d08c30ebe21221fe8d398fa2a6;hb=edae2938597d9b796cda07a404857c1eb4ca8f2e;hp=953ce92e96c24bf9993554b33869842acc60fa62;hpb=f014b09e7eca6514c402851c7feaaaa5676c162d;p=mirror%2Fdsa-wiki.git diff --git a/input/howto/upgrade-to-wheezy.mdwn b/input/howto/upgrade-to-wheezy.mdwn index 953ce92..21edd07 100644 --- a/input/howto/upgrade-to-wheezy.mdwn +++ b/input/howto/upgrade-to-wheezy.mdwn @@ -1,4 +1,3 @@ - # Upgrade from squeeze to wheezy Make sure to coordinate with whoever uses the host, be it the buildd @@ -13,28 +12,40 @@ on buildds: now wait for the buildd to quit -turn off samhain - - cd /etc/rc2.d/ - service samhain stop && - prio=$(ls -1 S*samhain | cut -b 2-3); mv S${prio}samhain K${prio}samhain # so it stays down - +upgrade stuff: -maybe turn off exim +* answer question to libc6 "Restart services automaticaly" with "yes" +* answer "Yes" to changes of /etc/default/rcS, [BR#694928](http://bugs.debian.org/694928) +* and change "FSCKFIX=yes" afterwards, at least on hardware without remote access (like arm*) +* say no to other other questions. - cd /etc/rc2.d/ - service exim4 stop && - prio=$(ls -1 S*exim4* | cut -b 2-3); mv S${prio}exim4 K${prio}exim4 # so it stays down +commands: - -install deborphan, clean up - - apt-get autoremove - apt-get install deborphan dialog - orphaner - orphaner -n - orphaner -a - orphaner -a -n + sed -i "s#squeeze#wheezy#g" /etc/apt/sources.list.d/debian.list /etc/apt/sources.list.d/security.list && + dpkg --clear-avail && + rm -f /etc/apt/preferences.d/dsa-bacula-client && + if [ -e /etc/apt/sources.list.d/buildd.debian.org.list ]; then + rm -f /etc/apt/preferences.d/buildd && + sed -i "s#squeeze#wheezy#g" /etc/apt/sources.list.d/buildd.debian.org.list + fi && + apt-get update && + apt-get install dpkg apt samhain && + service samhain stop && + apt-get dist-upgrade && + rm /var/state/samhain/samhain_file && + samhain --foreground -t init -p none -s none -l none -m none && + (puppet agent -t || true) && + apt-get dist-upgrade && + c_rehash /etc/ssl/debian/certs && + c_rehash /etc/exim4/ssl && + apt-get --purge autoremove && + while [ "$(deborphan -n | wc -l)" -gt 0 ] ; do apt-get purge $(deborphan -n); done && + apt-get purge liblzma2 lzma && + dpkg --clear-avail && + apt-get clean + + +if /etc/apache2/apache2.conf was not changed, remove the include for httpd.conf. purge removed packages @@ -42,137 +53,21 @@ purge removed packages echo "really purge these [y/N]?" && read ans && [ "$ans" = "y" ] && dpkg --purge `dpkg --get-selections | awk '$2=="deinstall" {print $1}'` && echo "These are not at install:" && dpkg --get-selections | awk '$2!="install" {print $1}' -change sources list entries to squeeze: - - cd /etc/apt/sources.list.d && sed -i "s#squeeze#wheezy#g" debian.list && sed -i "s#squeeze#wheezy#g" volatile.list && sed -i "s#squeeze#wheezy#g" security.list - -update apt list - - apt-get update - -upgrade - - apt-get install locales-all apt dpkg base-files - -answer question to libc6 "Restart services automaticaly" with "yes" - -answer "Yes" to changes of /etc/default/rcS, [http://bugs.debian.org/694928](BR#694928) -and change "FSCKFIX=yes" afterwards, at least on hardware without remote access (like arm*) - -rest follows +more clean ups: - apt-get dist-upgrade - -use dash as system shell (/bin/sh). - -reject changes to /etc/pam.d/sudo (puppet will install a new file later anyway) - -reject changes to /etc/munin/plugin-conf.d/munin-node (puppet will install a new file later anyway) - - * keep local (i.e. reject (N)): - * all changes relating to exim (in /etc/exim4 and in logrotate) - * /etc/nagios/nrpe.cfg - * /etc/ldap/ldap.conf - * /etc/puppet/puppet.conf - - * /etc/samhain/samhainrc - * /etc/munin/munin-node.conf - * /etc/logrotate.d/apache2 - * /etc/apache2/apache2.conf - * /etc/apache2/ports.conf - - * install new version: - * /etc/init.d/stunnel4 - -update dsa-nagios.git (add host to squeeze hostgroup) - -update dsa-puppet.git (add to squeeze list in local.yaml) - -do a puppet run: - - puppetd -t; puppetd -t - -upgrade once more (security etc) - - apt-get update && apt-get dist-upgrade - -if you are moving from a dsa kernel to a debian kernel, add non-free to sources list, then + apt-get purge arrayprobe + /usr/lib/nagios/plugins/dsa-check-packages | tr -d , + apt-get --purge autoremove +maybe apt-get install firmware-linux -maybe also - - apt-get install firmware-bnx2 - -if you are an nfs client, make sure to load the module before boot completes: +update dsa-nagios.git (add host to wheezy hostgroup) - echo nfs >> /etc/modules +reboot -if you are an autofs node, make sure to load the module before boot completes: - - echo autofs4 >> /etc/modules - -These last two are because autofs in particular lazy loads the modules, and it -will happen after we've disabled module loading. - -clean up transitions - - dpkg --purge dhcp3-client && apt-get install isc-dhcp-client # mark as non-auto - -Do the same for grub/grub-pc if you did upgrade-from-grub-legacy - - (reboot) - upgrade-from-grub-legacy - (reboot) - apt-get purge grub && - apt-get install grub-pc - -clean up old libs - - orphaner - orphaner -n - orphaner -a - orphaner -a -n - -check for unneeded/obsolete packages - - apt-get autoremove - - /usr/lib/nagios/plugins/dsa-check-packages - -purge removed packages - - dpkg --get-selections | awk '$2=="deinstall" {print $1}' && - echo "really purge these [y/N]?" && read ans && [ "$ans" = "y" ] && dpkg --purge `dpkg --get-selections | awk '$2=="deinstall" {print $1}'` && - echo "These are not at install:" && dpkg --get-selections | awk '$2!="install" {print $1}' - -purge cruft that upgrade doesn't remove - - apt-get remove --purge emacs22-common libxmlrpc-ruby libcap1 emacs22-nox emacs22-bin-common libvolume-id0 gcc-4.2-base ifenslave libopenssl-ruby1.8 mailx - -re-init samhain - -possibly reboot - -re-enable exim, samhain - - mv /etc/rc2.d/K??exim4 /etc/rc2.d/S02exim4 - mv /etc/rc2.d/K??samhain /etc/rc2.d/S02samhain - env -i /etc/init.d/exim4 start - env -i /etc/init.d/samhain start - - insserv +verify ipv6 routing still works. re-init samhain -### Troubleshooting - -### Problems with CCISS - -On custom kernels in squeeze it seems that udev stopped to create cciss devices, thus in /lib/udev/devices do a /dev/MAKEDEV cciss and reboot. - - cd /lib/udev/devices - /dev/MAKEDEV cciss - -### mailq plugin no longer works - apt-get install nagios-plugins-standard + samhain --foreground -t update -p none -s none -l none -m none