All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mason <slash.tmp@free.fr>
To: linux-nfs@vger.kernel.org
Cc: Trond Myklebust <trond.myklebust@primarydata.com>,
	Anna Schumaker <anna.schumaker@netapp.com>
Subject: nfsroot protocol version
Date: Wed, 01 Apr 2015 11:55:03 +0200	[thread overview]
Message-ID: <551BC077.1030402@free.fr> (raw)

Hello everyone,

My embedded system is supposed to mount the rootfs via NFS.
https://www.kernel.org/doc/Documentation/filesystems/nfs/nfsroot.txt

So I set these options in my kernel .config

CONFIG_IP_PNP=y
CONFIG_IP_PNP_DHCP=y
CONFIG_ROOT_NFS=y
CONFIG_NFS_V4=y

But it didn't work, the system would panic after a long time out
(around 95 seconds)

[   98.567037] VFS: Unable to mount root fs via NFS, trying floppy.
[   98.573238] Freeing unused kernel memory: 144K (c0332000 - c0356000)
[   98.579698] Kernel panic - not syncing: No working init found.
	Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.

I then enabled NFSv2 and NFSv3, and then it worked.

When I was debugging the problem, I ran across NFS_DEF_OPTIONS
in fs/nfs/nfsroot.c

#define NFS_DEF_OPTIONS		"vers=2,udp,rsize=4096,wsize=4096"

IIUC, we are explicitly requesting NFSv2?

Would that explain why it fails when NFSv2 support is not compiled in?

Would it make sense to use version 3?
(So NFSv2 is not needed just to load the rootfs.)

Regards.

             reply	other threads:[~2015-04-01  9:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-01  9:55 Mason [this message]
2015-04-21  8:37 ` nfsroot protocol version Mason
2015-04-21 14:07   ` Chuck Lever
2015-04-21 14:45     ` Mason
2015-04-21 15:16       ` Chuck Lever
2015-04-22  8:57         ` Mason

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=551BC077.1030402@free.fr \
    --to=slash.tmp@free.fr \
    --cc=anna.schumaker@netapp.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trond.myklebust@primarydata.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.