b142aff8c7
The `grub2-mkconfig` tool is usually re-run when a new filesystem is mounted so the new menuentry produced can be use on the next boot. However the new created linux command (on the new entry) has only the root parameter and it is invalid for mapper devices. The proposed changes tries to source the grub's default environment file if present so it can be used to create a more complete kernel command line and fixes the kernel's root value, where it takes the symlink instead of the cannonical file, allowing device mapper types to boot in a consistent way. Resolves: #RHEL-55234 Signed-off-by: Leo Sandoval <lsandova@redhat.com>
28 lines
812 B
Diff
28 lines
812 B
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Leo Sandoval <lsandova@redhat.com>
|
|
Date: Thu, 27 Jun 2024 11:31:38 -0600
|
|
Subject: [PATCH] common.sh: do not resolve symbolic link on mapped device
|
|
filesystems
|
|
|
|
/dev/dm-* devices may change from boot to boot so better to use the
|
|
symlink instead of the resolved file name
|
|
|
|
Signed-off-by: Leo Sandoval <lsandova@redhat.com>
|
|
---
|
|
common.sh | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/common.sh b/common.sh
|
|
index a24286a..f0ebfb3 100644
|
|
--- a/common.sh
|
|
+++ b/common.sh
|
|
@@ -92,7 +92,7 @@ export fd_result # so subshells inherit current value by default
|
|
# shim to make it easier to use os-prober outside d-i
|
|
if ! type mapdevfs >/dev/null 2>&1; then
|
|
mapdevfs () {
|
|
- readlink -f "$1"
|
|
+ echo "$1"
|
|
}
|
|
fi
|
|
|