Bug 991675 - Dracut fails to recognize nfs module is needed for nfsroot
Dracut fails to recognize nfs module is needed for nfsroot
Product: Fedora
Classification: Fedora
Component: dracut (Show other bugs)
x86_64 Linux
unspecified Severity medium
: ---
: ---
Assigned To: dracut-maint
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-08-03 10:25 EDT by Göran Uddeborg
Modified: 2015-02-18 06:04 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-02-18 06:04:27 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
My modifications to dracut (986 bytes, patch)
2013-08-03 10:25 EDT, Göran Uddeborg
no flags Details | Diff

  None (edit)
Description Göran Uddeborg 2013-08-03 10:25:12 EDT
Created attachment 782327 [details]
My modifications to dracut

Description of problem:
When running dracut, without special options, on a system with NFS root, the generated initramfs does not contain the necessary NFS modules and tools.

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

How reproducible:
Every time

Steps to Reproduce:
1. Upgrade kernel on an F19 system.

Actual results:
An initramfs without NFS parts is generated.

Expected results:
The initramfs should include the necessary NFS bits.

Additional info:
I've looked at this a bit, and from what I understand:

Dracut does (in dracut-network) contain the necessary support for NFS root.  Running dracut with an explicit --modules flag generates a working initramfs.  The problem is in automatically detecting this is needed.

There is code that examines a number of vital directories and checks if any particular modules are needed to access them.  But this code seems to assume all file systems are mounted from block devices.  Things mounted from NFS shares are simply ignored.

I made some small tweaks to the code to allow NFS "devices" to be considered too.  I attach my changes to this report.  This code will add the NFS "device" to the host_devs variable, among all other devices.  If it is reasonable to treat them as devices in this way might be arguable.  It isn't a device in the traditional sense.  But on the other hand, it is something a file system can be mounted from, so it is equivalent in that sense.

If an NFS share is mounted using the --mount option, the NFS share will be treated as a device in the same way.  That may or may not be intentional.

As far as I can tell, it shouldn't cause any actual problems, but I might not have the complete picture.

It does fix the problem for me! :-)
Comment 1 Harald Hoyer 2013-08-20 08:43:45 EDT
commit a4f7b504712bd7499d60d16f358ec89ab31bbb47
commit e95b672376314602777989bcb416bf7037ca77bc
Comment 2 Darryl Bond 2013-10-31 00:11:56 EDT
I am trying to build an ltsp nfs kernel on F20. The initrd does not contain nfs root capability. After chasing through the ltsp scripts I found this:
dracut -f -v -m "nfs network base" --filesystem nfs --host-only /tmp/initramfs-nfs-host-only.img
Executing: /sbin/dracut -f -v -m "nfs network base" --filesystem nfs --host-only /tmp/initramfs-nfs-host-only.img
dracut module 'nfs' cannot be found or installed.
dracut module 'nfs' cannot be found or installed.
*** Including module: network ***
*** Including module: udev-rules ***
Skipping udev rule: 91-permissions.rules
*** Including module: base ***
*** Including modules done ***
*** Installing kernel module dependencies and firmware ***
*** Installing kernel module dependencies and firmware done ***
*** Resolving executable dependencies ***
*** Resolving executable dependencies done***
*** Hardlinking files ***
*** Hardlinking files done ***
Could not find 'strip'. Not stripping the initramfs.
*** Creating image file ***
*** Creating image file done ***

The dracut 95nfs exists, I can't see what is missing that reports that nfs cannot be found or installed.
Comment 3 Darryl Bond 2013-10-31 00:30:11 EDT
Sorry, nfs-utils package was missing from the chroot.
Successful build of nfs-root image
Comment 4 Fedora End Of Life 2015-01-09 17:27:05 EST
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 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, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 5 Fedora End Of Life 2015-02-18 06:04:27 EST
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 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 please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.