我在多个 ubuntu 18.04 服务器上有这个问题。
在常规期间,apt update && apt upgrade
我收到此错误:
Setting up grub-efi-amd64-signed (1.167~18.04.1+2.04-1ubuntu44) ...
Installing for x86_64-efi platform.
grub-install: error: cannot find EFI directory.
dpkg: error processing package grub-efi-amd64-signed (--configure):
installed grub-efi-amd64-signed package post-installation script subprocess returned error exit status 1
我在服务器上,我不使用 grub,也从未听说过 EFI,据我所知,我没有更改它的任何设置。
我在 /boot 上安装了 /dev/md1,我看到我有一个目录 /boot/efi,但它是空的。
我该如何解决这个问题?
fdisk -l:
Disk /dev/sda: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: F4BBD515-6E5E-4152-AD41-6D80A4A69583
Device Start End Sectors Size Type
/dev/sda1 40 2048 2009 1004.5K BIOS boot
/dev/sda2 4096 3905976319 3905972224 1.8T Linux RAID
/dev/sda3 3905976320 3907022847 1046528 511M Linux swap
Disk /dev/sdb: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 2C2D425C-9EAF-472D-8820-068D587A47D0
Device Start End Sectors Size Type
/dev/sdb1 40 2048 2009 1004.5K BIOS boot
/dev/sdb2 4096 3905976319 3905972224 1.8T Linux RAID
/dev/sdb3 3905976320 3907022847 1046528 511M Linux swap
Disk /dev/md2: 1.8 TiB, 1999857713152 bytes, 3905972096 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
fdisk -l
,第二台服务器:
Disk /dev/sda: 223.6 GiB, 240057409536 bytes, 468862128 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x762b7381
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 4096 1050623 1046528 511M fd Linux raid autodetect
/dev/sda2 1050624 467808255 466757632 222.6G fd Linux raid autodetect
/dev/sda3 467808256 468854783 1046528 511M 82 Linux swap / Solaris
Disk /dev/md2: 445.1 GiB, 477958766592 bytes, 933513216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 524288 bytes / 1048576 bytes
Disk /dev/md1: 511 MiB, 535756800 bytes, 1046400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/sdb: 223.6 GiB, 240057409536 bytes, 468862128 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x41167758
Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 4096 1050623 1046528 511M fd Linux raid autodetect
/dev/sdb2 1050624 467808255 466757632 222.6G fd Linux raid autodetect
/dev/sdb3 467808256 468854783 1046528 511M 82 Linux swap / Solaris
我在 Legacy BIOS 启动时使用 18.04。我只有这些 grub 包:
可能您必须删除 grub-efi 软件包:
祝你好运!