All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] runqemu-export-rootfs: don't change RPC ports
@ 2017-05-30 21:14 Cody P Schafer
  2017-05-31  5:04 ` Cody P Schafer
  0 siblings, 1 reply; 10+ messages in thread
From: Cody P Schafer @ 2017-05-30 21:14 UTC (permalink / raw)
  To: openembedded-core

The mountprog & nfsprog options given are not supported in the linux
kernel, and the only references I can find to them are in the nfs-utils
source, which notes:

  "mountprog" is supported only by the legacy mount command.  The
  kernel mount client does not support this option.

(and similar for nfsprog).

The kernel (which is what parses `nfsroot=<arg>` when using nfsroot)
has no understanding of nfsprog or mountprog.

The result of this is that trying to mount filesystems exported by
runqemu-export-rootfs in modern kernels (at least in 4.2 and later, and
probably more like 2.6.20 and later) doesn't actually work.

I'm honestly not sure how anyone was using this for nfsroot support.
Maybe an initramfs with a version of nfs-utils that could handle the
mountprog/nfsprog option was in use? Not sure.

Signed-off-by: Cody P Schafer <dev@codyps.com>
---
 scripts/runqemu-export-rootfs | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/scripts/runqemu-export-rootfs b/scripts/runqemu-export-rootfs
index c7992d8223..70cdcdbb13 100755
--- a/scripts/runqemu-export-rootfs
+++ b/scripts/runqemu-export-rootfs
@@ -77,10 +77,6 @@ if [ ! -d "$PSEUDO_LOCALSTATEDIR" ]; then
 	exit 1	
 fi
 
-# rpc.mountd RPC port
-MOUNTD_RPCPORT=${MOUNTD_RPCPORT:=$[ 21111 + $NFS_INSTANCE ]}
-# rpc.nfsd RPC port
-NFSD_RPCPORT=${NFSD_RPCPORT:=$[ 11111 + $NFS_INSTANCE ]}
 # NFS server port number
 NFSD_PORT=${NFSD_PORT:=$[ 3049 + 2 * $NFS_INSTANCE ]}
 # mountd port number
@@ -88,7 +84,7 @@ MOUNTD_PORT=${MOUNTD_PORT:=$[ 3048 + 2 * $NFS_INSTANCE ]}
 
 ## For debugging you would additionally add
 ## --debug all
-UNFSD_OPTS="-p -N -i $NFSPID -e $EXPORTS -x $NFSD_RPCPORT -n $NFSD_PORT -y $MOUNTD_RPCPORT -m $MOUNTD_PORT"
+UNFSD_OPTS="-p -N -i $NFSPID -e $EXPORTS -n $NFSD_PORT -m $MOUNTD_PORT"
 
 # See how we were called.
 case "$1" in
@@ -130,7 +126,7 @@ case "$1" in
 	fi
 	echo " "
 	echo "On your target please remember to add the following options for NFS"
-	echo "nfsroot=IP_ADDRESS:$NFS_EXPORT_DIR,nfsvers=3,port=$NFSD_PORT,mountprog=$MOUNTD_RPCPORT,nfsprog=$NFSD_RPCPORT,udp,mountport=$MOUNTD_PORT"
+	echo "nfsroot=IP_ADDRESS:$NFS_EXPORT_DIR,nfsvers=3,port=$NFSD_PORT,udp,mountport=$MOUNTD_PORT"
 	;;
   stop)
 	if [ -f "$NFSPID" ]; then
-- 
2.13.0



^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-06-01 22:17 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-30 21:14 [PATCH] runqemu-export-rootfs: don't change RPC ports Cody P Schafer
2017-05-31  5:04 ` Cody P Schafer
2017-05-31 12:17   ` Bruce Ashfield
2017-05-31 16:07     ` Cody P Schafer
2017-05-31 16:10       ` Mark Hatle
2017-05-31 17:20         ` Cody P Schafer
2017-05-31 19:12           ` Mark Hatle
2017-05-31 20:27             ` Cody P Schafer
2017-06-01 17:02               ` Mark Hatle
2017-06-01 22:17                 ` Cody P Schafer

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.