Actualizar PROXMOX 7a8 y 8a9

  1. Actualizar Porxmox 7 a Proxmox 8.

Ponte al último 7.4 y ejecuta el precheck

apt update
apt dist-upgrade
pveversion # Debe mostrar 7.4-15 o más nuevo
pve7to8 –full # Repite hasta que no queden avisos críticos

Ajustar repos (Debian 12 “bookworm” + PVE 8)

sed -i ‘s/bullseye/bookworm/g’ /etc/apt/sources.list
cat >/etc/apt/sources.list.d/pve-no-subscription.list <<‘EOF’
deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription
EOF

Sube a Debian 12 / PVE 8

apt update
apt dist-upgrade       #en todos los preguntas hay que dar NO, para mantener sin subscripcion.

Ejecutar el script que copia el GRUB en todas las particiones:

#!/bin/bash

set -euo pipefail

overall_newest_mtime=0
while read -r partition; do
    mountpoint=$(mktemp -d)
    mount "${partition}" "${mountpoint}"
    newest_mtime=$(find "${mountpoint}" -type f -printf "%T@\n" | cut -d. -f1 | sort -n | tail -n1)
    if [[ $newest_mtime -gt $overall_newest_mtime ]]; then
        overall_newest_mtime=${newest_mtime}
        newest_esp=${partition}
        echo "${partition} is currently the newest ESP with a file modified at $(date -d @"${newest_mtime}" -Is)"
    fi
    umount "${mountpoint}"
    rmdir "${mountpoint}"
done < <(blkid -o device -t LABEL=EFI_SYSPART)

newest_esp_mountpoint=$(mktemp -d)
mount "${newest_esp}" "${newest_esp_mountpoint}"
while read -r partition; do
    if [[ "${partition}" == "${newest_esp}" ]]; then
        continue
    fi
    echo "Copying data from ${newest_esp} to ${partition}"
    mountpoint=$(mktemp -d)
    mount "${partition}" "${mountpoint}"
    rsync -ax "${newest_esp_mountpoint}/" "${mountpoint}/"
    umount "${mountpoint}"
    rmdir "${mountpoint}"
done < <(blkid -o device -t LABEL=EFI_SYSPART)
umount "${newest_esp_mountpoint}"
rmdir "${newest_esp_mountpoint}"
echo "Done synchronizing ESPs"

reboot

2. Actualizar Proxmox 8 a Proxmox 9

Ponte al último 8.4 y ejecuta el precheck

apt update
apt dist-upgrade
pveversion # Debe ser 8.4.1 o más nuevo
pve8to9 –full # Repite hasta limpiar avisos importantes

Ajusta repos (Debian 13 “trixie” + PVE 9)

sed -i ‘s/bookworm/trixie/g’ /etc/apt/sources.list
sed -i ‘s/bookworm/trixie/g’ /etc/apt/sources.list.d/pve-no-subscription.list

Actualiza y reinicia al kernel nuevo

apt update

apt install libnss-myhostname #Instalar antes de reiniciar
apt dist-upgrade    #en todos los preguntas hay que dar NO, para mantener sin subscripcion.

Ejecutar el script que copia el GRUB en todas las particiones:

#!/bin/bash

set -euo pipefail

overall_newest_mtime=0
while read -r partition; do
    mountpoint=$(mktemp -d)
    mount "${partition}" "${mountpoint}"
    newest_mtime=$(find "${mountpoint}" -type f -printf "%T@\n" | cut -d. -f1 | sort -n | tail -n1)
    if [[ $newest_mtime -gt $overall_newest_mtime ]]; then
        overall_newest_mtime=${newest_mtime}
        newest_esp=${partition}
        echo "${partition} is currently the newest ESP with a file modified at $(date -d @"${newest_mtime}" -Is)"
    fi
    umount "${mountpoint}"
    rmdir "${mountpoint}"
done < <(blkid -o device -t LABEL=EFI_SYSPART)

newest_esp_mountpoint=$(mktemp -d)
mount "${newest_esp}" "${newest_esp_mountpoint}"
while read -r partition; do
    if [[ "${partition}" == "${newest_esp}" ]]; then
        continue
    fi
    echo "Copying data from ${newest_esp} to ${partition}"
    mountpoint=$(mktemp -d)
    mount "${partition}" "${mountpoint}"
    rsync -ax "${newest_esp_mountpoint}/" "${mountpoint}/"
    umount "${mountpoint}"
    rmdir "${mountpoint}"
done < <(blkid -o device -t LABEL=EFI_SYSPART)
umount "${newest_esp_mountpoint}"
rmdir "${newest_esp_mountpoint}"
echo "Done synchronizing ESPs"

reboot

Tu ventana semanal al mundo de la informática

Noticias, consejos y tendencias tecnológicas para mantenerte actualizado de forma sencilla.