more cruft removal
[mirror/dsa-wiki.git] / input / howto / upgrade-to-squeeze.mdwn
1
2 # Upgrade from lenny to squeeze
3
4 turn off samhain
5
6         /etc/init.d/samhain stop &&
7         mv /etc/rc2.d/S19samhain /etc/rc2.d/K19samhain # and stay down
8
9
10 maybe turn off exim
11
12         /etc/init.d/exim4 stop &&
13         mv /etc/rc2.d/S20exim4 /etc/rc2.d/K20exim4 # so it stays down
14
15
16 install deborphan, clean up
17
18         apt-get install deborphan dialog
19         orphaner
20         orphaner -n
21         orphaner -a
22         orphaner -a -n
23
24 unhold puppet
25
26         echo puppet install | dpkg --set-selections &&
27         echo puppet-common install | dpkg --set-selections
28
29 purge removed packages
30
31         dpkg --get-selections | awk '$2=="deinstall" {print $1}' &&
32         echo "really purge these [y/N]?" && read ans && [ "$ans" = "y" ] && dpkg --purge `dpkg --get-selections | awk '$2=="deinstall" {print $1}'` &&
33         echo "These are not at install:" && dpkg --get-selections | awk '$2!="install" {print $1}'
34
35 change sources list entries to squeeze:
36
37         cd /etc/apt/sources.list.d && sed -i "s#lenny#squeeze#g" debian.list
38
39 update apt list
40
41         apt-get update
42
43 upgrade
44
45         apt-get install locales-all apt dpkg
46
47 rest follows
48
49         apt-get dist-upgrade
50
51 use dash as system shell (/bin/sh).
52
53 reject changes to /etc/pam.d/sudo (puppet will install a new file later anyway)
54
55 reject changes to /etc/munin/plugin-conf.d/munin-node (puppet will install a new file later anyway)
56
57  * keep local (i.e. reject (N)):
58   * all changes relating to exim  (in /etc/exim4 and in logrotate)
59   * /etc/ldap/ldap.conf
60   * /etc/nagios/nrpe.cfg
61   * /etc/samhain/samhainrc
62   * /etc/munin/munin-node.conf
63   * /etc/logrotate.d/apache2
64   * /etc/apache2/apache2.conf
65   * /etc/apache2/ports.conf
66
67 update nagios.git (add host to squeeze hostgroup)
68
69 update dsa-puppet.git (add to squeeze list in local.yaml)
70
71 do a puppet run:
72
73         puppetd -t; puppetd -t; puppetd -t
74
75 upgrade once more (security etc)
76
77         apt-get update && apt-get dist-upgrade
78
79 if you are moving from a dsa kernel to a debian kernel, add non-free to sources list, then
80
81         apt-get install firmware-linux
82
83 maybe also
84
85         apt-get install firmware-bnx2
86
87 clean up transitions
88
89         dpkg --purge dhcp3-client && apt-get install isc-dhcp-client  # mark as non-auto
90
91 Do the same for grub/grub-pc if you did upgrade-from-grub-legacy
92
93         (reboot)
94         upgrade-from-grub-legacy
95         (reboot)
96         apt-get purge grub &&
97         apt-get install grub-pc
98
99 clean up old libs
100
101         orphaner
102         orphaner -n
103         orphaner -a
104         orphaner -a -n
105
106 check for unneeded/obsolete packages
107
108         apt-get autoremove
109
110         /usr/lib/nagios/plugins/dsa-check-packages
111
112 purge removed packages
113
114         dpkg --get-selections | awk '$2=="deinstall" {print $1}' &&
115         echo "really purge these [y/N]?" && read ans && [ "$ans" = "y" ] && dpkg --purge `dpkg --get-selections | awk '$2=="deinstall" {print $1}'` &&
116         echo "These are not at install:" && dpkg --get-selections | awk '$2!="install" {print $1}'
117
118 purge cruft that upgrade doesn't remove
119
120         apt-get remove --purge emacs22-common libxmlrpc-ruby libcap1 emacs22-nox emacs22-bin-common libvolume-id0 gcc-4.2-base ifenslave libopenssl-ruby1.8
121
122 re-init samhain
123
124 possibly reboot
125
126 re-enable exim, samhain
127
128         mv /etc/rc2.d/K02exim4 /etc/rc2.d/S02exim4
129         mv /etc/rc2.d/K02samhain /etc/rc2.d/S02samhain
130         env -i /etc/init.d/exim4 start
131         env -i /etc/init.d/samhain
132
133         insserv
134
135 re-init samhain
136
137
138 ### Problems with CCISS
139
140 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.
141
142         cd /lib/udev/devices
143         /dev/MAKEDEV cciss