Ubuntu 21.04: apt upgrade failing (due to shim-signed not finding /dev/sda1)

ua flag

I want to upgrade to latest 21.04 and then run do-release-upgrade afterwards to 21.10.

this is the error that I get

# apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  linux-headers-5.11.0-38 linux-headers-5.11.0-38-generic
  linux-modules-extra-5.11.0-38-generic net-tools
Use 'apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up shim-signed (1.51+15.4-0ubuntu9) ...
mount: /var/lib/grub/esp: special device /dev/sda1 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:
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)

/dev/sda1 does not exists because my EFI partition is located in /dev/sdi1

Any ideas on how to fix? thanks

here's the output of parted:

# parted /dev/sdi
GNU Parted 3.4
Using /dev/sdi
Welcome to GNU Parted! Type 'help' to view a list of

(parted) print
Model: VMware Virtual disk (scsi)
Disk /dev/sdi: 34.4GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system  Name  Flags
 1      1049kB  538MB   537MB   fat32              boot, esp
 2      538MB   1612MB  1074MB  ext4
 3      1612MB  34.4GB  32.7GB

contents of /etc/fstab

/dev/disk/by-id/dm-uuid-LVM-nrjth7SUVJTdL5Rxh9idtQUQfpFMyLU93hVmigxfgsrsKi7EO9Oe8gP3gn54sIMs5b3AV / ext4 defaults 0 1
/dev/disk/by-uuid/061a9dc8-9adb-4d48-a24c-62c9323494bd44 /boot ext4 defaults 0 1
/dev/disk/by-uuid/937346-01E4 /boot/efi vfat defaults 0 1
/swap.img       none    swap    sw      0       0

here's the output of lsblk

# lsblk
loop0              7:0    0 55.5M  1 loop /snap/core18/2253
loop1              7:1    0 43.4M  1 loop /snap/snapd/14549
loop2              7:2    0 61.8M  1 loop /snap/core20/1242
loop3              7:3    0 55.5M  1 loop /snap/core18/2284
loop4              7:4    0 76.2M  1 loop /snap/lxd/22292
loop5              7:5    0 73.1M  1 loop /snap/lxd/21902
loop6              7:6    0 61.9M  1 loop /snap/core20/1328
loop7              7:7    0 42.2M  1 loop /snap/snapd/14066
sda                8:0    0  5.5T  0 disk
sdb                8:16   0  5.5T  0 disk
sdc                8:32   0  5.5T  0 disk
sdd                8:48   0  5.5T  0 disk
sde                8:64   0  5.5T  0 disk
sdf                8:80   0  5.5T  0 disk
sdg                8:96   0  5.5T  0 disk
sdh                8:112  0  5.5T  0 disk
sdi                8:128  0   32G  0 disk
├─sdi1             8:129  0  512M  0 part /boot/efi
├─sdi2             8:130  0    1G  0 part /boot
└─sdi3             8:131  0 30.5G  0 part
                 253:0    0 30.5G  0 lvm  /
sr0               11:0    1 1024M  0 rom
guiverc avatar
cn flag
You haven't provided OS & release details; the package is used by multiple releases (*one does have a known issue in certain circumstances*) so we're somewhat limited.
ua flag
@guiverc edited original post. Thanks
us flag
It may be easier to perform a fresh installation of 21.10.

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.