stretch
Stretch upgrade
Unfortunately, I started this documentation only after I upgraded 2 of my 3 main machines, so it is probably lacking.
Process
Similar to Koumbit's process, but we don't use Puppet:
Pre-upgrade checks:
sudo ttyrec -e screen /var/log/upgrade-stretch.ttyrec
cd /etc; git tag pre-stretch
git gc --prune # make /etc smaller for backup
tar cfz /var/backups/pre-stretch-backup.tgz /etc /var/lib/dpkg /var/lib/apt/extended_states /var/lib/aptitude/pkgstates
dpkg --get-selections "*" > /var/backups/dpkg-selections-pre-stretch.txt
rm /etc/apt/preferences /etc/apt/preferences.d/* # Check for pinned (on hold) packages, and possibly disable
rm /etc/apt/sources.list.d/testing.list # or other similar backports or sources from later releases
rm /etc/apt/sources.list.d/jessie-backports.list
apt-mark showhold
dpkg --audit
apt update && apt -y upgrade
dpkg -l '*dkms' # look for dkms packages and make sure they are relevant, if not, purge.
Check free space, see this guide to free up space and download packages:
sed -i.orig 's/jessie/stretch/g' /etc/apt/sources.list
apt update; apt -o APT::Get::Trivial-Only=true dist-upgrade; df -h
apt -y -d upgrade && apt -y -d dist-upgrade
Actual upgrade run:
export DEBIAN_FRONTEND=noninteractive APT_LISTCHANGES_FRONTEND=mail
apt upgrade -y -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold'
apt dist-upgrade -y -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold'
/opt/bin/clean_conflicts
Post-upgrade:
apt-get purge $(deborphan -n) # look also for obsolete packages in aptitude
dpkg -l '*-dbg' # look for dbg package and possible replace with -dbgsym
aptitude purge ~c # purge removed packages
apt autoremove -y --purge
apt-get clean
reboot
# review and purge older kernel once the new one boots properly
User-specific tasks:
migrated PGP keyring:
/usr/bin/migrate-pubring-from-classic-gpg --default
Issues
- Debian bug #866786: multiple device support in cryptroot-unlock
- Debian bug #866792: irssi profile should load in complain mode
- Debian bug #866790: postfix apparmor profile syntax errors
- Debian bug #845938 and Debian bug #805414: a2db sink locked by gdm
Kodi doesn't start without switching ttys (not filed, noodles has a similar issue, workaround was to setup Kodi as a systemd service and disabling gdm3 completely. the following file was added to
/etc/systemd/system/kodi.service
:# stolen from https://github.com/graysky2/kodi-standalone-service [Unit] Description=Kodi Media Center After=systemd-user-sessions.service network.target sound.target [Service] User=xbmc Group=video Type=simple #PAMName=login # you might want to try this one, did not work on all systems # not sure what this does TTYPath=/dev/tty1 StandardInput=tty # original suggestion, but noodles added dbus-launch #ExecStart=/usr/bin/xinit /usr/bin/kodi-standalone -- :0 -nolisten tcp vt1 # this allows the process to start in parallel with gdm3, although i had flickering issues then #ExecStart=/usr/bin/xinit /usr/bin/dbus-launch --exit-with-session /usr/bin/kodi-standalone -- :1 -keeptty -nolisten tcp vt7 ExecStart=/usr/bin/xinit /usr/bin/dbus-launch --exit-with-session /usr/bin/kodi-standalone -- :0 -nolisten tcp vt1 Restart=on-abort RestartSec=5 [Install] WantedBy=multi-user.target
then disable the gdm3 service and enable the service:
systemctl disable gdm3 systemctl enable kodi systemctl stop gdm3 systemctl start kodi
unfortunately, I had to disable rootless X, something I would prefer to avoid, but I couldn't figure out how to do that. This is done by adding
needs_root_rights=yes
to/etc/X11/Xwrapper.config
.forgot to review the list of packages removed, those I would have liked to keep: torbrowser-launcher, npm
- upgrade was performed with a bad battery, which meant suspending two times during the upgrade process (!), which seems to have worked okay
- known issues
- this guide should be merged with upstream