Sunday, January 21, 2024

Dual upgrade: Proxmox 7 to 8 and Linux Mint Debian Edition 5 to 6

I had previously installed Proxmox VE 7 on Linux Mint Debian Edition 5. Note that this is not a recommended approach. Proxmox VE is based on Debian, and is best installed directly from its ISO. Or it should be installed on top of a vanilla Debian installation.
 
Anyway, since the time I made this "unrecommended" installation, Proxmox has gone from version 7 to 8, and LMDE from version 5 to 6. However, although there are guides for an in-place upgrade from Proxmox 7 to 8, and there is the mintupgrade tool that allows one to upgrade from LMDE 5 to 6, there is no guide on how to carry out a dual in-place upgrade.

In the end, I decided to venture into uncharted waters using the following two guides.

Based on these two guides, the broad idea seems to be to change the repositories from bullseye to bookworm, and from elsie to faye. This includes all the files in /etc/apt/sources.list.d/

The apt pref files should already have been set up, and I confirmed it by checking /etc/apt/preferences.d/

So I backed up /etc/apt/sources.list and the files in /etc/apt/sources.list.d/, and ran the following commands:
sed -i 's/bullseye/bookworm/g' /etc/apt/sources.list
sed -i 's/bullseye/bookworm/g' /etc/apt/sources.list.d/pve-enterprise.list
sed -i -e 's/bullseye/bookworm/g' /etc/apt/sources.list.d/pve-install-repo.list
sed -i 's/bullseye/bookworm/g' /etc/apt/sources.list.d/official-package-repositories.list
sed -i 's/bullseye/bookworm/g' /etc/apt/sources.list.d/additional-repositories.list
sed -i 's/elsie/faye/g' /etc/apt/sources.list.d/official-package-repositories.list
 
This updated the repositories.
If there are other repositories, you need to update them to bookworm too by
sed -i 's/bullseye/bookworm/g' /etc/apt/sources.list.d/other-repos.list
 
Debian 12 also added a new non-free-firmware archive separate from the existing non-free, and that needs to be added to if you are using non-free. However, note that Proxmox provides its own copy of the firmware files, and using the packages in the Debian non-free-firmware archive may conflict with the Proxmox version.
 
sed -i 's/non-free/non-free non-free-firmware/g' /etc/apt/sources.list
sed -i 's/non-free/non-free non-free-firmware/g' /etc/apt/sources.list.d/official-package-repositories.list

 
The next step is to log in as root:
su
 
Then update the repository lists.
apt update
 
Finally, run the distribution upgrade.
apt dist-upgrade
 
Remember to read the notes here.

If anything happens and the upgrade fails, you can try to repair by using
apt -f install

Check if /etc/resolv.conf is empty. If so, install systemd-resolved using
apt install systemd-resolved
Then, go to the Proxmox VE web GUI and make a final confirmation that the DNS is set to the correct address. Otherwise, when you reboot, you are going to regret...

All that remains is to reboot the computer.
reboot

Also, Proxmox does not recognise the version codename "Faye" (which is LMDE 6). It causes the error message "unknown Debian code name 'faye' (500)" and so I had to edit /usr/lib/os-release and change
VERSION_CODENAME=faye
to
VERSION_CODENAME=bookworm
 
After rebooting, running neofetch showed this:

Remember, this is not the usual way of upgrading Proxmox or LMDE, so follow this guide at your own risk and responsibility.

NetworkManager and systemd-networkd will always be in conflict with each other, and I have yet to figure out a proper way to satisfy both. If you end up with some network issues, you will have to try and find your answers online. For me, NetworkManager's "wait for network" was activated together with systemd-networkd's "wait for network" service, causing slow bootup. In the end, I disabled NetworkManager's service (using it alone was causing my SAMBA shares not to mount during boot) using
sudo systemctl disable NetworkManager-wait-online.service

I also changed systemd-networkd's "wait for network" service's timeout by
sudo systemctl edit --full systemd-networkd-wait-online.service
and changing
ExecStart=/usr/lib/systemd/systemd-networkd-wait-online
to
ExecStart=/usr/lib/systemd/systemd-networkd-wait-online --timeout=10
for a timeout of 10s instead of the default 2 minutes.

If icons seems to be missing, refresh the icon cache by executing
sudo update-icon-caches /usr/share/icons/*
in a terminal window.

No comments: