So I took another activated FreePBX system using the same VM service as the first which was not live and ran apt update and apt ugprade and it didn’t switch to trixie/stable. Then I manually updated /etc/apt/sources to be the same as the broken live system and /etc/aptsources.list.d/* to match the broken live system. Not broken still running but we’ll call it broken. After apt update apt upgrade … it seemed to go through the same procedure as the broken system ending in.
Preparing to unpack …/489-zutty_0.16.2.20241020+dfsg1-1_amd64.deb …
Unpacking zutty (0.16.2.20241020+dfsg1-1) over (0.14.0.20230218+dfsg1-1) …
Errors were encountered while processing:
/tmp/apt-dpkg-install-4vtJtN/135-fail2ban_1.1.0-8_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Checking the kernel version …
dpkg -l | grep linux-image
rc linux-image-6.1.0-32-amd64 6.1.129-1 amd64 Linux 6.1 for 64-bit PCs (signed)
ii linux-image-6.1.0-33-amd64 6.1.133-1 amd64 Linux 6.1 for 64-bit PCs (signed)
ii linux-image-6.1.0-38-amd64 6.1.147-1 amd64 Linux 6.1 for 64-bit PCs (signed)
iU linux-image-6.12.38+deb13-amd64 6.12.38-1 amd64 Linux 6.12 for 64-bit PCs (signed)
iU linux-image-amd64 6.12.38-1 amd64 Linux for 64-bit PCs (meta-package)
The same on both systems, so I believe the test system is the same as the broken system.
Not rebooted.
So first copied /etc/os-release and /etc/debian_version back to the bookworm settings.
Then I restored the bookworm version of /etc/apt/sources.list and /etc/apt/sources.list.d/*
cat /etc/apt/sources.list
deb http://ftp.us.debian.org/debian/ bookworm main non-free-firmware
deb-src http://ftp.us.debian.org/debian/ bookworm main non-free-firmware
deb http://security.debian.org/debian-security bookworm-security main non-free-firmware
deb-src http://security.debian.org/debian-security bookworm-security main non-free-firmware
# bookworm-updates, to get updates before a point release is made;
# see https://www.debian.org/doc/manuals/debian-reference/ch02.en.html#_updates_and_backports
deb http://ftp.us.debian.org/debian/ bookworm-updates main non-free-firmware
deb-src http://ftp.us.debian.org/debian/ bookworm-updates main non-free-firmware
cat /etc/apt/sources.list.d/archive_uri-http_deb_freepbx_org_freepbx17-prod-bookworm.list
deb [arch=amd64] http://deb.freepbx.org/freepbx17-prod bookworm main
cat archive_uri-http_ftp_debian_org_debian-bookworm.list
deb http://ftp.debian.org/debian bookworm non-free-firmware non-free main
# deb-src http://ftp.debian.org/debian bookworm non-free-firmware non-free main
Then run…
apt update
apt upgrade
I was not sure about the kernel image but the broke one was 6.1.0-37 and the test machine was 6.1.0-38. So on the test broke I changed the -38 test machine to -37.
apt install linux-image-6.1.0-37-amd64
I: /vmlinuz is now a symlink to boot/vmlinuz-6.1.0-37-amd64
I: /initrd.img is now a symlink to boot/initrd.img-6.1.0-37-amd64
reboot
After reboot the kernel was still the -38 version I am not sure why. It still booted to -38 unless I selected -37 in the grub menu. Tested and asterisk was still able to start normally.
dpkg -l | grep linux-image
apt remove linux-image-6.1.0-38-amd64
apt remove linux-image-6.12.38+deb13-amd64
apt autoremove
update-grub
reboot
asterisk -r
All okay and running.
I did have some module errors with altered files, and it was a little work to reinstall the affected modules, but after fixing those the system looks like a clean install.