Errores encontrados al procesar la actualización.

Errores encontrados al procesar la actualización.

En un servidor nuevo, estoy intentando ejecutar la actualización y la actualización, pero aparecen 2 paquetes con un error.

Específicamente:

~ # apt update && apt -y upgrade && apt -y install curl wget sudo
Hit:1 http://mirror.hetzner.com/ubuntu/packages jammy InRelease
Hit:2 http://mirror.hetzner.com/ubuntu/packages jammy-updates InRelease
Hit:3 http://mirror.hetzner.com/ubuntu/packages jammy-backports InRelease
Hit:4 http://mirror.hetzner.com/ubuntu/packages jammy-security InRelease
Hit:5 http://security.ubuntu.com/ubuntu jammy-security InRelease
Hit:6 http://de.archive.ubuntu.com/ubuntu jammy InRelease
Get:7 http://de.archive.ubuntu.com/ubuntu jammy-updates InRelease [114 kB]
Get:8 http://de.archive.ubuntu.com/ubuntu jammy-backports InRelease [99.8 kB]
Fetched 214 kB in 0s (442 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
#
# News about significant security updates, features and services will
# appear here to raise awareness and perhaps tease /r/Linux ;)
# Use 'pro config set apt_news=false' to hide this and future APT news.
#
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up grub-efi-amd64-signed (1.182~22.04.1+2.06-2ubuntu10) ...
mount: /var/lib/grub/esp: special device /dev/sda15 does not exist.
dpkg: error processing package grub-efi-amd64-signed (--configure):
 installed grub-efi-amd64-signed package post-installation script subprocess returned error exit status 32
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          dpkg: dependency problems prevent configuration of shim-signed:
 shim-signed depends on grub-efi-amd64-signed | grub-efi-arm64-signed; however:
  Package grub-efi-amd64-signed is not configured yet.
  Package grub-efi-arm64-signed is not installed.

dpkg: error processing package shim-signed (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 grub-efi-amd64-signed
 shim-signed
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)

Encontré varias soluciones tanto aquí como en el intercambio de pila que sugieren ejecutar lo siguiente:

sudo apt-get purge grub\*
sudo apt-get install grub-efi
sudo apt-get autoremove
sudo update-grub

Pero al ejecutar solo la primera línea obtengo lo siguiente:

~ # sudo apt-get purge grub\*
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'grub-rescue-pc' for glob 'grub*'
Note, selecting 'grub-xen' for glob 'grub*'
Note, selecting 'grub2' for glob 'grub*'
Note, selecting 'grub-splashimages' for glob 'grub*'
Note, selecting 'grubzfs-testsuite' for glob 'grub*'
Note, selecting 'grub-coreboot' for glob 'grub*'
Note, selecting 'grub-legacy-doc' for glob 'grub*'
Note, selecting 'grub-legacy-ec2' for glob 'grub*'
Note, selecting 'grub-emu-dbg' for glob 'grub*'
Note, selecting 'grub-pc-bin' for glob 'grub*'
Note, selecting 'grub-pc-dbg' for glob 'grub*'
Note, selecting 'grub-gfxpayload-lists' for glob 'grub*'
Note, selecting 'grub-xen-host' for glob 'grub*'
Note, selecting 'grub2-themes-ubuntustudio' for glob 'grub*'
Note, selecting 'grub-ieee1275-bin' for glob 'grub*'
Note, selecting 'grub-cloud-amd64' for glob 'grub*'
Note, selecting 'grub-ieee1275-dbg' for glob 'grub*'
Note, selecting 'grub-imageboot' for glob 'grub*'
Note, selecting 'grub-efi-arm64' for glob 'grub*'
Note, selecting 'grub-efi-amd64' for glob 'grub*'
Note, selecting 'grub-efi-arm' for glob 'grub*'
Note, selecting 'grub-yeeloong' for glob 'grub*'
Note, selecting 'grub' for glob 'grub*'
Note, selecting 'grub-ipxe' for glob 'grub*'
Note, selecting 'grub-firmware-qemu' for glob 'grub*'
Note, selecting 'grub-efi-amd64-signed' for glob 'grub*'
Note, selecting 'grub-coreboot-bin' for glob 'grub*'
Note, selecting 'grub-efi-arm64-signed' for glob 'grub*'
Note, selecting 'grub-coreboot-dbg' for glob 'grub*'
Note, selecting 'grub-theme-starfield' for glob 'grub*'
Note, selecting 'grub-efi-amd64-bin' for glob 'grub*'
Note, selecting 'grub2-common' for glob 'grub*'
Note, selecting 'grub-legacy' for glob 'grub*'
Note, selecting 'grub-efi-amd64-signed-template' for glob 'grub*'
Note, selecting 'grub-efi-amd64-dbg' for glob 'grub*'
Note, selecting 'grub-ieee1275' for glob 'grub*'
Note, selecting 'grub-uboot' for glob 'grub*'
Note, selecting 'grub-common' for glob 'grub*'
Note, selecting 'grub2-splashimages' for glob 'grub*'
Note, selecting 'grub-efi-ia32-bin' for glob 'grub*'
Note, selecting 'grub-efi-ia32-dbg' for glob 'grub*'
Note, selecting 'grub2-themes-ubuntu-mate' for glob 'grub*'
Note, selecting 'grub-invaders' for glob 'grub*'
Note, selecting 'grub-linuxbios' for glob 'grub*'
Note, selecting 'grub-xen-bin' for glob 'grub*'
Note, selecting 'grub-efi-ia32' for glob 'grub*'
Note, selecting 'grub-efi-ia64' for glob 'grub*'
Note, selecting 'grub-xen-dbg' for glob 'grub*'
Note, selecting 'grub-pc' for glob 'grub*'
Note, selecting 'grub-doc' for glob 'grub*'
Note, selecting 'grub-efi' for glob 'grub*'
Note, selecting 'grub-emu' for glob 'grub*'
Note, selecting 'grub-theme-breeze' for glob 'grub*'
Package 'grub-efi-ia64' is not installed, so not removed
Package 'grub-yeeloong' is not installed, so not removed
Package 'grub' is not installed, so not removed
Package 'grub-legacy' is not installed, so not removed
Package 'grub-legacy-doc' is not installed, so not removed
Package 'grub-cloud-amd64' is not installed, so not removed
Package 'grub-doc' is not installed, so not removed
Package 'grub-efi-arm' is not installed, so not removed
Package 'grub-efi-arm64' is not installed, so not removed
Package 'grub-uboot' is not installed, so not removed
Package 'grub-efi-arm64-signed' is not installed, so not removed
Package 'grub-efi' is not installed, so not removed
Package 'grub-efi-ia32' is not installed, so not removed
Package 'grub-efi-ia32-bin' is not installed, so not removed
Package 'grub-efi-ia32-dbg' is not installed, so not removed
Package 'grub-ieee1275' is not installed, so not removed
Package 'grub-ieee1275-bin' is not installed, so not removed
Package 'grub-ieee1275-dbg' is not installed, so not removed
Package 'grub-ipxe' is not installed, so not removed
Package 'grub-legacy-ec2' is not installed, so not removed
Package 'grub-pc-dbg' is not installed, so not removed
Package 'grub-xen' is not installed, so not removed
Package 'grub-xen-bin' is not installed, so not removed
Package 'grub-xen-dbg' is not installed, so not removed
Package 'grub-coreboot' is not installed, so not removed
Package 'grub-coreboot-bin' is not installed, so not removed
Package 'grub-coreboot-dbg' is not installed, so not removed
Package 'grub-efi-amd64-signed-template' is not installed, so not removed
Package 'grub-emu' is not installed, so not removed
Package 'grub-emu-dbg' is not installed, so not removed
Package 'grub-firmware-qemu' is not installed, so not removed
Package 'grub-imageboot' is not installed, so not removed
Package 'grub-invaders' is not installed, so not removed
Package 'grub-linuxbios' is not installed, so not removed
Package 'grub-rescue-pc' is not installed, so not removed
Package 'grub-splashimages' is not installed, so not removed
Package 'grub-theme-breeze' is not installed, so not removed
Package 'grub-theme-starfield' is not installed, so not removed
Package 'grub-xen-host' is not installed, so not removed
Package 'grub2' is not installed, so not removed
Package 'grub2-splashimages' is not installed, so not removed
Package 'grub2-themes-ubuntu-mate' is not installed, so not removed
Package 'grub2-themes-ubuntustudio' is not installed, so not removed
Package 'grubzfs-testsuite' is not installed, so not removed
Package 'grub-efi-amd64-dbg' is not installed, so not removed
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 shim-signed : Depends: grub-efi-amd64-signed but it is not going to be installed or
                        grub-efi-arm64-signed but it is not installable
               Depends: grub2-common (>= 2.04-1ubuntu24) but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

Incluso intenté ejecutar el resto de los comandos pero nada cambió realmente. Estoy atrapado con este molesto error.

Intenté eliminar shim-signed para poder eliminar grub y reinstalarlo:

 ~ # apt remove grub-efi-amd64-signed shim-signed -f
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
  grub-efi-amd64-signed shim-signed
WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
  shim-signed grub-efi-amd64-signed (due to shim-signed)
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 8,603 kB disk space will be freed.
E: Removing essential system-critical packages is not permitted. This might break the system.

Intenté configurar dpkg:

 ~ # sudo dpkg --configure -a
Setting up grub-efi-amd64-signed (1.182~22.04.1+2.06-2ubuntu10) ...
mount: /var/lib/grub/esp: special device /dev/sda15 does not exist.
dpkg: error processing package grub-efi-amd64-signed (--configure):
 installed grub-efi-amd64-signed package post-installation script subprocess returned error exit status 32
dpkg: dependency problems prevent configuration of shim-signed:
 shim-signed depends on grub-efi-amd64-signed | grub-efi-arm64-signed; however:
  Package grub-efi-amd64-signed is not configured yet.
  Package grub-efi-arm64-signed is not installed.

dpkg: error processing package shim-signed (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 grub-efi-amd64-signed
 shim-signed

Todo esto está en un servidor bare metal alojado en Hetzner.

actualización: @Organic Marble Se ofreció a ayudar (gracias) y solicitó las banderas efi de los SSD. Por sugerencia utilicé parted -l Aquí está el resultado:

Disk /dev/nvme0n1: 512GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  34.4GB  34.4GB  primary               raid
 2      34.4GB  35.4GB  1074MB  primary               raid
 3      35.4GB  512GB   477GB   primary               raid


Model: Linux Software RAID Array (md)
Disk /dev/md2: 477GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags:

Number  Start  End    Size   File system  Flags
 1      0.00B  477GB  477GB  ext4


Model: Linux Software RAID Array (md)
Disk /dev/md0: 34.3GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags:

Number  Start  End     Size    File system     Flags
 1      0.00B  34.3GB  34.3GB  linux-swap(v1)


Model: SAMSUNG MZVL2512HCJQ-00B00 (nvme)
Disk /dev/nvme1n1: 512GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  34.4GB  34.4GB  primary               raid
 2      34.4GB  35.4GB  1074MB  primary               raid
 3      35.4GB  512GB   477GB   primary               raid


Model: Linux Software RAID Array (md)
Disk /dev/md1: 1072MB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags:

Number  Start  End     Size    File system  Flags
 1      0.00B  1072MB  1072MB  ext3

Respuesta1

También tuve el mismo problema en un servidor bare metal alojado en Hetzner.

La configuración de mi servidor es personalizada (se agregaron 2 SSD adicionales)

Mi configuración de partición también es personalizada. Fusioné la capacidad de todas las unidades usando LVM.

Mi solución fue editar /var/cache/debconf/config.dat manualmente y encontrar la ubicación en el archivo donde se almacenan en caché los nombres de partición antiguos que ya no están disponibles y eliminar cada bloque. (eliminar párrafos enteros separados por líneas en blanco)

Lista de bloques que había eliminado:

Name: grub-efi/install_devices
Template: grub-efi/install_devices
Value: /dev/sda15
Owners: grub-common, grub-efi-amd64, grub-pc
Flags: seen
Variables:
 CHOICES = /dev/sda2 (268 MB; /boot/efi) on 4194 MB QEMU_HARDDISK
 RAW_CHOICES = /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive0-part2

Name: grub-efi/install_devices_disks_changed
Template: grub-efi/install_devices_disks_changed
Value: /dev/sda15
Owners: grub-common, grub-efi-amd64
Flags: seen
Variables:
 CHOICES = 
 RAW_CHOICES = 

Name: grub-efi/partition_description
Template: grub-efi/partition_description
Owners: grub-common, grub-efi-amd64
Variables:
 DEVICE = /dev/sda2
 DISK_MODEL = QEMU_HARDDISK
 DISK_SIZE = 4194
 PATH = /boot/efi
 SIZE = 268

Luego ejecuté el siguiente comando (seleccione sí en caso de confirmación para continuar sin la configuración de grub)

sudo apt install -f 

Y finalmente:

update-grub

Me solucionó el problema. Parece que está relacionado con el script del instalador de Hetzner y el caché que crea durante la instalación y los cambios en la asignación de unidades lógicas que agregué después de la instalación.

información relacionada