Closed miroslavbucek closed 2 years ago
Starting from an installed system on buster
you can use this workaround awaiting support by the installer:
#!/bin/bash
# Set this to the current release you are on
thisrelease=buster
# Set this to the release you wish to migrate to
nextrelease=bullseye
# make sure we are current.
sudo apt-get update
sudo apt-get -y dist-upgrade
# source: https://linuxconfig.org/raspbian-gnu-linux-upgrade-from-jessie-to-raspbian-stretch-9
dpkgC=$(sudo dpkg -C | wc -l)
if [ $dpkgC -ne 0 ]; then
sudo dpkg -C
echo
echo "*** Consistency check returned a list of partially installed, missing and/or obsolete packages."
echo "*** Repair these issues before continuing."
exit 1
fi
aptholds=$(sudo apt-mark showhold | wc -l)
if [ $aptholds -ne 0 ]; then
sudo apt-mark showhold
echo
echo "*** There are packages ON HOLD."
echo "*** Repair these issues before continuing."
exit 1
fi
echo
# Point to the new repository
sudo sed -i "s/${thisrelease}/${nextrelease}/g" /etc/apt/sources.list
cat /etc/apt/sources.list
echo
sudo sed -i "s/${thisrelease}/${nextrelease}/g" /etc/apt/sources.list.d/raspberrypi.org.list
cat /etc/apt/sources.list.d/raspberrypi.org.list
echo
echo
echo "***"
echo "*** UPGRADING FROM ${thisrelease} TO ${nextrelease}"
echo "*** THIS WILL TAKE A FEW MINUTES"
echo "***"
# allow user to change their mind...
sleep 10
sudo apt-get update
sudo apt -yuV full-upgrade
sudo apt-get -y dist-upgrade
EDIT 20211121: updated the script to remove typo.
I tried the manual upgrade from buster but it failed. The system booted but failed to log in, even remotely using SSH, failed to log in locally.
As you can see in the video.
https://user-images.githubusercontent.com/2242078/139802700-0f10061b-0584-465f-910b-2ef4cc50a2e3.MOV
Remarkable.
All the script does is change from the buster
to the bullseye
repository and upgrade the kernel and any packages that need to be changed.
UPDATE: Just tried it on a Pi 3B+. No problems whatsoever. There are only a few moments that require your presence at the keyboard/SSH-terminal to select a keyboard layout, to allow restarting services during upgrading and to make sure you keep the existing /etc/resolv.conf
. That's it really.
The behavior you are seeing is not familiar to me. It bothers me that you login as root
but that is another story and most probably not related.
Hmmm. I may have mistyped.
Could you try adding sudo apt -yuV full-upgrade
to the script so that the last three lines read:
sudo apt-get update
sudo apt -yuV full-upgrade
sudo apt-get -y dist-upgrade
See if that works.
It works fine! Thanks