Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
With new release of dracut, dracut-initramfs-restore always fails to unpack the initramfs because it searches for a non-existing file on RHEL.
It's selecting line 35 because we have /boot/loader/entries directory, but it should select line 42 instead.
New release:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
28 mount -o ro /boot &> /dev/null || true
29
30 if [[ -d /efi/loader/entries ]] || [[ -L /efi/loader/entries ]] \
31 || [[ -d /efi/$MACHINE_ID ]] || [[ -L /efi/$MACHINE_ID ]]; then
32 IMG="/efi/${MACHINE_ID}/${KERNEL_VERSION}/initrd"
33 elif [[ -d /boot/loader/entries ]] || [[ -L /boot/loader/entries ]] \
34 || [[ -d /boot/$MACHINE_ID ]] || [[ -L /boot/$MACHINE_ID ]]; then
35 IMG="/boot/${MACHINE_ID}/${KERNEL_VERSION}/initrd"
36 elif [[ -d /boot/efi/loader/entries ]] || [[ -L /boot/efi/loader/entries ]] \
37 || [[ -d /boot/efi/$MACHINE_ID ]] || [[ -L /boot/efi/$MACHINE_ID ]]; then
38 IMG="/boot/efi/$MACHINE_ID/$KERNEL_VERSION/initrd"
39 elif [[ -f /lib/modules/${KERNEL_VERSION}/initrd ]]; then
40 IMG="/lib/modules/${KERNEL_VERSION}/initrd"
41 elif [[ -f /boot/initramfs-${KERNEL_VERSION}.img ]]; then
42 IMG="/boot/initramfs-${KERNEL_VERSION}.img"
43 elif mountpoint -q /efi; then
44 IMG="/efi/$MACHINE_ID/$KERNEL_VERSION/initrd"
45 elif mountpoint -q /boot/efi; then
46 IMG="/boot/efi/$MACHINE_ID/$KERNEL_VERSION/initrd"
47 else
48 echo "No initramfs image found to restore!"
49 exit 1
50 fi
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
Previous release is correct because of the checks on line 25-26 which do not apply to RHEL9.
Previous release (055-45.git20220404.el9_0):
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
22 mount -o ro /boot &> /dev/null || true
23
24 if [[ -d /efi/loader/entries || -L /efi/loader/entries ]] \
25 && [[ $MACHINE_ID ]] \
26 && [[ -d /efi/${MACHINE_ID} || -L /efi/${MACHINE_ID} ]]; then
27 IMG="/efi/${MACHINE_ID}/${KERNEL_VERSION}/initrd"
28 elif [[ -d /boot/loader/entries || -L /boot/loader/entries ]] \
29 && [[ $MACHINE_ID ]] \
30 && [[ -d /boot/${MACHINE_ID} || -L /boot/${MACHINE_ID} ]]; then
31 IMG="/boot/${MACHINE_ID}/${KERNEL_VERSION}/initrd"
32 elif [[ -f /boot/initramfs-${KERNEL_VERSION}.img ]]; then
33 IMG="/boot/initramfs-${KERNEL_VERSION}.img"
34 elif [[ -f /lib/modules/${KERNEL_VERSION}/initrd ]]; then
35 IMG="/lib/modules/${KERNEL_VERSION}/initrd"
36 else
37 echo "No initramfs image found to restore!"
38 exit 1
39 fi
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
Additionally, but unrelated, the kernel always complains when the mount of /boot happens:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
kernel: sda2: Can't mount, would change RO state
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
This is due to /boot already been mounted (usually), and line 28 (in newer dracut) to fail.
It would be nice to check if /boot is already a mount point to avoid this message, which may the admin believe there is something wrong with /dev/sda2 (e.g. it would be corrupted).
Version-Release number of selected component (if applicable):
dracut-057-13.git20220816.el9.x86_64
How reproducible:
Always
Steps to Reproduce:
1. Reboot with persistent journal enabled
Actual results:
Failure to unpack the initramfs
Expected results:
No issue
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (dracut bug fix and enhancement update), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2023:2547
Description of problem: With new release of dracut, dracut-initramfs-restore always fails to unpack the initramfs because it searches for a non-existing file on RHEL. It's selecting line 35 because we have /boot/loader/entries directory, but it should select line 42 instead. New release: -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- 28 mount -o ro /boot &> /dev/null || true 29 30 if [[ -d /efi/loader/entries ]] || [[ -L /efi/loader/entries ]] \ 31 || [[ -d /efi/$MACHINE_ID ]] || [[ -L /efi/$MACHINE_ID ]]; then 32 IMG="/efi/${MACHINE_ID}/${KERNEL_VERSION}/initrd" 33 elif [[ -d /boot/loader/entries ]] || [[ -L /boot/loader/entries ]] \ 34 || [[ -d /boot/$MACHINE_ID ]] || [[ -L /boot/$MACHINE_ID ]]; then 35 IMG="/boot/${MACHINE_ID}/${KERNEL_VERSION}/initrd" 36 elif [[ -d /boot/efi/loader/entries ]] || [[ -L /boot/efi/loader/entries ]] \ 37 || [[ -d /boot/efi/$MACHINE_ID ]] || [[ -L /boot/efi/$MACHINE_ID ]]; then 38 IMG="/boot/efi/$MACHINE_ID/$KERNEL_VERSION/initrd" 39 elif [[ -f /lib/modules/${KERNEL_VERSION}/initrd ]]; then 40 IMG="/lib/modules/${KERNEL_VERSION}/initrd" 41 elif [[ -f /boot/initramfs-${KERNEL_VERSION}.img ]]; then 42 IMG="/boot/initramfs-${KERNEL_VERSION}.img" 43 elif mountpoint -q /efi; then 44 IMG="/efi/$MACHINE_ID/$KERNEL_VERSION/initrd" 45 elif mountpoint -q /boot/efi; then 46 IMG="/boot/efi/$MACHINE_ID/$KERNEL_VERSION/initrd" 47 else 48 echo "No initramfs image found to restore!" 49 exit 1 50 fi -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- Previous release is correct because of the checks on line 25-26 which do not apply to RHEL9. Previous release (055-45.git20220404.el9_0): -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- 22 mount -o ro /boot &> /dev/null || true 23 24 if [[ -d /efi/loader/entries || -L /efi/loader/entries ]] \ 25 && [[ $MACHINE_ID ]] \ 26 && [[ -d /efi/${MACHINE_ID} || -L /efi/${MACHINE_ID} ]]; then 27 IMG="/efi/${MACHINE_ID}/${KERNEL_VERSION}/initrd" 28 elif [[ -d /boot/loader/entries || -L /boot/loader/entries ]] \ 29 && [[ $MACHINE_ID ]] \ 30 && [[ -d /boot/${MACHINE_ID} || -L /boot/${MACHINE_ID} ]]; then 31 IMG="/boot/${MACHINE_ID}/${KERNEL_VERSION}/initrd" 32 elif [[ -f /boot/initramfs-${KERNEL_VERSION}.img ]]; then 33 IMG="/boot/initramfs-${KERNEL_VERSION}.img" 34 elif [[ -f /lib/modules/${KERNEL_VERSION}/initrd ]]; then 35 IMG="/lib/modules/${KERNEL_VERSION}/initrd" 36 else 37 echo "No initramfs image found to restore!" 38 exit 1 39 fi -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- Additionally, but unrelated, the kernel always complains when the mount of /boot happens: -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- kernel: sda2: Can't mount, would change RO state -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- This is due to /boot already been mounted (usually), and line 28 (in newer dracut) to fail. It would be nice to check if /boot is already a mount point to avoid this message, which may the admin believe there is something wrong with /dev/sda2 (e.g. it would be corrupted). Version-Release number of selected component (if applicable): dracut-057-13.git20220816.el9.x86_64 How reproducible: Always Steps to Reproduce: 1. Reboot with persistent journal enabled Actual results: Failure to unpack the initramfs Expected results: No issue