-
Story
-
Resolution: Unresolved
-
Normal
-
None
-
rhel-8.8.0
-
rhel-sst-cs-plumbers
-
ssg_core_services
-
3
-
False
-
-
None
-
None
-
None
-
None
-
If docs needed, set a value
-
-
All
-
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
- mkdir /lib/modules/4.18.0-372.9.1.el8.x86_64
2. Execute dracut
- 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.