Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Upgrade Raspbian To Buster
sudo sync
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get -y dist-upgrade
sudo sed -i 's/jessie/buster/g' /etc/apt/sources.list
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get -y dist-upgrade
sudo sync
#sudo reboot
@TryingToFindALoginWhichIsNotRegistered

This comment has been minimized.

Copy link

commented Oct 31, 2017

I've tryed this in al virtual-box from stretch to buster and it kicked my X-server away. Better install from scratch (the script itself is OK)

@trigrab

This comment has been minimized.

Copy link

commented Dec 15, 2017

I've tried this as well and it did not work. But it has nothing to do with the X-server. After a reboot even the rescue shell didn't work.

The raspberry foundation does not support buster for now. The debian development for raspberry pi 3 is documented here:

For the future you could add
sudo sed -i 's/jessie/buster/g' /etc/apt/sources.list.d/raspi.list
after line 5
But as I said, the raspberry foundation does not support debian buster yet. And has no repo for buster.
So this would break things for now even more.

@janlukes

This comment has been minimized.

Copy link

commented Mar 7, 2018

It works. Thanks.

@jcaesar

This comment has been minimized.

Copy link

commented May 10, 2018

I tried something along the lines. As long as you don't reboot, this is fine. Buster does not exist for raspbian yet, see http://archive.raspberrypi.org/debian/dists/

@s777s

This comment has been minimized.

Copy link

commented Sep 11, 2018

I've succesfully upgraded my Raspbian to Buster a week ago (but I had to apt purge raspi-copies-and-fills coz it's broken) ant its good idea to enable root access:
sudo passwd root
sudo passwd -u root
to be able to access to the rescue shell.
And you may want to have chroot on main system (in case if your internet connection is broken on RPi after dist upgrade), something like this:
https://gist.github.com/jkullick/9b02c2061fbdf4a6c4e8a78f1312a689
But today I tried to repeat it on fresh install and it doesn't want to work((
aptitude tries to reinstall systemd and install udev, but is unable to start systemd-udevd service, so package remains unconfigured and some dependent packages too, I'm unable to start even journalctl and have to play with console.

@SuperSandro2000

This comment has been minimized.

Copy link

commented Nov 24, 2018

Iptables seems to be broken after that

@mkirisame

This comment has been minimized.

Copy link

commented Jan 19, 2019

It has become available now: http://archive.raspberrypi.org/debian/dists/buster/
But the content files are much smaller than those of stretch. It may take a while until all binaries are available for a fully functioning OS?

Edit:
Hi again, couldn't resist trying it on my live system.
So far nickfox-taterli's method + trigrab's suggestion worked fine on my raspberry pi model 3 with migrating stretch to buster.
It is too early to tell if something broke, but my HTTPS webservers are still running excellent.
Support for OpenSSL 1.1.1 +TLSv1_3 is finger licking good!

Edit 2:
It is still working very well. Didn't test desktop though, since I run a headless server from SSH, HTTP, HTTPS only.

Edit 3:
Very stable after over 2 weeks. I see myself out :)

@DaniPhii

This comment has been minimized.

Copy link

commented Feb 17, 2019

I agree! OpenSSL 1.1.1a with support for TLSv1.3 is neat. I upgraded my headless installation of Raspbian Jessie to Stretch and recently I've upgraded it to Buster. Everything seems to be working very well.

@HeikoRo

This comment has been minimized.

Copy link

commented Jul 10, 2019

Just quick comment.
You can avoid all the "sudo" if you run the script as sudo.
And check if it runs as root with this on top of script:

#!/bin/bash
if [ "$EUID" -ne 0 ]
then echo "Please run as root/sudo"
exit
fi

@neuhaus

This comment has been minimized.

Copy link

commented Jul 15, 2019

The sed command may be insufficient. It's better to replace it with

grep -rl stretch /etc/apt/ | sudo xargs sed -i 's/stretch/buster/g'

to catch files in subdirectories as well.

@tiphergane

This comment has been minimized.

Copy link

commented Jul 18, 2019

Iptables seems to be broken after that

+1, iptables is broken because of nftables module who is missing in kernel folder

iptables[1126]: iptables/1.8.2 Failed to initialize nft: Protocol not supported

@HeikoRo

This comment has been minimized.

Copy link

commented Jul 19, 2019

yes, because with Buster the default is now nftables and not xtables

can be fixed by:
sudo update-alternatives --set iptables /usr/sbin/iptables-legacy
sudo update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy

(or manually fixing the links in /etc/alternatives/)

@tiphergane

This comment has been minimized.

Copy link

commented Jul 19, 2019

yes, because with Buster the default is now nftables and not xtables

can be fixed by:
sudo update-alternatives --set iptables /usr/sbin/iptables-legacy
sudo update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy

(or manually fixing the links in /etc/alternatives/)

I'v tryed it, and it doesn't work, for my personal case, I had to symlink module folder to make the fix working.
sudo ln -s /lib/modules/4.19.58-v7+/ /lib/modules/4.19.57-v7+
then all is working great again.

@marcofranssen

This comment has been minimized.

Copy link

commented Aug 6, 2019

I did the upgrade as well. Blogged about it here. https://marcofranssen.nl/upgrade-raspbian-stretch-to-raspbian-buster/

However few days later when I tried Kodi I figured it was broken. Probably caused by broken xserver for which I tried a lot to get it working again. I also noticed kodi on buster is version 17 while on stretch we are on 18.

For now I decided to switch back to stretch.
Blogged about that here.

https://marcofranssen.nl/install-fresh-raspbian-image-on-your-raspberry-pi-part-1/
https://marcofranssen.nl/install-fresh-raspbian-image-on-your-raspberry-pi-part-2/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.