953ce92e96c24bf9993554b33869842acc60fa62
[mirror/dsa-wiki.git] / input / howto / upgrade-to-wheezy.mdwn
1
2 # Upgrade from squeeze to wheezy
3
4 Make sure to coordinate with whoever uses the host, be it the buildd
5 operator, the QA team, the ftp team or just announce it if it's a
6 general developer box.
7
8 on buildds:
9
10         cd ~buildd
11         sudo su - buildd
12         touch NO-DAEMON-PLEASE EXIT-DAEMON-PLEASE && exit
13
14         now wait for the buildd to quit
15
16 turn off samhain
17
18         cd /etc/rc2.d/
19         service samhain stop &&
20         prio=$(ls -1 S*samhain | cut -b 2-3); mv S${prio}samhain K${prio}samhain # so it stays down
21
22
23 maybe turn off exim
24
25         cd /etc/rc2.d/
26         service exim4 stop &&
27         prio=$(ls -1 S*exim4* | cut -b 2-3); mv S${prio}exim4 K${prio}exim4 # so it stays down
28
29
30 install deborphan, clean up
31
32         apt-get autoremove
33         apt-get install deborphan dialog
34         orphaner
35         orphaner -n
36         orphaner -a
37         orphaner -a -n
38
39 purge removed packages
40
41         dpkg --get-selections | awk '$2=="deinstall" {print $1}' &&
42         echo "really purge these [y/N]?" && read ans && [ "$ans" = "y" ] && dpkg --purge `dpkg --get-selections | awk '$2=="deinstall" {print $1}'` &&
43         echo "These are not at install:" && dpkg --get-selections | awk '$2!="install" {print $1}'
44
45 change sources list entries to squeeze:
46
47         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
48
49 update apt list
50
51         apt-get update
52
53 upgrade
54
55         apt-get install locales-all apt dpkg base-files
56
57 answer question to libc6 "Restart services automaticaly" with "yes"
58
59 answer "Yes" to changes of /etc/default/rcS, [http://bugs.debian.org/694928](BR#694928)
60 and change "FSCKFIX=yes" afterwards, at least on hardware without remote access (like arm*)
61
62 rest follows
63
64         apt-get dist-upgrade
65
66 use dash as system shell (/bin/sh).
67
68 reject changes to /etc/pam.d/sudo (puppet will install a new file later anyway)
69
70 reject changes to /etc/munin/plugin-conf.d/munin-node (puppet will install a new file later anyway)
71
72  * keep local (i.e. reject (N)):
73   * all changes relating to exim  (in /etc/exim4 and in logrotate)
74   * /etc/nagios/nrpe.cfg
75   * /etc/ldap/ldap.conf
76   * /etc/puppet/puppet.conf
77
78   * /etc/samhain/samhainrc
79   * /etc/munin/munin-node.conf
80   * /etc/logrotate.d/apache2
81   * /etc/apache2/apache2.conf
82   * /etc/apache2/ports.conf
83
84  * install new version:
85   * /etc/init.d/stunnel4
86
87 update dsa-nagios.git (add host to squeeze hostgroup)
88
89 update dsa-puppet.git (add to squeeze list in local.yaml)
90
91 do a puppet run:
92
93         puppetd -t; puppetd -t
94
95 upgrade once more (security etc)
96
97         apt-get update && apt-get dist-upgrade
98
99 if you are moving from a dsa kernel to a debian kernel, add non-free to sources list, then
100
101         apt-get install firmware-linux
102
103 maybe also
104
105         apt-get install firmware-bnx2
106
107 if you are an nfs client, make sure to load the module before boot completes:
108
109         echo nfs >> /etc/modules
110
111 if you are an autofs node, make sure to load the module before boot completes:
112
113         echo autofs4 >> /etc/modules
114
115 These last two are because autofs in particular lazy loads the modules, and it
116 will happen after we've disabled module loading.
117
118 clean up transitions
119
120         dpkg --purge dhcp3-client && apt-get install isc-dhcp-client  # mark as non-auto
121
122 Do the same for grub/grub-pc if you did upgrade-from-grub-legacy
123
124         (reboot)
125         upgrade-from-grub-legacy
126         (reboot)
127         apt-get purge grub &&
128         apt-get install grub-pc
129
130 clean up old libs
131
132         orphaner
133         orphaner -n
134         orphaner -a
135         orphaner -a -n
136
137 check for unneeded/obsolete packages
138
139         apt-get autoremove
140
141         /usr/lib/nagios/plugins/dsa-check-packages
142
143 purge removed packages
144
145         dpkg --get-selections | awk '$2=="deinstall" {print $1}' &&
146         echo "really purge these [y/N]?" && read ans && [ "$ans" = "y" ] && dpkg --purge `dpkg --get-selections | awk '$2=="deinstall" {print $1}'` &&
147         echo "These are not at install:" && dpkg --get-selections | awk '$2!="install" {print $1}'
148
149 purge cruft that upgrade doesn't remove
150
151         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
152
153 re-init samhain
154
155 possibly reboot
156
157 re-enable exim, samhain
158
159         mv /etc/rc2.d/K??exim4 /etc/rc2.d/S02exim4
160         mv /etc/rc2.d/K??samhain /etc/rc2.d/S02samhain
161         env -i /etc/init.d/exim4 start
162         env -i /etc/init.d/samhain start
163
164         insserv
165
166 re-init samhain
167
168 ### Troubleshooting
169
170 ### Problems with CCISS
171
172 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.
173
174         cd /lib/udev/devices
175         /dev/MAKEDEV cciss
176
177 ### mailq plugin no longer works
178         apt-get install nagios-plugins-standard