Instructions for manual update from Debian Jessie to Stretch

# ensure nothing is running on the node and shutdown slurm and salt
systemctl stop slurmd.service
systemctl stop salt-minion

# no questions asked by apt/dpkg
export DEBIAN_FRONTEND=noninteractive

# remove not needed apt sources
rm -f /etc/apt/sources.list.d/{condor,jessie-backports}.list

# ensure everything is up to date
apt-get -qq update; apt-get -y upgrade; apt-get -y dist-upgrade; apt-get -y autoremove; apt-get clean

# edit/rewrite the remaining sources to point to stretch
rm -f /etc/apt/sources.list
cat > /etc/apt/sources.list <<EOF
deb http://repository/debian stretch main contrib non-free
deb http://repository/security/ stretch/updates main contrib non-free

rm -f /etc/apt/sources.list.d/lscsoft.list
cat > /etc/apt/sources.list.d/lscsoft.list <<EOF
deb stretch contrib
deb-src stretch contrib

rm -f /etc/apt/sources.list.d/saltstack.list
cat > /etc/apt/sources.list.d/saltstack.list <<EOF
deb http://repository/salt/debian/9/amd64/2019.2 stretch main

# as we mirror a signed external repo, we need to add the remote key
wget -O - | apt-key add -

# remove lscsoft-all for now (will be reinstalled later)
apt-get -y remove lscsoft-all && apt-get -y autoremove && apt-get clean

# start the big update (this will take quite some time)
apt-get -q update && apt-get -y upgrade && apt-get -y dist-upgrade

# since the former step may break down due to some LIGO internal and OS package
# inter dependencies, run this to go on and then rinse and repeat until all is well
apt-get -yf install && apt-get -q update && apt-get -y upgrade && apt-get -y dist-upgrade

# Sometimes a broken lscsoft-lalsuite pacakge seems to be around
# but CA is unsure why
# therefore, try to clean everything up and re-install lscsoft-all
dpkg -l | awk '$3 ~/deb8/ {print $2}'|grep -v linux-image | xargs apt-get -y remove --purge
apt-get -y autoremove
apt-get clean

apt-get -y install lscsoft-all

# check that everything is correctly installed
apt-get -f install

# ensure latest grub-pc is installed
apt-get --yes --purge remove grub-pc grub-common
apt-get -y install grub-pc
# select /dev/sda

# finally

-- CarstenAulbert - 13 Aug 2019
Topic revision: r1 - 13 Aug 2019, CarstenAulbert
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback