今天我确实更新了我的系统,该系统最初是按照以下方式安装的Ubuntu 20.04 ZFS 上的根目录。更新时,我看到 grub 有一个更新,但无法运行附带的 grub-install。
因此我决定按照指南重新进行 grub 安装:
grub-install --target=x86_64-efi --efi-directory=/boot/efi \
--bootloader-id=ubuntu --recheck --no-floppy
cp -a /boot/efi/EFI /boot/efi2
grub-install --target=x86_64-efi --efi-directory=/boot/efi2 \
--bootloader-id=ubuntu-2 --recheck --no-floppy
(我在镜子上)
也失败了。我仍然可以成功重启系统,但我猜它仍然运行旧的 grub 二进制文件。
我是唯一遇到此问题的人吗?它的发生率是多少?
以下是更多信息:
dpkg -l | grep grub
ii grub-common 2.04-1ubuntu26.7 amd64 GRand Unified Bootloader (common files)
ii grub-efi-amd64 2.04-1ubuntu26.7 amd64 GRand Unified Bootloader, version 2 (EFI-AMD64 version)
ii grub-efi-amd64-bin 2.04-1ubuntu26.7 amd64 GRand Unified Bootloader, version 2 (EFI-AMD64 modules)
ii grub-efi-amd64-signed 1.142.9+2.04-1ubuntu26.7 amd64 GRand Unified Bootloader, version 2 (EFI-AMD64 version, signed)
ii grub2-common 2.04-1ubuntu26.7 amd64 GRand Unified Bootloader (common files for version 2)
跑步 :
grub-install --target=x86_64-efi --efi-directory=/boot/efi \ --bootloader-id=ubuntu --recheck --no-floppy -vv
...
grub-install: info: writing 656 bytes of a fixup block starting at 0xe000.
grub-install: info: adding a relocation entry for 0xf010.
grub-install: info: adding a relocation entry for 0xf018.
grub-install: info: adding a relocation entry for 0xf028.
grub-install: info: adding a relocation entry for 0xf030.
grub-install: info: adding a relocation entry for 0xf040.
grub-install: info: adding a relocation entry for 0xf048.
grub-install: info: adding 393 padding fixup entries.
grub-install: info: writing 808 bytes of a fixup block starting at 0xf000.
grub-install: info: reading /usr/lib/grub/x86_64-efi/crypto.mod.
grub-install: info: reading /usr/lib/grub/x86_64-efi/gcry_crc.mod.
grub-install: info: reading /usr/lib/grub/x86_64-efi/gzio.mod.
grub-install: info: reading /usr/lib/grub/x86_64-efi/zfs.mod.
grub-install: info: reading /usr/lib/grub/x86_64-efi/part_gpt.mod.
grub-install: info: reading /usr/lib/grub/x86_64-efi/search_fs_uuid.mod.
grub-install: info: reading /boot/grub/x86_64-efi/load.cfg.
grub-install: info: kernel_img=0x556fae524f00, kernel_size=0x1a000.
grub-install: info: the core size is 0x31b40.
grub-install: info: writing 0x34000 bytes.
grub-install: info: copying `/usr/lib/grub/x86_64-efi-signed/grubx64.efi.signed' -> `/boot/efi2/EFI/ubuntu-2/grubx64.efi'.
grub-install: info: copying `/usr/lib/shim/shimx64.efi.signed' -> `/boot/efi2/EFI/ubuntu-2/shimx64.efi'.
grub-install: info: copying `/usr/lib/shim/mmx64.efi' -> `/boot/efi2/EFI/ubuntu-2/mmx64.efi'.
grub-install: info: copying `/usr/lib/shim/BOOTX64.CSV' -> `/boot/efi2/EFI/ubuntu-2/BOOTX64.CSV'.
grub-install: info: copying `/boot/grub/x86_64-efi/load.cfg' -> `/boot/efi2/EFI/ubuntu-2/grub.cfg'.
grub-install: info: copying `/usr/lib/shim/shimx64.efi.signed' -> `/boot/efi2/EFI/BOOT/BOOTX64.EFI'.
grub-install: info: copying `/usr/lib/shim/fbx64.efi' -> `/boot/efi2/EFI/BOOT/fbx64.efi'.
grub-install: info: copying `/usr/lib/shim/mmx64.efi' -> `/boot/efi2/EFI/BOOT/mmx64.efi'.
grub-install: info: Registering with EFI: distributor = `ubuntu-2', path = `\EFI\ubuntu-2\shimx64.efi', ESP at hostdisk//dev/sdl,gpt1.
grub-install: warning: Internal error.
grub-install: error: failed to register the EFI boot entry: Operation not permitted.
我该如何解决 ?
答案1
运行“grub-install --no-nvram”似乎已经解决了这个问题。解决方案来自https://bugs.launchpad.net/ubuntu/+source/grub2-signed/+bug/1872212