代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/grub2 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Javier Martinez Canillas <[email protected]>
Date: Tue, 24 Apr 2018 02:16:38 +0200
Subject: [PATCH] Only attempt to query dev mounted in /boot/efi as boot dev on
EFI machines
The 10_linux script calls grub2-probe to probe the information for the dev
mounted in /boot/efi, but this directory may not exist on non-EFI machines
which leads to the following error when generating the grub2 config file:
/usr/sbin/grub2-probe: error: failed to get canonical path of `/boot/efi/'
Instead query for the device mounted in /boot and use that as the boot dev
for non-EFI machines.
Signed-off-by: Javier Martinez Canillas <[email protected]>
---
util/grub.d/10_linux.in | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
index 89cd71d852d..61d0664fb5c 100644
--- a/util/grub.d/10_linux.in
+++ b/util/grub.d/10_linux.in
@@ -133,8 +133,13 @@ linux_entry ()
fi
fi
- bootefi_device="`${grub_probe} --target=device /boot/efi/`"
- prepare_grub_to_access_device ${bootefi_device} boot
+ if [ -d /sys/firmware/efi ]; then
+ bootefi_device="`${grub_probe} --target=device /boot/efi/`"
+ prepare_grub_to_access_device ${bootefi_device} boot
+ else
+ boot_device="`${grub_probe} --target=device /boot/`"
+ prepare_grub_to_access_device ${boot_device} boot
+ fi
cat << EOF
insmod blscfg
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。