Upgrade da Squeeze a Wheezy
Preparazione
- Avviare screen
- Registrare la sessione:
script -t 2>~/upgrade-wheezystep.time -a ~/upgrade-wheezystep.script
Backup del Sistema
Come sempre ...
- Fare una copia di comodo locale della etc:
sudo mkdir -p /files; sudo tar --exclude=.svn -cvf /files/etc.tar /etc
- Fermare cfengine, se attivo
sudo invoke-rc.d cfengine2 stop
Aggiornamento Squeeze
- Aggiornare ad ultimi rilasci
sudo apt-get update sudo apt-get dist-upgrade
Pulizia Pacchetti
- Rimuovere i pacchetti non necessari
- Rimuovere i pacchetti che non hanno dipendenze necessarie:
if [ ! -e /usr/bin/deborphan ]; then sudo apt-get install deborphan; fi
if [ -z "$(deborphan)" ]; \
then \
echo "Nothing to Remove"; \
else \
sudo apt-get remove --purge $(deborphan)
fi
sudo apt-get --purge autoremove
- Nel caso l'autoremove voglia rimuovere pacchetti che in realtà si vogliono tenere, marcarli come installati manualemente
sudo apt-mark unmarkauto packagename
- Ripetere
sudo apt-get --purge autoremove
- Rimuovere le configurazione dei pacchetti disinstallati:
if [ -z "$(dpkg -l | grep ^rc | tr -s ' ' | cut -f 2 --delim=' ')" ]; \
then \
echo "Nothing to Purge"; \
else \
sudo dpkg --purge $(dpkg -l | grep ^rc | tr -s ' ' | cut -f 2 --delim=' '); \
fi
- Before upgrading your system to wheezy, it is recommended to remove old configuration files (such as *.dpkg-{new,old} files under /etc
- Verificare se ci sono pacchetti in hold o marcati per la rimozione. Se ci sono holds, disabilitarli:
sudo dpkg --audit sudo aptitude search "~ahold" sudo dpkg --get-selections | grep 'hold$'
- To unset the “hold” state:
echo package_name install | sudo dpkg --set-selections
Upgrade
Sistemazione fonti apt
- Cambiare squeeze in wheezy in sources.lists
- Sostituire "squeeze" con "wheezy" in /etc/apt/sources.list
sudo sed -i 's/squeeze/wheezy/g' /etc/apt/sources.list
- La lista delle sorgenti dovrebbe essere simile a:
sudoedit /etc/apt/sources.list
deb http://ftp.it.debian.org/debian wheezy main contrib non-free deb http://ftp.it.debian.org/debian wheezy-updates main contrib non-free deb http://security.debian.org wheezy/updates main contrib non-free #deb-src http://ftp.it.debian.org/debian/ wheezy main non-free contrib #deb-src http://security.debian.org/ wheezy/updates main contrib non-free #deb-src http://ftp.it.debian.org/debian wheezy-updates main contrib non-free
- Sostituire, se presenti, le sorgenti backports con
deb http://mirrors.kernel.org/debian wheezy-backports main contrib deb-src http://mirrors.kernel.org/debian wheezy-backports main contrib
- If you have listed the proposed-updates section in your /etc/apt/sources.list file, you should remove it from that file before attempting to upgrade your system. This is a precaution to reduce the likelihood of conflicts.
- Aggiornare il database apt:
sudo apt-get update
Scaricamento pacchetti
- Aggiornare le nuove fonti APT:
sudo apt-get update
- Scaricare i pacchetti necessari:
sudo apt-get dist-upgrade -d
Aggiornamento APT
sudo apt-get install apt apt-listchanges
Aggiornamento Kernel
- Identificare i kernel installati
dpkg -l "linux-image*" | grep ^ii
- Identificare il kernel in uso
uname -r
- Kernel flavor selection: Debian's 686 kernel configuration has been replaced by the 686-pae configuration, which uses PAE (“Physical Address Extension”). If your computer is currently running the 686 configuration but does not have PAE, you will need to switch to the 486 configuration instead. You can check whether your computer has PAE by running. If it does not (i.e. the command outputs no), you should install linux-image-486 and then remove linux-image-686 and/or linux-image-2.6-686 if they are currently installed.
grep -q '^flags.*\bpae\b' /proc/cpuinfo && echo yes || echo no
- Installare i firmware non free per ogni hardware che li necessita :
sudo apt-get install firmware-linux-nonfree firmware-realtek
- Installare la versione più recente nel caso di kernel standard, oppure quello adeguato:
sudo apt-get install linux-image-amd64 sudo apt-get install linux-image-i686
- Make sure that update-grub is run as part of the kernel upgrade, or run it manually:
sudo update-grub
- Verificare di avere abbastanza spazio per l'upgrade
sudo apt-get -o APT::Get::Trivial-Only=true dist-upgrade
Note per pacchetti specifici
Sudo
If you have modified /etc/sudoers then you should be aware of changes made to how sudo configuration is handled. The default /etc/sudoers now includes the following two directives:
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
#includedir /etc/sudoers.d
Neither of these entries are added to your /etc/sudoers automatically during the upgrade. (Although you will still be able to run sudo commands by specifying their fully-qualified path.) So you might wish to consider migrating your changes to the new /etc/sudoers.d directory and using the default /etc/sudoers file. For example:
mv /etc/sudoers /etc/sudoers.d/mychanges mv /etc/sudoers.dpkg-new /etc/sudoers
You may also need to edit your /etc/sudoers.d/mychanges to remove unwanted Defaults and #includedir entries. You should use visudo for this:
visudo -f /etc/sudoers.d/mychanges
4.5.7.3. Suhosin PHP module
The php5-suhosin package has been removed. If your PHP configuration included the suhosin module, it will fail to load after the PHP upgrade. Run dpkg --purge php5-suhosin to remove the leftover configuration in /etc/php5/conf.d/suhosin.ini.
Temporary filesystems
In previous releases, temporary (tmpfs) filesystems were mounted on /lib/init/rw, /dev/shm/ and optionally on /var/lock and /var/run. /lib/init/rw has been removed, and the others have been moved under /run. /var/run and /var/lock were configured using RAMRUN and RAMLOCK in /etc/default/rcS. All these tmpfs filesystems are now configurable using /etc/default/tmpfs; the old settings are not migrated automatically. Old location New location Old setting New setting
/etc/default/rcS /etc/default/tmpfs
/lib/init/rw /run N/A N/A /var/run /run RAMRUN N/A /var/lock /run/lock RAMLOCK RAMLOCK /dev/shm /run/shm N/A RAMSHM N/A /tmp N/A RAMTMP
The migration of data to the new locations will occur automatically during the upgrade and will continue to be available at the old and new locations, with the exception of /lib/init/rw. No action is required on your part,
Request Tracker versions
If you have request-tracker3.8 installed on your squeeze system, note that this package has been removed from wheezy, to be replaced by request-tracker4. Some manual steps are required to upgrade between request-tracker3.8 and request-tracker4: please install request-tracker4 alongside your existing request-tracker3.8 installation and consult the installation/upgrade notes in /usr/share/doc/request-tracker4/README.Debian.gz (section: “Upgrading from request-tracker3.8 to request-tracker4”).
The same advice applies if you have request-tracker3.6 or older packages from previous Debian releases still in use; if this is the case it is recommended to upgrade step by step, following the appropriate upgrade documents.
Bootlogd changes
bootlogd has moved from sysvinit-utils to a separate bootlogd package. If you wish to continue using bootlogd, you need to install the bootlogd package. Note that the configuration file /etc/default/bootlogd and its option BOOTLOGD_ENABLE no longer exist; if you do not wish to run bootlogd, remove the bootlogd package.
Cyrus SASL SQL backends
Configuration of SQL engine backends for Cyrus SASL, as provided in the libsasl2-modules-sql package, has changed from database specific configuration (e.g. mysql) to the generic sql auxprop plugin.
Configuration files for applications using SASL have to be updated, for example:
auxprop_plugin: mysql
should be replaced by:
auxprop_plugin: sql sql_engine: mysql
In addition, the SQL query (if used) needs to have %u replaced with %u@%r, because user and realm are now provided separatel