Ubuntu 21.04:apt 升级失败(由于 shim-signed 未找到 /dev/sda1)

Ubuntu 21.04:apt 升级失败(由于 shim-signed 未找到 /dev/sda1)

我想升级到最新的 21.04,然后运行 ​​do-release-upgrade 到 21.10。

这是我得到的错误

# 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-image-5.11.0-38-generic
  linux-modules-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:
 shim-signed
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)

/dev/sda1 不存在,因为我的 EFI 分区位于 /dev/sdi1

有什么解决方法吗?谢谢


这是 parted 的输出:

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

(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

/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

这是 lsblk 的输出

# lsblk
NAME             MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
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
  └─ubuntu--vg-ubuntu--lv
                 253:0    0 30.5G  0 lvm  /
sr0               11:0    1 1024M  0 rom

相关内容