Bug#434775: nfs-common: fails to mount nfs volumes when booted with ip= command line

Mark Hindley mark at hindley.org.uk
Tue Feb 18 10:49:06 GMT 2025


Control: forcemerge -1 434570
Control: tags -1 patch

Changing the default for ASYNCMOUNTNFS to no if ip= or nfsroot= is specified on
the kernel commandline seems like a solution here.

Mark

commit 53b86872b879492585e4def9860088a75d2c330d
Author: Mark Hindley <mark at hindley.org.uk>
Date:   Tue Feb 18 10:40:05 2025 +0000

    Default to ASYNCMOUNTNFS=no if ip= or nfsroot= specified on kernel commandline.

diff --git a/debian/src/initscripts/man/rcS.5 b/debian/src/initscripts/man/rcS.5
index b9d384e1..1532aa82 100644
--- a/debian/src/initscripts/man/rcS.5
+++ b/debian/src/initscripts/man/rcS.5
@@ -82,7 +82,8 @@ without asking for permission.
 .IP \fBASYNCMOUNTNFS\fP
 Set this to 'no' to disable asynchronous mounting of network drives
 when the network interfaces are mounted, and instead do it only once
-when the machine boots.  The default is 'yes'.  It is useful to
+when the machine boots.  The default is 'yes' unless ip= or nfsroot= is
+specified on the kernel command line.  It is useful to
 disable this on machines where the root file system is NFS, until ifup
 from ifupdown works properly in such setup.
 .IP
diff --git a/debian/vars.sh b/debian/vars.sh
index f0280fed..fe444cc7 100644
--- a/debian/vars.sh
+++ b/debian/vars.sh
@@ -42,6 +42,11 @@ if [ -r /proc/cmdline ]; then
 		    VERBOSE="no"
 		fi
 		;;
+
+	    # If ip or nfsroot specified and ASYNCMOUNTNFS is unset, default to no
+	    ip|nfsroot)
+	    	[ "$ASYNCMOUNTNFS" ] || ASYNCMOUNTNFS=no
+		;;
 	esac
     done
 fi



More information about the Debian-init-diversity mailing list