Buenos días.
Por temas de compatibilidad de software de seguridad perimetral, tenemos que pasar unas cuantas VMs que tienen Debian 12 instalado a Ubuntu Server 22.04
He buscado información, y he encontrado que simplemente cambiando los repositorios del source.list y luego realizar un update y upgrade, ya funcionaria.
¿Habeis realizdo alguna vez un cambio así? ¿Es tan "sencillo" como se indica? Os pongo lo que he encontrado abajo:
The naive solution to converting an existing Debian system to Ubuntu is to just edit your /etc/apt/sources.list to switch all the Debian archive references to the equivalent Ubuntu archives and then upgrade all packages. That's a good start, but unfortunately it will most likely leave you with a fairly broken system because many of the libraries in Debian will have newer versions than their equivalents in Ubuntu, so it's necessary to do a bit more work to end up with a usable system.
Edit your /etc/apt/sources.list to comment out all the Debian archives and add entries for the Ubuntu archives. If you need to generate an Ubuntu sources.list file, you can use the "source-o-matic" tool available online at
http://www.ubuntulinux.nl/source-o-matic, or you can just put in some basic entries as a starting point:
deb
http://archive.ubuntu.com/ubuntu dapper main restricted
deb
http://security.ubuntu.com/ubuntu dapper-security main restricted
Then update the package list and install sudo if you don't already have it installed:
# apt-get update
# apt-get install sudo
Since Ubuntu relies so much on the primary user having sudo privileges, it's also a good idea to edit your /etc/sudoers by running visudo and adding a line like this:
%admin ALL=(ALL) ALL
Then place your primary user into the admin group, replacing username with your actual username:
# usermod
username
-g admin
As a first step to getting all the installed packages in order, you can manually force a reinstall of every package on your system to the specific version available in Ubuntu, but since a typical Debian system has over a thousand packages installed, that can be rather tedious. You can save yourself some time by writing a little script like this:
#!/bin/sh
for name in \Qdpkg --get-selections | grep '[[:space:]]install$' \\
| awk '{print $1}'\Q
do
sudo apt-get install --assume-yes ${name}=\Qapt-cache show $name \\
| grep '^Version' | awk '{print $2}'\Q
done
It's highly likely that some packages you have previously installed from the Debian archives won't "cross-grade" cleanly to the version available in Ubuntu, and you may have to manually uninstall some packages to allow the process to complete. Depending on how your system is set up, you may need to do a lot of poking and prodding to get to the point where:
$ sudo apt-get update
$ sudo apt-get dist-upgrade
can execute cleanly.
Once you have your existing packages converted to the Ubuntu versions, it's time to pull in the core Ubuntu packages:
$ sudo apt-get install ubuntu-standard ubuntu-desktop