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

dracut generates initramfs for non-existing kernels

    • rhel-sst-cs-plumbers
    • ssg_core_services
    • 3
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • If docs needed, set a value
    • None

      Description of problem:

      We see a couple of customers getting their /boot filled with initramfs files for non-existing kernels (as shown by "rpm -q kernel-core").
      It appears that "dracut --regenerate-all" bases itself on the existence of /lib/modules/<KVERS> directory, which leads to creating non-usable initramfs files for removed kernels that still have the directory existing, for example because of presence of 3rd party kernel modules.

      Filing as Medium/Medium because this leads to space issues in /boot and there is no simple recovery but deleting.

      Version-Release number of selected component (if applicable):

      dracut-049

      How reproducible:

      Always

      Steps to Reproduce:
      1. Create directory for some non-installed kernel

      1. mkdir /lib/modules/4.18.0-372.9.1.el8.x86_64

      2. Execute dracut

      1. dracut /tmp/foo.img 4.18.0-372.9.1.el8.x86_64

      Actual results:

      /tmp/foo.img created

      Expected results:

      Some error

      Additional info:

      I think dracut should check that there is really some kernel available, e.g. through checking presence of /boot/vmlinuz-<KVERS>, or failing if some critical kernel files are missing.

              dracut-maint dracut maint mailing list
              rhn-support-rmetrich Renaud Métrich
              dracut maint mailing list dracut maint mailing list
              qe-baseos-daemons qe-baseos-daemons
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated: