Skip to content

Commit

Permalink
feat(lsinitrd.sh): look for initrd in /usr/lib/modules/
Browse files Browse the repository at this point in the history
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 7c7cdd9317c21b19a0393f5d28d1acb7ee3ff027 from PR#582)

Resolves: RHEL-35890
  • Loading branch information
pvalena committed Aug 16, 2024
1 parent 1a57cf7 commit 0110f7a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lsinitrd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ else
image="/lib/modules/${KERNEL_VERSION}/initrd"
elif [[ -f /boot/initramfs-${KERNEL_VERSION}.img ]]; then
image="/boot/initramfs-${KERNEL_VERSION}.img"
elif [[ -f /usr/lib/modules/${KERNEL_VERSION}/initramfs.img ]]; then
image="/usr/lib/modules/${KERNEL_VERSION}/initramfs.img"
elif [[ $MACHINE_ID ]] \
&& mountpoint -q /efi; then
image="/efi/${MACHINE_ID}/${KERNEL_VERSION}/initrd"
Expand Down

0 comments on commit 0110f7a

Please sign in to comment.