Upgrade path - bullseye + pihole 5 to bookworm + pihole 6

I'm currently running pi-hole 5.18.4 on two Pis running the Bullseye version of RPi OS.

I am hoping to reinstall them with Bookworm and pi-hole 6 (there being no supported upgrade path for the OS).

If I export my config using teleporter on version 5.18.4, will I be able to import it into version 6? Or will I need to upgrade to pi-hole 6 on Bullseye first, then export the configs?

Thanks!

Yes. This is the way to go: export a backup, save is securely. Upgrade the OS, install v6 from scatch, import the backup.

Note: Your long-term database is not included in the backup, it might be huge. You need to manually backup /ect/pihole/pihole-FTL.db

Yes. This is the way to go: export a backup, save is securely. Upgrade the OS, install v6 from scatch, import the backup.

Thank you! I was hoping it would be that simple. Much appreciated!

It's not recommended, but it can be done :

  • Upgrade from Debian 11 to Debian 12 by changing to Bookworm Repositories.
  • If everything is still working as it should then upgrade from Pi-Hole v5 to Pi-Hole v6

DONE! :grimacing:

See, last time I tried that it went horrifically wrong!

It can yes, but it's soo nice when it all goes well and you don't have to reinstall stuff so why not give it a try if you can afford it so to speak ?! :grin:

I would try it and if it goes wrong then just reinstall anyway...

Just don't try to update Debian 10 or older to the latest (Debian 12) version : The /boot is not big enough !!!

As the contents of /boot are moved to /boot/firmware in Bookworm, one should first create /boot/firmware:

sudo mkdir /boot/firmware

change the new directory's permissions

sudo chmod 755 /boot/firmware

ls -la /boot/firmware/ should return the following directory permissions:

drwxr-xr-x 4 root root 6144 Jan 1 1970 .
drwxr-xr-x 3 root root 4096 Feb 21 03:31 ..

and then move everything in /boot to /boot/firmware/

sudo mv /boot/* /boot/firmware/

DO NOT REBOOT BEFORE COMPLETING YOUR UPGRADE

To ensure your current install is up to date, run :
sudo apt update && sudo apt full-upgrade -y && sudo apt autoremove -y && sudo apt autoclean -y

Then change the sources. The sources will depend on whether you're using the 32-bit or 64-bit version of Bullseye.

32-bit (armhf) sources:
cat /etc/apt/sources.list

deb [ arch=armhf ] http://raspbian.raspberrypi.com/raspbian/ bookworm main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://raspbian.raspberrypi.com/raspbian/ bookworm main contrib non-free rp

and

cat /etc/apt/sources.list.d/raspi.list

deb http://archive.raspberrypi.com/debian/ bookworm main
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspberrypi.com/debian/ bookworm main

or

64-bit (arm64) sources:
cat /etc/apt/sources.list

deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
deb http://deb.debian.org/debian-security/ bookworm-security main contrib non-free non-free-firmware
deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
# Uncomment deb-src lines below then 'apt-get update' to enable 'apt-get source'
#deb-src http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
#deb-src http://deb.debian.org/debian-security/ bookworm-security main contrib non-free non-free-firmware
#deb-src http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware

and

cat /etc/apt/sources.list.d/raspi.list

deb http://archive.raspberrypi.com/debian/ bookworm main
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspberrypi.com/debian/ bookworm main

Now run:
sudo apt update && sudo apt full-upgrade -y && sudo apt autoremove -y && sudo apt autoclean -y && dpkg --configure -a

The run sudo apt update

You will get the warning:
W: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg)

To fix, run apt-key list | grep -A4 "trusted.gpg$"

Replace <hex_key> with the last eight hexadecimal digits of the public key from the last command, with the space removed (<hex_key> example: 6A7D8E9F)

apt-key export <hex_key>| gpg --dearmor -o /tmp/raspi.gpg
apt-key del <hex_key>
mv /tmp/raspi.gpg /etc/apt/trusted.gpg.d/

Finally, run sudo apt update && sudo apt full-upgrade -y && sudo apt autoremove -y && sudo apt autoclean -y && sudo reboot

Your system should reboot and be running up to date Bookworm.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.