Current (06.02.23) working in-place upgrade to bookworm

If anyone had been leveraging in-place dist-upgrade/full-upgrade of debian-11-minimal & inadvertently borked their debian-12-minimal aka bookworm templates (like me :roll_eyes:), here’s what I find to be “working” (supporting salt/GUI Update) …


Used to work a treat:

apt update && apt upgrade -y && apt autoremove -y
sed -i 's/bullseye/bookworm/g' /etc/apt/sources.list
sed -i 's/bullseye/bookworm/g' /etc/apt/sources.list.d/qubes-r4.list
apt update && apt upgrade -y && apt full-upgrade -y && apt autoremove -y

but, when updated via GUI removes qubes-core-agent & qubes-core-qrexec. :scream: :grimacing: :scream:

Try something like this instead:

echo "LC_ALL=en_US.UTF-8" >> /etc/environment
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
echo "LANG=en_US.UTF-8" >> /etc/locale.conf
locale-gen en_US.UTF-8
apt update && apt upgrade -y && apt autoremove -y
sed -i 's/#deb \[arch=amd64\] https:\/\/deb.qubes-os.org\/r4.1\/vm bullseye-testing main/deb \[arch=amd64\] https:\/\/deb.qubes-os.org\/r4.1\/vm bullseye-testing main/g' /etc/apt/sources.list.d/qubes-r4.list
sed -i 's/#deb \[arch=amd64\] https:\/\/deb.qubes-os.org\/r4.1\/vm bullseye-securitytesting main/deb \[arch=amd64\] https:\/\/deb.qubes-os.org\/r4.1\/vm bullseye-securitytesting main/g' /etc/apt/sources.list.d/qubes-r4.list
apt update && apt upgrade -y && apt autoremove -y
sed -i 's/non-free/non-free non-free-firmware/g' /etc/apt/sources.list
sed -i 's/bullseye/bookworm/g' /etc/apt/sources.list
sed -i 's/bullseye/bookworm/g' /etc/apt/sources.list.d/qubes-r4.list
apt update && apt upgrade -y -o Dpkg::Options::=--force-confdef && apt full-upgrade -y && apt autoremove -y

It’s not clear to me why the qubes packages from testing haven’t been pushed to the main repo which, would allow the old standard in-place upgrade to work.

Hoping :pray: this helps someone!

2 Likes

Just wanted to update this with a couple relevant bits …

  1. Added bits to support locale-gen. While I could tolerate perl complaining, improperly configured locale eventually had me down a rabbit hole since some packages wouldn’t post-install config properly without.

  2. With bookworm, non-free firmware have moved from non-free to non-free-firmware.

You can enable this repository by changing the sources line from :
deb https://deb.debian.org/debian bookworm main contrib non-free
to
deb https://deb.debian.org/debian bookworm main contrib non-free non-free-firmware

Or by creating a NEW repository definition in /etc/apt/sources.list.d/non-free-firmware.list
with content:
deb https://deb.debian.org/debian bookworm non-free-firmware

At this time not all packages have moved to non-free-firmare, so don’t
simply remove “non-free” without checking.

I never presume to speak for the Qubes team. When I comment in the Forum or in the mailing lists I speak for myself.

I had a Debian bullseye template that I tried to upgrade in-place to bookworm.

This failed, using the script(s) above. At a certain point the network connection seemed to be gone. When restarting the template VM it never came back up again.

The reason in my case was that the template still had the Qubes R4.0 links in /etc/apt/sources.list.d/qubes-r4.list (instead of 4.1). So the problem for me wasn’t the bullseye->bookworm upgrade, but the 4.0->4.1 upgrade.

Thankfully there is a Qubes issue that describes what to do in this case. The solution for me was as follows:

  1. in the /etc/apt/sources* files manually replace all references to 4.0 and bullseye with 4.1 and bookworm; add the non-free-firmware as well
  2. Run an update script (that was linked to by Marek) that takes care of installing the XEN libs that otherwise would be gone, plus temporary stopping some Qubes magic

The upgrade finished and restarting the template VM succeeded.

Just as a heads-up in case anyone finds this thread while struggling with a Debian in-place upgrade.

1 Like