1 Star 0 Fork 71

dingwei / grub2

forked from src-openEuler / grub2 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0217-Only-mark-GRUB-as-BLS-supported-in-OSTree-systems-wi.patch 1.65 KB
一键复制 编辑 原始数据 按行查看 历史
hanzj0122_admin 提交于 2020-07-29 20:47 . update to 2.04
From 077d33c5035a51c50fa256330bbc82cde106855e Mon Sep 17 00:00:00 2001
From: Javier Martinez Canillas <javierm@redhat.com>
Date: Thu, 18 Jun 2020 11:19:00 +0200
Subject: [PATCH 217/220] Only mark GRUB as BLS supported in OSTree systems
with a boot partition
The script grub2-switch-to-blscfg updates the grub2 EFI binary in OSTree
systems and marks that has BLS support, to indicate that's not necessary
to add menuentry commands since the BLS snippets can be used to populate
the GRUB boot menu.
But OSTree doesn't support installations that don't have a boot partition,
the BLS snippets assume that there will be one so this has to be checked
and only mark the bootloader as supporting BLS in OSTree installations
that have /boot as a mountpoint.
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
---
util/grub-switch-to-blscfg.in | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/util/grub-switch-to-blscfg.in b/util/grub-switch-to-blscfg.in
index cb22912..a851424 100644
--- a/util/grub-switch-to-blscfg.in
+++ b/util/grub-switch-to-blscfg.in
@@ -261,7 +261,8 @@ copy_bls() {
# but only do this if the blsdir is not set, to make sure that the BLS
# parsing module will search for the BLS snippets in the default path.
if test -f /run/ostree-booted && test -d /sys/firmware/efi/efivars && \
- ! ${grub_editenv} - list | grep -q blsdir; then
+ ! ${grub_editenv} - list | grep -q blsdir && \
+ mountpoint -q /boot; then
grub_binary="$(find /usr/lib/ostree-boot/efi/EFI/${EFIDIR}/ -name grub*.efi)"
install -m 700 ${grub_binary} ${grubdir} || exit 1
# Create a hidden file to indicate that grub2 now has BLS support.
--
1.8.3.1
1
https://gitee.com/dingwei_chinamobile/grub2.git
git@gitee.com:dingwei_chinamobile/grub2.git
dingwei_chinamobile
grub2
grub2
master

搜索帮助