Bug 432603 - commandline nfs mount options in RHEL5
commandline nfs mount options in RHEL5
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: anaconda (Show other bugs)
All Linux
high Severity medium
: rc
: ---
Assigned To: Joel Andres Granados
Alexander Todorov
: Reopened
Depends On: 234185
Blocks: 391501 409971
  Show dependency treegraph
Reported: 2008-02-13 04:55 EST by Adam Stokes
Modified: 2009-05-24 22:46 EDT (History)
2 users (show)

See Also:
Fixed In Version: RHEL52
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 559200 (view as bug list)
Last Closed: 2009-01-20 16:34:29 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Comment 2 RHEL Product and Program Management 2008-06-12 16:29:00 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
Comment 4 Joel Andres Granados 2008-07-08 08:58:31 EDT
Will be available in anaconda
relative commit 21e3396c2ab445d64407a34e94ea55cdc5ff0999
Comment 5 Joel Andres Granados 2008-07-09 13:22:22 EDT
please ignore comment #4.
see the ks=nfs(:<options>):<path> syntax -- it can be extended to the method=nfs
case easily. then there's also nfs --opts=... in kickstart.

I'm closing this issue as, it is already in rhel5
Comment 6 Issue Tracker 2008-07-09 23:06:30 EDT
> see the ks=nfs(:<options>):<path> syntax

Is this certain? 

I checked the following part in loaders/method.c of

        if (!strncmp(arg, "nfs:", 4)) {
            ld->method = METHOD_NFS;
            ld->methodData = calloc(sizeof(struct nfsInstallData *), 1);
            ((struct nfsInstallData *)ld->methodData)->host = strdup(c);
            if ((c = strtok(NULL, ":"))) {
                ((struct nfsInstallData *)ld->methodData)->directory =

It seems that "nfs:<host>:<directory>" is assumed here. As far as I
know, options have to be set to ((struct nfsInstallData
*)ld->methodData)-> mountOpt. But,the place to set it is only the
following in the anaconda source.

    235 void setKickstartNfs(struct loaderData_s * loaderData, int argc,
    236                      char ** argv) {
    270     if (mountOpts)
    271         ((struct nfsInstallData
*)loaderData->methodData)->mountOpts = m        ountOpts;

And, this is for --opts= in kickstart. 

This event sent from IssueTracker by mmatsuya 
 issue 128966
Comment 7 Joel Andres Granados 2008-07-10 08:09:56 EDT
Are the options not working properly?

I'm looking at nfsinstall.c: setKickstartNfs(struct loaderData_s * loaderData,
int argc,....)
    struct poptOption ksNfsOptions[] = { 
        { "server", '\0', POPT_ARG_STRING, &host, 0, NULL, NULL },
        { "dir", '\0', POPT_ARG_STRING, &dir, 0, NULL, NULL },
        { "opts", '\0', POPT_ARG_STRING, &mountOpts, 0, NULL, NULL},
        { 0, 0, 0, 0, 0, 0, 0 } 
    if (mountOpts)
        ((struct nfsInstallData *)loaderData->methodData)->mountOpts = mountOpts;

The options get passed to the nfsInstallData structure and are used when they
are needed.

A good way to see if your options are actually getting through is to search for
the nfs log message:
 logMessage(INFO, "results of nfs, host is %s, dir is %s, opts are '%s'", host,
dir, mountOpts);

Comment 9 Joel Andres Granados 2008-07-11 03:26:59 EDT
Sorry about that.  I misunderstood you.
I see the code and see the same issue as you do.  If you can, please test and
verify that the options do not get passed.
Just do an installation with whatever nfs additional options and search for the
 ("host is %s, dir is %s, opts are '%s'", host, directory, mountOpts) string in
the logs.

I'm going to reopen this as I might be a valid issue.
Comment 10 Joel Andres Granados 2008-07-11 07:38:10 EDT
I have just confirmed.  the options get passed when ks is used, but do not get
passed when specified in the command line.  It will be fixed in anaconda, relative commit 93cc4e8dff55ecebf043c0d51b47b80b1b9aef17
Comment 13 Joel Andres Granados 2008-07-16 09:17:30 EDT
I found that the cmdline for nfs options was parsed but only used to download
individual files from an nfs server.  I had to build a new patch that modifies a
little the cmdline parsing.  The line needs to be in the following format:
"nfs:[<comma separated opts>:]server:directory",  the new fix is not in current
anaconda and will be present in anaconda
Comment 20 errata-xmlrpc 2009-01-20 16:34:29 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


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