dracut/0024-feat-lsinitrd.sh-look-for-initrd-in-usr-lib-modules.patch
Pavel Valena a3b408b277 Upgrade to dracut 103
- enable dracut-cpio binary
- feat(fips-crypto-policies): make c-p follow FIPS mode automatically
- fix(fips-crypto-policies): make it depend on fips dracut module

Resolves: RHEL-59678,RHEL-65204

From-source-git-commit: ff3186be9d5871c6ec216019463199bb78cc1b32
2024-11-01 18:42:50 +01:00

39 lines
1.3 KiB
Diff

From 226de396c97d483380bd0604bfe2ff7f6a2ef48c Mon Sep 17 00:00:00 2001
From: Pavel Valena <pvalena@redhat.com>
Date: Fri, 16 Aug 2024 20:40:15 +0200
Subject: [PATCH 24/32] feat(lsinitrd.sh): look for initrd in /usr/lib/modules/
Introduce new path for lsinitrd.sh to look into:
/usr/lib/modules/$kver/initramfs.img
Which is valid on all ostree-based systems, and also other image based
systems with pre-generated initramfs.
Ref: https://issues.redhat.com/browse/RHEL-35890
(cherry picked from commit 22ae6ecaf9ecdb9db3e79aa9a72d527e7436c282)
Resolves: RHEL-54650
---
lsinitrd.sh | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lsinitrd.sh b/lsinitrd.sh
index 6799f938..35314b78 100755
--- a/lsinitrd.sh
+++ b/lsinitrd.sh
@@ -125,6 +125,10 @@ find_initrd_for_kernel_version() {
echo "/lib/modules/${kernel_version}/initrd"
elif [[ -f /lib/modules/${kernel_version}/initramfs.img ]]; then
echo "/lib/modules/${kernel_version}/initramfs.img"
+ elif [[ -f /usr/lib/modules/${kernel_version}/initrd ]]; then
+ echo "/usr/lib/modules/${kernel_version}/initrd"
+ elif [[ -f /usr/lib/modules/${kernel_version}/initramfs.img ]]; then
+ echo "/usr/lib/modules/${kernel_version}/initramfs.img"
elif [[ -f /boot/initramfs-${kernel_version}.img ]]; then
echo "/boot/initramfs-${kernel_version}.img"
else
--
2.42.0