]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
nfs: specify nfs version 3 explicitly and retry with nfs version 2
authorHarald Hoyer <harald@redhat.com>
Wed, 30 Sep 2009 15:38:43 +0000 (17:38 +0200)
committerHarald Hoyer <harald@redhat.com>
Thu, 1 Oct 2009 12:46:13 +0000 (14:46 +0200)
modules.d/95nfs/nfsroot

index a6e7deb126953875b6a19fdda55c37efabb81be6..e7825aec46b66bb656c9311d2ca758b6e2ec2ef6 100755 (executable)
@@ -152,8 +152,9 @@ else
         warn "Locks unsupported on NFSv{2,3}, using nolock" 1>&2
 
     # XXX Should we loop here?
-    mount -t nfs -o$options${options:+,}nolock $server:$path $NEWROOT \
-       && { [ -e /dev/root ] || >/dev/root ; }
+    { mount -t nfs -o$options${options:+,}nolock,nfsvers=3 $server:$path $NEWROOT || \
+    mount -t nfs -o$options${options:+,}nolock,nfsvers=2 $server:$path $NEWROOT ; } \
+       && { [ -e /dev/root ] || >/dev/root ; } 
 fi
 
 # inject new exit_if_exists