我刚刚在 Ubuntu 16.04 安装上运行 apt-get upgrade,出现此错误:
Do you want to continue? [Y/n] Y
Setting up shim-signed (1.32~16.04.1+0.9+1474479173.6c180c6-1ubuntu1) ...
Installing for x86_64-efi platform.
grub-install: error: /boot/efi doesn't look like an EFI partition.
.
dpkg: error processing package shim-signed (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
shim-signed
E: Sub-process /usr/bin/dpkg returned an error code (1)
的输出df -h
是
polesemi@pcsensori34:~$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 7,8G 0 7,8G 0% /dev
tmpfs 1,6G 9,5M 1,6G 1% /run
/dev/sdb1 213G 135G 68G 67% /
tmpfs 7,8G 316M 7,5G 4% /dev/shm
tmpfs 5,0M 4,0K 5,0M 1% /run/lock
tmpfs 7,8G 0 7,8G 0% /sys/fs/cgroup
[email protected]:/home/polesemi 5,7T 2,1T 3,6T 37% /home/polesemi/homeDei
[email protected]:/nfsd/signet/ns/polese 475G 266G 210G 56% /home/polesemi/nsDei
tmpfs 1,6G 108K 1,6G 1% /run/user/1000
的输出parted
是
polesemi@pcsensori34:~$ sudo parted -l
[sudo] password for polesemi:
Model: ATA ST500DM002-1SB10 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 32,3kB 41,1MB 41,1MB primary fat16 diag
2 41,9MB 12,6GB 12,6GB primary ntfs boot, diag
3 12,6GB 500GB 487GB primary ntfs
Model: ATA KINGSTON SHSS37A (scsi)
Disk /dev/sdb: 240GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
3 1049kB 212MB 211MB fat32 efi boot, esp
1 212MB 232GB 232GB ext4
2 232GB 240GB 8000MB linux-swap(v1)
我该怎么做才能修复它?谢谢。
答案1
这个问题在这里得到了解决:https://bugs.launchpad.net/ubuntu/+source/shim-signed/+bug/1736080 基本上,/boot/efi 分区未正确挂载(/etc/fstab 文件中的 UUID 不匹配)。一旦我设法挂载它,软件包就可以正确安装。
答案2
马克,尽力帮忙
这刚刚发生在我身上,问题是我的分区在 /etc/fstab 中被“注释掉了”。
检查运行
cat /etc/fstab
我打开 GParted 确认分区的 UUID,全部正确。然后我“取消注释”所有分区,果然全部注释掉了?奇怪!!重启 Ubuntu,更新/升级,错误仍然存在。
命令是
sudo gedit /etc/fstab
对于新手来说,重申一下 - “取消注释” 意味着 - 删除 UUID 行前面的 '#' (数字符号) 例如
****#****UUID=92a37016-1b32-4743-973e-e792bb3c48ca / ext4 错误=remount-ro 0 1 读取
UUID=92a37016-1b32-4743-973e-e792bb3c48ca / ext4 错误=remount-ro 0 1
我希望这能有所帮助,马克