Merge branch 'master' of git+ssh://db.debian.org/git/dsa-wiki
[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
25 purge removed packages
26
27         dpkg --get-selections | awk '$2=="deinstall" {print $1}' &&
28         echo "really purge these [y/N]?" && read ans && [ "$ans" = "y" ] && dpkg --purge `dpkg --get-selections | awk '$2=="deinstall" {print $1}'` &&
29         echo "These are not at install:" && dpkg --get-selections | awk '$2!="install" {print $1}'
30
31 change sources list entries to squeeze:
32
33         cd /etc/apt/sources.list.d && sed -i "s#lenny#squeeze#g" debian.list
34
35 update apt list
36
37         apt-get update
38
39 upgrade
40
41         apt-get install locales-all
42
43 rest follows
44
45         apt-get dist-upgrade
46
47
48 reject changes to /etc/pam.d/sudo (puppet will install a new file later anyway)
49
50 reject changes to /etc/munin/plugin-conf.d/munin-node (puppet will install a new file later anyway)
51
52  * keep local (i.e. reject (N)):
53   * all changes relating to exim  (in /etc/exim4 and in logrotate)
54   * /etc/ldap/ldap.conf
55   * /etc/nagios/nrpe.cfg
56   * /etc/samhain/samhainrc
57   * /etc/munin/munin-node.conf
58   * /etc/logrotate.d/apache2
59   * /etc/apache2/apache2.conf
60   * /etc/apache2/ports.conf
61
62 update nagios.git (add host to squeeze hostgroup)
63
64 update dsa-puppet.git (add to squeeze list in local.yaml)
65
66 do a puppet run:
67
68         puppetd -t
69
70 upgrade once more (security etc)
71
72         apt-get update && apt-get dist-upgrade
73
74 check for obsolete packages
75
76         /usr/lib/nagios/plugins/dsa-check-packages
77
78 clean up old libs
79
80         orphaner
81         orphaner -n
82         orphaner -a
83         orphaner -a -n
84
85
86 purge removed packages
87
88         dpkg --get-selections | awk '$2=="deinstall" {print $1}' &&
89         echo "really purge these [y/N]?" && read ans && [ "$ans" = "y" ] && dpkg --purge `dpkg --get-selections | awk '$2=="deinstall" {print $1}'` &&
90         echo "These are not at install:" && dpkg --get-selections | awk '$2!="install" {print $1}'
91
92 re-init samhain
93
94 possibly reboot
95
96 maybe do:
97         upgrade-from-grub-legacy
98         apt-get purge grub
99         apt-get install grub-pc
100         apt-get purge dhcp3-client
101         apt-get install isc-dhcp-client
102
103 re-enable exim, samhain
104
105         mv /etc/rc2.d/K02exim4 /etc/rc2.d/S02exim4
106         mv /etc/rc2.d/K02samhain /etc/rc2.d/S02samhain
107         env -i /etc/init.d/exim4 start
108         env -i /etc/init.d/samhain
109
110         insserv
111
112 re-init samhain
113
114
115 ### Problems with CCISS
116
117 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.
118
119         cd /lib/udev/devices
120         /dev/MAKEDEV cciss