I was able to reproduce a failed upgrade on a Raspberry Pi 4. The FreedomBox web interface became unavailable, being stuck in the same error loop described above by @Avron. Here’s what you can do if you have SSH or console access:
0. (if you use SSH) install screen, to stay connected even if the SSH session disconnects:
sudo apt install -y screen
-
screen
[enter, then press space] sudo DEBIAN_FRONTEND=noninteractive apt-get dist-upgrade
- after the upgrade finished, I ran apt update again, and saw that the freedombox package was held, so ran:
sudo apt-mark unhold freedombox
- Then I ran
sudo DEBIAN_FRONTEND=noninteractive apt-get dist-upgrade
again. - Now my /boot partition didn’t have enough free space to update initramfs. If you are facing the same issue, you can free up some space and then update initramfs. Please only do this if update-initramfs is failing for you:
5.1.sudo mkdir /root/kernel-backup
5.2.sudo mv /boot/firmware/initrd.img-5* /root/kernel-backup/
5.3.sudo mv /boot/firmware/vmlinuz-5* /root/kernel-backup/
5.4DEBIAN_FRONTEND=noninteractive apt-get dist-upgrade
sudo reboot