8 Star 0 Fork 16

src-anolis-os/dracut

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0130.patch 1.82 KB
一键复制 编辑 原始数据 按行查看 历史
From 0e43b934b98e40efeed0781e8bdf9f805d8d7217 Mon Sep 17 00:00:00 2001
From: Javier Martinez Canillas <javierm@redhat.com>
Date: Tue, 5 May 2020 19:11:18 +0200
Subject: [PATCH] 51-dracut-rescue.install: Don't use BLS fragment shipped by
kernel package
For the GRUB and zipl bootloaders the BLS fragment that is shipped by the
kernel package is used, so the same fragment is used for the rescue entry.
But there are cases where this BLS fragment is not suitable. For example,
if the boot directory is on a btrfs subvolume the path in the linux and
initrd fiels need to be adjusted with the real path. Otherwise GRUB won't
be able to read them.
The GRUB and zipl kernel-install plugins already take care of this before
installing the BLS fragments, so just copy the installed fragment that has
the updated paths instead of using the BLS shipped by the kernel package.
Resolves: rhbz#1827882
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
(cherry picked from commit ff366790a6e30175f243d54c2922a8c781030ede)
Resolves: #1894026
---
51-dracut-rescue.install | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/51-dracut-rescue.install b/51-dracut-rescue.install
index 5ac34ef3..47eb8e7d 100755
--- a/51-dracut-rescue.install
+++ b/51-dracut-rescue.install
@@ -104,7 +104,11 @@ case "$COMMAND" in
echo "initrd $BOOT_DIR/initrd"
} > $LOADER_ENTRY
else
- cp -aT "${KERNEL_IMAGE%/*}/bls.conf" $LOADER_ENTRY
+ if [[ -e "${BLS_DIR}/${MACHINE_ID}-${KERNEL_VERSION}.conf" ]]; then
+ cp -aT "${BLS_DIR}/${MACHINE_ID}-${KERNEL_VERSION}.conf" $LOADER_ENTRY
+ else
+ cp -aT "${KERNEL_IMAGE%/*}/bls.conf" $LOADER_ENTRY
+ fi
sed -i 's/'$KERNEL_VERSION'/0-rescue-'${MACHINE_ID}'/' $LOADER_ENTRY
fi
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-anolis-os/dracut.git
git@gitee.com:src-anolis-os/dracut.git
src-anolis-os
dracut
dracut
a8

搜索帮助