Created attachment 1849022 [details] dracut config dropin file Description of problem: When dracut is configured with systemd-network-management, systemd-resolved is neither loaded nor run in intitrd. If the nfs root server is specified by name instead of by address, the nfs root can not be mounted. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. Configure dracut to use systemd-resolved. Include item "host" 2. Optionally apply work around for Bug #1989119 2. Build initramfs and boot with root=nfs:server:path style parameter and rd.break=initqueue 3. Boot 4. In emergency shell type "host <server>" Actual results: host server not found Expected results: <server> has address <address> Additional info: systemd-resolved is normally "wanted" by mult-user. While initrd is running the target is initrd.target, so systemd-resolved is not loaded. Also, it needs to run before sysroot-mount. Also, systemf-resolved appears to not work immediately is is started (failing with "Host <server> not found: 2(SERVFAIL)"), even though systemd-resolved uses the notify mechanism. I don't understand why this would be. It is not the local networks DNS, because replacing /etc/resolv.conf with one which specifically sets 'nameserver' to the local network namserver works (albeit bypassing the system-resolved). A as a work around I have another unit "dracut_resolved-wait.service" which polls the resolver until it resolves the nfs server hostname. Typically this runs for about 5 seconds. Also, the systemd-resolve user is not in /etc/passwd preventing systemd-resolved from running, as can be seen by tring to manually start systemd-resolved from the emergency shell. This would be fixed by systemd-sysusers, which is installed but never starts.
Created attachment 1849023 [details] Patch for systemd-resolved not started
Created attachment 1849130 [details] Patch to make parsed nfs parameters available to dracut-resolved-wait.service I originally said the fix for Bug #2036214 was optional. It is not necessary to fix Bug #2036214 to test if systemd-resolved is started properly, but of course the main use for name resolution in initrd would be for NFS mounting root. That fix has two parts. The part which saves the NFS saves parameters is not optional and is included here for convenience. (The other part goes away if systemd-fstab-generator's parsing is enhanced).
I filed https://github.com/systemd/systemd/pull/22045 upstream to start systemd-resolved in the initrd. Dracut still needs to be adjusted to install it though.
As far as I can tell, dracut already has the 01systemd-resolved module, so I don't think any change is required in dracut to benefit from the change in systemd-resolved. I notice this is not in Fedora36 though I see it has been merged for Fedora37.
This message is a reminder that Fedora Linux 35 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora Linux 35 on 2022-12-13. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a 'version' of '35'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, change the 'version' to a later Fedora Linux version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora Linux 35 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora Linux, you are encouraged to change the 'version' to a later version prior to this bug being closed.
This message is a reminder that Fedora Linux 36 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora Linux 36 on 2023-05-16. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a 'version' of '36'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, change the 'version' to a later Fedora Linux version. Note that the version field may be hidden. Click the "Show advanced fields" button if you do not see it. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora Linux 36 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora Linux, you are encouraged to change the 'version' to a later version prior to this bug being closed.
Fedora Linux 36 entered end-of-life (EOL) status on 2023-05-16. Fedora Linux 36 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora Linux please feel free to reopen this bug against that version. Note that the version field may be hidden. Click the "Show advanced fields" button if you do not see the version field. If you are unable to reopen this bug, please file a new report against an active release. Thank you for reporting this bug and we are sorry it could not be fixed.