Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-119785

dracut module "95resume" is not pulling underlying required modules

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • rhel-9.6
    • dracut
    • None
    • No
    • Moderate
    • rhel-bootloader
    • None
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • Unspecified
    • Unspecified
    • Unspecified
    • None

      What were you trying to do that didn't work?

      The dracut module /usr/lib/dracut/modules.d/95resume is in charge of handling the resume=/some/device kernel command line parameter.
      It appears that the module has no logic to verify that the underlying device exists nor ensures that potentially dependent module is embedded in the initramfs (e.g. "lvm" when swap is on LVM).
      This results in a failure to boot since the boot will wait forever if something goes wrong (see RHEL-95391.

      What is the impact of this issue to you?

      Can't boot

      Please provide the package NVR for which the bug is seen:

      dracut-057-87.git20250311.el9_6

      How reproducible is this bug?:

      Always

      Steps to reproduce

      1. Install a RHEL9 system with / on standard partition and swap on LVM
        # lsblk
        NAME          MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
        sr0            11:0    1 1024M  0 rom  
        vda           252:0    0   20G  0 disk 
        ├─vda1        252:1    0    1G  0 part /boot
        ├─vda2        252:2    0    2G  0 part 
        │ └─rhel-swap 253:0    0    2G  0 lvm  [SWAP]
        └─vda3        252:3    0   10G  0 part /
        
        # cat /proc/cmdline 
        BOOT_IMAGE=(hd0,msdos1)/vmlinuz-5.14.0-570.12.1.el9_6.x86_64 root=UUID=fb278839-5422-4032-a152-a660c33e4d67 ro resume=/dev/mapper/rhel-swap rd.lvm.lv=rhel/swap
        
      2. Once rebooted on the installed system, unmount the swap and rebuild the initramfs
        # swapoff -a
        # dracut -f
        
      3. Reboot

      Expected results

      System boots fine

      Actual results

      System hangs on boot because the dracut "lvm" module was not embedded in the initramfs causing resume=/dev/mapper/rhel-swap to not be activated.
      The reason "lvm" module is not embedded is because at time of initramfs generation, the swap was off, hence no file system was depending on "lvm" actually.

              bootloader-eng-team bootloader -eng-team
              rhn-support-rmetrich Renaud Métrich
              bootloader -eng-team bootloader -eng-team
              RHEL CS Plumbers QE Bot RHEL CS Plumbers QE Bot
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: