I’ve just tried to follow the blog (this one) to do a manual update from Buster to Bullseye, and found some issues and blocking points. See the details below (everything run as root to save on having to sudo every time).
I checked the source files before I started, and there’s one for dietpi-wireguard.list which already points to Bullseye (whilst raspi.plist and sources.list point to Buster)? Also if I try and do an apt update after switching the other two to Bullseye, there are warnings but more importantly there’s nothing to update?
Confirmed that I’m starting from Buster (a fully up to date Buster 7.5.2) and if I try and go through the whole sequence it fails at the last part of 2.2.4 as it tries to reinstall PHP7.3 which no longer is available).
Have restored the system from a disk image done before I started, but any idea what may have gone wrong here? The system itself is running fine, and normally just gets updated via dietpi-update. If more detail is needed, let me know…
root@VPNPi:~# echo $G_DISTRO_NAME
buster
root@VPNPi:/etc/apt# nano sources.list
deb http://raspbian.raspberrypi.org/raspbian buster main contrib non-free rpi
root@VPNPi:/etc/apt/sources.list.d# nano dietpi-wireguard.list
deb http://raspbian.raspberrypi.org/raspbian/ bullseye main
root@VPNPi:/etc/apt/sources.list.d# nano raspi.list
deb https://archive.raspberrypi.org/debian/ buster main ui
root@VPNPi:/etc/apt# sed -i 's|bullseye/updates|bullseye-security|' /etc/apt/sources.list
root@VPNPi:/etc/apt# sed -i 's/buster/bullseye/g' /etc/apt/sources.list{,.d/*.list}
root@VPNPi:/etc/apt/sources.list.d# nano raspi.list
deb https://archive.raspberrypi.org/debian/ bullseye main ui
cd ..
root@VPNPi:/etc/apt# nano sources.list
deb http://raspbian.raspberrypi.org/raspbian bullseye main contrib non-free rpi
root@VPNPi:/etc/apt/sources.list.d# apt update
Hit:1 http://raspbian.raspberrypi.org/raspbian bullseye InRelease
Get:2 https://archive.raspberrypi.org/debian bullseye InRelease [23.5 kB]
Get:3 http://raspbian.raspberrypi.org/raspbian bullseye/non-free armhf Packages [106 kB]
Get:4 http://raspbian.raspberrypi.org/raspbian bullseye/contrib armhf Packages [60.2 kB]
Get:5 http://raspbian.raspberrypi.org/raspbian bullseye/rpi armhf Packages [1,360 B]
Get:6 https://archive.raspberrypi.org/debian bullseye/main armhf Packages [115 kB]
Fetched 307 kB in 3s (115 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
W: Target Packages (main/binary-armhf/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/dietpi-wireguard.list:1
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/dietpi-wireguard.list:1
W: Skipping acquire of configured file 'ui/binary-armhf/Packages' as repository 'https://archive.raspberrypi.org/debian bullseye InRelease' doesn't have the component 'ui' (component misspelt in sources.list?)
W: Target Packages (main/binary-armhf/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/dietpi-wireguard.list:1
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/dietpi-wireguard.list:1
root@VPNPi:/etc/apt/sources.list.d# cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
root@VPNPi:/etc/apt/sources.list.d#
Hi,
yes the Wireguard list is fine as we installed Wireguard from Bullseye repository before.
Could you try to remove dietpi-wireguard.list. Try following and repeat apt update again. Hope it’s showing something now
rm -v /etc/apt/preferences.d/* /etc/apt/sources.list.d/dietpi-{php,wireguard}.list
as well on /etc/apt/sources.list.d/raspi.list the ui to be removed I guess.
Done, now have 418 packages to update. So looks like it’s worked…
root@VPNPi:/etc/apt/sources.list.d# apt update
Hit:1 http://raspbian.raspberrypi.org/raspbian bullseye InRelease
Get:2 https://archive.raspberrypi.org/debian bullseye InRelease [23.5 kB]
Get:3 http://raspbian.raspberrypi.org/raspbian bullseye/non-free armhf Packages [106 kB]
Get:4 http://raspbian.raspberrypi.org/raspbian bullseye/rpi armhf Packages [1,360 B]
Get:5 http://raspbian.raspberrypi.org/raspbian bullseye/contrib armhf Packages [60.2 kB]
Get:6 https://archive.raspberrypi.org/debian bullseye/main armhf Packages [115 kB]
Fetched 307 kB in 3s (107 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
418 packages can be upgraded. Run 'apt list --upgradable' to see them.
ok keep us posted on how it is going.
Looks like it almost worked…
Did all the update etc, but there’s a problem with PiHole and now the pi has no DNS resolution.
During the reinstall of PiHole I got
[FAILED] DietPi-Software | Checking URL: https://raw.githubusercontent.com/MichaIng/DietPi/master/.conf/dps_93/lighttpd.pihole.conf
- Command: curl -ILfvm 5 https://raw.githubusercontent.com/MichaIng/DietPi/master/.conf/dps_93/lighttpd.pihole.conf
│ Sending bug report │
│ - Command: curl --connect-timeout 8 --retry 1 --retry-delay 4 -sSvT 037f7d21-746f-415c-b100-b232aa8ff06f.7z │
│ sftp://dietpi-survey:upload2dietpi@ssh.dietpi.com:22/bugreport/ │
│ - Exit code: 28 │
│ - DietPi version: v7.5.2 (MichaIng/master) | HW_MODEL: 2 | HW_ARCH: 2 | DISTRO: 6 │
│ - Image creator: DietPi Core Team │
│ - Pre-image: Raspbian Lite │
│ - Error log: │
│ * Resolving timed out after 8000 milliseconds │
│ * Closing connection 0 │
│ curl: (28) Resolving timed out after 8000 milliseconds │
│ * Resolving timed out after 8000 milliseconds │
│ * Closing connection 1 │
│ curl: (28) Resolving timed out after 8000 milliseconds
The initial failure was it trying to ping one.one.one.one (cloudflare?) which failed and killed everything in the PiHole reinstall.
And now after rebooting I’m on Bullseye, but have no DNS resolution. Tried a manual ping of the BBC website from command line and that failed DNS, as does anything I try to do for reinstalling PiHole as that also needs DNS for the repo resolution.
Where to go from here to get PiHole and/or DNS back?
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
# 127.0.0.53 is the systemd-resolved stub resolver.
# run "resolvectl status" to see details about the actual nameservers.
nameserver 127.0.0.1
your issue is that your SBC is trying to use itself as DNS server which is not working as PiHole might be missing/not working. A configuration I’m not recommending at all. The SBC itself should point to a global public DNS provider to avoid exactly this issue. In the past, Pihole itself was forcing this setup, but something to be changed now. 
rm /etc/resolv.conf
nano /etc/resolv.conf
add following
nameserver 9.9.9.9
nameserver 149.112.112.112
reboot and try to resolve something from CLI
OK that’s got DNS working again (I thought having a localhost DNS was odd, but wasn’t sure if that was due to PiHole).
So next try reinstalling PiHole again? (via dietpi-software reinstall 93 ) ?
Editted to add - PiHole is available (at least it’s web interface is working) without doing anything more. No reinstall or anything, it’s now there via the browser (as are CUPS and rpi-monitor which also run on this Pi).
So what should be done to make the fix permanent, as won’t resolve.conf be overwritten again?
nope resolve.conf should be static now as we removed the link to the auto created file by removing resolve.conf at the beginning. In your case it was just a symbilic link to a resolvconf generated file, while it is a real file now.
OK, so we can call this one now fully updated and working? Nothing more to do except the auto-purge?
yes you should be able to continue if all your apps are working. Just ensure PiHole DNS resolution is working as well, by checking your clients 
Yes, all seems to be working with PiHole too. So can call that a working update.
I had done the removal of ui and the wireguard list before, so I think your suggestion of rm -v /etc/apt/preferences.d/* was the winner here to get things unstuck.
Thanks for the support 
in meantime we update our blog post to reflect these changes as well.
https://dietpi.com/blog/?p=811#2.2.2-change-the-package-sources
Looks good to me.
Now to make a backup card image and then on with the rest of the day.
Another issue successfully resolved 