2

I'm working via SSH (no gui) on an Ubuntu 22.04.4 LTS server on a hosted VM. An update to the shim-signed package (to 1.51.4+15.8-0ubuntu1) consistently fails with the error

Setting up shim-signed (1.51.4+15.8-0ubuntu1) ... mount: /var/lib/grub/esp: special device /dev/disk/by-id/scsi-36000c2975c86d58beaecefea23c29f2d-part1 does not exist.

dpkg: error processing package shim-signed (--configure): installed shim-signed package post-installation script subprocess returned error exit status 32

Errors were encountered while processing: shim-signed needrestart is being skipped since dpkg has failed

This then exits the whole update process.

The error message is correct that /dev/disk/by-id/scsi-36000c2975c86d58beaecefea23c29f2d-part1 does not exist, but it never has, to my knowlegde.

If I grep for this file path string, to find where it may be configured, I only see one result in a config file, which is in /var/cache/debconf/config.dat:

Name: grub-efi/install_devices
Template: grub-efi/install_devices
Value: /dev/disk/by-id/scsi-36000c2975c86d58beaecefea23c29f2d-part1
Owners: grub-common, grub-efi-amd64, grub-pc
Flags: seen
Variables:
 CHOICES = /dev/sda1 (1073 MB; /boot/efi) on 53687 MB Virtual_disk
 RAW_CHOICES = /dev/disk/by-id/scsi-36000c2975c86d58beaecefea23c29f2d-part1

fstab shows that the boot/efi location is: /dev/disk/by-uuid/D379-891B /boot/efi vfat defaults 0 1

blkid shows that this device is indeed mounted at /dev/sda1 but the "value" and "raw_choices" settings in the config.dat file seem to be incorrect about the path by ID to the device.

I don't usually play with the debconf settings (and I have never changed this value) so I would like to ask more experienced people whether this setting for grub-efi/install-devices is likely to be the cause of my problem and would correcting the path /dev/disk/by-id/scsi-36000c2975c86d58beaecefea23c29f2d-part1 to /dev/disk/by-uuid/D379-891B likely solve this problem?

Ambulare
  • 201

1 Answers1

8

After a bunch of trial and error, the only working solution that I found was:

  1. Check what the current drive mounted on /boot/efi is:
cat /etc/fstab | grep efi

Output:

/dev/disk/by-uuid/D123-4355C /boot/efi vfat defaults 0 1
  1. Manually modify the value for grub-efi/install_devices found in /var/cache/debconf/config.dat so it shows the current device path by id, found above.
Name: grub-efi/install_devices
Template: grub-efi/install_devices
Value: /dev/disk/by-uuid/D123-4355C
Owners: grub-common, grub-efi-amd64, grub-pc
Flags: seen
Variables:
 CHOICES = /dev/sda1 (1073 MB; /boot/efi) on 53687 MB Virtual_disk
 RAW_CHOICES = /dev/disk/by-uuid/D123-4355C

Then run apt upgrade to (successfully) complete the upgrades.

I have read in many places that manually modifying the debconf file is a bad idea, but it's the only solution I found that allowed my system to successfully complete its package upgrades.

Ambulare
  • 201