an auto update of my server failed and I found this error in the log:
Setting up shim-signed (1.51.4+15.8-0ubuntu1) ...
mount: /var/lib/grub/esp: special device /dev/disk/by-id/nvme-Amazon_Elastic_Block_Store_vol03d89b2c32d75dfae-part15 does not exist.
dpkg: error processing package shim-signed (--configure):
installed shim-signed package post-installation script subprocess returned error exit status 32
I guess the problem is related to this case, but its strange, I didn't change any volume: Error upgrading grub-efi-amd64-signed - special device [old SSD] does not exist
User plaisthos recommend to edit this cache file:
/var/cache/debconf/config.dat
and to run
sudo dpkg --configure -a
But what's exactly should be edited? And is it save to reboot the system in this state or could this even solve the problem? Unfortunately the problem occurred on a live system and I want to be very cautiousness to prevent any down times.
My System:
AWS EC2 Server instance, running Ubuntu 22.04.4 LTS and Plesk
sudo lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
loop0 7:0 0 21.8M 1 loop /snap/amazon-ssm-agent/7984
loop1 7:1 0 21.9M 1 loop /snap/amazon-ssm-agent/7994
loop2 7:2 0 49.1M 1 loop /snap/core18/2810
loop3 7:3 0 49.1M 1 loop /snap/core18/2826
loop4 7:4 0 59.8M 1 loop /snap/core20/2267
loop5 7:5 0 59.8M 1 loop /snap/core20/2321
loop6 7:6 0 77.4M 1 loop /snap/lxd/28384
loop7 7:7 0 77.4M 1 loop /snap/lxd/29353
loop8 7:8 0 33.7M 1 loop /snap/snapd/21467
loop9 7:9 0 33.7M 1 loop /snap/snapd/21761
nvme0n1 259:0 0 512G 0 disk
├─nvme0n1p1 259:1 0 511.9G 0 part /
└─nvme0n1p15 259:2 0 99M 0 part /boot/efi
sudo df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 496G 375G 122G 76% /
tmpfs 31G 0 31G 0% /dev/shm
tmpfs 13G 1.1M 13G 1% /run
tmpfs 5.0M 28K 5.0M 1% /run/lock
efivarfs 128K 3.3K 125K 3% /sys/firmware/efi/efivars
/dev/nvme0n1p15 98M 6.3M 92M 7% /boot/efi
tmpfs 6.2G 4.0K 6.2G 1% /run/user/1000
part of the /var/cache/debconf/config.dat
Name: grub-efi/install_devices
Template: grub-efi/install_devices
Value: /dev/disk/by-id/nvme-Amazon_Elastic_Block_Store_vol03d89b2c32d75dfae-part15
Owners: grub-common, grub-efi-arm64, grub-pc
Flags: seen
Variables:
CHOICES = /dev/nvme0n1p15 (103 MB; /boot/efi) on 68719 MB Amazon Elastic Block Store
RAW_CHOICES = /dev/disk/by-id/nvme-Amazon_Elastic_Block_Store_vol09ffbe328bafbd0eb-part15
Name: grub-efi/install_devices_disks_changed
Template: grub-efi/install_devices_disks_changed
Value: /dev/disk/by-id/nvme-Amazon_Elastic_Block_Store_vol03d89b2c32d75dfae-part15, /dev/disk/by-id/nvme-Amazon_Elastic_Block_Store_vol049f91243e2980923-part15
Owners: grub-common, grub-efi-arm64
Variables:
CHOICES = /dev/nvme0n1p15 (103 MB; /boot/efi) on 549755 MB Amazon Elastic Block Store
RAW_CHOICES = /dev/disk/by-id/nvme-Amazon_Elastic_Block_Store_vol049f91243e2980923-part15
Name: grub-efi/install_devices_empty
Template: grub-efi/install_devices_empty
Owners: grub-common, grub-efi-arm64
Name: grub-efi/install_devices_failed
Template: grub-efi/install_devices_failed
Owners: grub-common, grub-efi-arm64
Name: grub-efi/partition_description
Template: grub-efi/partition_description
Owners: grub-common, grub-efi-arm64
Variables:
DEVICE = /dev/nvme0n1p15
DISK_MODEL = Amazon Elastic Block Store
DISK_SIZE = 549755
PATH = /boot/efi
SIZE = 103
Name: grub2/kfreebsd_cmdline
Template: grub2/kfreebsd_cmdline
Owners: grub-efi-arm64
Name: grub2/kfreebsd_cmdline_default
Template: grub2/kfreebsd_cmdline_default
Owners: grub-efi-arm64
Name: grub2/linux_cmdline
Template: grub2/linux_cmdline
Value:
Owners: grub-efi-arm64
Name: grub2/linux_cmdline_default
Template: grub2/linux_cmdline_default
Value: quiet splash
Owners: grub-efi-arm64
Name: grub2/no_efi_extra_removable
Template: grub2/no_efi_extra_removable
Owners: grub-efi-arm64
Name: grub2/unsigned_kernels
Template: grub2/unsigned_kernels
Owners: grub-efi-arm64
Name: grub2/unsigned_kernels_title
Template: grub2/unsigned_kernels_title
Owners: grub-efi-arm64
Name: grub2/update_nvram
Template: grub2/update_nvram
Value: true
Owners: grub-efi-arm64
cat /etc/fstab
LABEL=cloudimg-rootfs / ext4 discard,errors=remount-ro 0 1
LABEL=UEFI /boot/efi vfat umask=0077 0 1
/swapfile none swap sw 0 0
sudo parted -l
Model: Amazon Elastic Block Store (nvme)
Disk /dev/nvme0n1: 550GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
15 1049kB 105MB 104MB fat32 boot, esp
1 106MB 550GB 550GB ext4
EDIT
As suggested by David DE, I've looked into this thread: Error processing package shim-signed
I'm not an expert, but imo my problem is of a different nature. To me it looks like that there is an issue with the disk id (error: "does not exist") for the mounting point /boot/efi which changes for some reason.
In the cache file (/var/cache/debconf/config.dat) I see:
nvme-Amazon_Elastic_Block_Store_vol03d89b2c32d75dfae-part15
vs
nvme-Amazon_Elastic_Block_Store_vol09ffbe328bafbd0eb-part15
vs
nvme-Amazon_Elastic_Block_Store_vol049f91243e2980923-part15
How can I figure out the correct id and how to fix the setup? Can I just delete the quoted part of the cache file (/var/cache/debconf/config.dat) and regenerate it with the updated/corrected disk id?
EDIT:
This worked for my case as well (Error upgrading grub-efi-amd64-signed - special device [old SSD] does not exist)
echo PURGE | debconf-communicate grub-common
echo PURGE | debconf-communicate grub-pc
dpkg --configure -a