On a brand new server I am trying to run the update and upgrade but I get 2 packages popping out an error.
Specifically:
~ # 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)
Found several solutions both here and on stack exchange that suggest to run the following:
sudo apt-get purge grub\*
sudo apt-get install grub-efi
sudo apt-get autoremove
sudo update-grub
But running just the first line I get the following:
~ # 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.
I even tried to run the rest of the commands but nothing really changed. I am stuck with this annoying error.
Tried removing shim-signed so that I can remove grub and reinstall it:
~ # 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.
tried to configure 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
All this is on a bare metal server hosted in Hetzner.
update:
@Organic Marble Offered to help (thanks) and asked for the efi flags of the ssds. Upon suggestion I used parted -l
Here is the result:
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
sudo parted -l
will show the partition flags