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.
Hi Dracut team,
The cause of this bug is the previous fix [1] only installed the fs driver (e.g. xfs) but not the block device drivers (e.g. hv_vmbus sd_mod sg scsi_transport_fc hv_storvsc for the case of hyper-v). Personally, I think it's better to fix it in kexec-tools by using the "--add-device" option,
1) kexec-tools calls dracut with "--no-hostonly-default-device" and we are supposed to use "--add-device" to explicitly add devices as needed. Quoting the man page of dracut,
> --no-hostonly-default-device
> Do not generate implicit host devices like root, swap, fstab, etc. Use "--mount" or "--add-device" to explicitly add devices as needed.
2) It's more robust and cleaner to fix it in kexec-tools than in dracut's fips module.
Do you have any comment? Thanks!
And also thanks Xiaoqiang (xxiong) for preparing the hyper-v and Azure machines and the provided help so I was able to debug this bug and test the fixes.
[1] https://github.com/dracutdevs/dracut/pull/553/commits/8b6b3efab39a0ccbe918c92a208b86c06680f7f0
## The fix in dracut's fips module
```diff
diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh
index 8860159d..ef681158 100755
--- a/modules.d/01fips/module-setup.sh
+++ b/modules.d/01fips/module-setup.sh
@@ -51,9 +51,12 @@ installkernel() {
# with hostonly_default_device fs module for /boot is not installed by default
if [[ $hostonly ]] && [[ $hostonly_default_device == "no" ]]; then
- _bootfstype=$(find_mp_fstype /boot)
- if [[ -n $_bootfstype ]]; then
- hostonly='' instmods "$_bootfstype"
+ _dev=$(find_block_device "/boot")
+ _bdev=$(readlink -f "/dev/block/$_dev")
+ if [[ -b $_bdev ]]; then
+ push_host_devs "$_bdev"
+ _get_fs_type "$_bdev"
+ check_block_and_slaves_all _get_fs_type "$(get_maj_min "$_bdev")"
else
dwarning "Can't determine fs type for /boot, FIPS check may fail."
fi
```
## The fix in kexec-tools
```diff
diff --git a/mkdumprd b/mkdumprd
index a3e59384..9e6c78ad 100644
--- a/mkdumprd
+++ b/mkdumprd
@@ -463,6 +463,10 @@ if ! is_fadump_capable; then
is_dump_to_rootfs && add_mount "$(to_dev_name "$(get_root_fs_device)")"
add_dracut_arg "--no-hostonly-default-device"
+
+ if fips-mode-setup --is-enabled; then
+ add_dracut_arg --add-device "$(findmnt -n -o SOURCE --target /boot)"
+ fi
fi
```