Document how to fix BASE-IS-OLD
[mirror/dsa-wiki.git] / input / howto / upgrade-to-squeeze.mdwn
1
2 # Upgrade from lenny to squeeze
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         /etc/init.d/samhain stop &&
19         mv /etc/rc2.d/S19samhain /etc/rc2.d/K19samhain # and stay down
20
21
22 maybe turn off exim
23
24         /etc/init.d/exim4 stop &&
25         mv /etc/rc2.d/S20exim4 /etc/rc2.d/K20exim4 # so it stays down
26
27
28 install deborphan, clean up
29
30         apt-get install deborphan dialog
31         orphaner
32         orphaner -n
33         orphaner -a
34         orphaner -a -n
35
36 purge removed packages
37
38         dpkg --get-selections | awk '$2=="deinstall" {print $1}' &&
39         echo "really purge these [y/N]?" && read ans && [ "$ans" = "y" ] && dpkg --purge `dpkg --get-selections | awk '$2=="deinstall" {print $1}'` &&
40         echo "These are not at install:" && dpkg --get-selections | awk '$2!="install" {print $1}'
41
42 change sources list entries to squeeze:
43
44         cd /etc/apt/sources.list.d && sed -i "s#lenny#squeeze#g" debian.list
45
46 update apt list
47
48         apt-get update
49
50 upgrade
51
52         apt-get install locales-all apt dpkg
53
54 rest follows
55
56         apt-get dist-upgrade
57
58 use dash as system shell (/bin/sh).
59
60 reject changes to /etc/pam.d/sudo (puppet will install a new file later anyway)
61
62 reject changes to /etc/munin/plugin-conf.d/munin-node (puppet will install a new file later anyway)
63
64  * keep local (i.e. reject (N)):
65   * all changes relating to exim  (in /etc/exim4 and in logrotate)
66   * /etc/ldap/ldap.conf
67   * /etc/nagios/nrpe.cfg
68   * /etc/samhain/samhainrc
69   * /etc/munin/munin-node.conf
70   * /etc/logrotate.d/apache2
71   * /etc/apache2/apache2.conf
72   * /etc/apache2/ports.conf
73
74 update dsa-nagios.git (add host to squeeze hostgroup)
75
76 update dsa-puppet.git (add to squeeze list in local.yaml)
77
78 do a puppet run:
79
80         puppetd -t; puppetd -t
81
82 upgrade once more (security etc)
83
84         apt-get update && apt-get dist-upgrade
85
86 if you are moving from a dsa kernel to a debian kernel, add non-free to sources list, then
87
88         apt-get install firmware-linux
89
90 maybe also
91
92         apt-get install firmware-bnx2
93
94 if you are an nfs client, make sure to load the module before boot completes:
95
96         echo nfs >> /etc/modules
97
98 if you are an autofs node, make sure to load the module before boot completes:
99
100         echo autofs4 >> /etc/modules
101
102 These last two are because autofs in particular lazy loads the modules, and it
103 will happen after we've disabled module loading.
104
105 clean up transitions
106
107         dpkg --purge dhcp3-client && apt-get install isc-dhcp-client  # mark as non-auto
108
109 Do the same for grub/grub-pc if you did upgrade-from-grub-legacy
110
111         (reboot)
112         upgrade-from-grub-legacy
113         (reboot)
114         apt-get purge grub &&
115         apt-get install grub-pc
116
117 clean up old libs
118
119         orphaner
120         orphaner -n
121         orphaner -a
122         orphaner -a -n
123
124 check for unneeded/obsolete packages
125
126         apt-get autoremove
127
128         /usr/lib/nagios/plugins/dsa-check-packages
129
130 purge removed packages
131
132         dpkg --get-selections | awk '$2=="deinstall" {print $1}' &&
133         echo "really purge these [y/N]?" && read ans && [ "$ans" = "y" ] && dpkg --purge `dpkg --get-selections | awk '$2=="deinstall" {print $1}'` &&
134         echo "These are not at install:" && dpkg --get-selections | awk '$2!="install" {print $1}'
135
136 purge cruft that upgrade doesn't remove
137
138         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
139
140 re-init samhain
141
142 possibly reboot
143
144 re-enable exim, samhain
145
146         mv /etc/rc2.d/K??exim4 /etc/rc2.d/S02exim4
147         mv /etc/rc2.d/K??samhain /etc/rc2.d/S02samhain
148         env -i /etc/init.d/exim4 start
149         env -i /etc/init.d/samhain start
150
151         insserv
152
153 re-init samhain
154
155 ### Troubleshooting
156
157 ### Problems with CCISS
158
159 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.
160
161         cd /lib/udev/devices
162         /dev/MAKEDEV cciss
163
164 ### mailq plugin no longer works
165         apt-get install nagios-plugins-standard