From jeh@thehousleys.net  Sat Feb 21 05:25:15 2004
Return-Path: <jeh@thehousleys.net>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id E917216A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 21 Feb 2004 05:25:15 -0800 (PST)
Received: from thehousleys.net (frenchknot.ne.client2.attbi.com [24.34.30.131])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 7E79943D2D
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 21 Feb 2004 05:25:15 -0800 (PST)
	(envelope-from jeh@thehousleys.net)
Received: from cat.int.thehousleys.net (localhost [IPv6:::1])
	by thehousleys.net (8.12.9p2/8.12.9) with ESMTP id i1LDPCer011144
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 21 Feb 2004 08:25:12 -0500 (EST)
	(envelope-from jeh@cat.int.thehousleys.net)
Received: (from jeh@localhost)
	by cat.int.thehousleys.net (8.12.9p2/8.12.9/Submit) id i1LDPCin011143;
	Sat, 21 Feb 2004 08:25:12 -0500 (EST)
	(envelope-from jeh)
Message-Id: <200402211325.i1LDPCin011143@cat.int.thehousleys.net>
Date: Sat, 21 Feb 2004 08:25:12 -0500 (EST)
From: "James E. Housley" <jeh@thehousleys.net>
Reply-To: "James E. Housley" <jeh@thehousleys.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Booting crashes on CURRENT with NFS mounts in fstab
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         63169
>Category:       conf
>Synopsis:       Booting crashes on CURRENT with NFS mounts in fstab
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Feb 21 05:30:21 PST 2004
>Closed-Date:    Sat Apr 24 01:08:40 PDT 2004
>Last-Modified:  Sat Apr 24 01:08:40 PDT 2004
>Originator:     James E. Housley
>Release:        FreeBSD 4.9-RELEASE-p2 i386
>Organization:
>Environment:
System: FreeBSD vaio.int.thehousleys.net 5.2.1-RC2 FreeBSD 5.2.1-RC2 #1: Mon Feb 16 18:17:43 EST 2004     root@vaio2.int.thehousleys.net:/usr/obj/usr/src/sys/GENERIC  i386


	
>Description:
	Using RELENG_5_2, but the HEAD files have the same problem.  On
	booting fsck seems to want to be scheduled for all file systems
	listed in fstab, including nfs.  This produces an error about
	fsck_nfs ... or similar.

	The below patch takes the code frmo mountcritlocal to remove the
	network file systems from the list.
>How-To-Repeat:
	
>Fix:

--- /usr/src/etc/rc.d/bgfsck	Wed Apr 23 11:38:02 2003
+++ bgfsck	Sat Feb 21 08:03:54 2004
@@ -22,7 +22,25 @@
 	fi
 	echo "${bgfsck_msg}."
 
-	(sleep ${background_fsck_delay}; nice -4 fsck -B -p) 2>&1 | \
+	# Set up the list of network filesystem types for which mounting
+	# should be delayed until after network initialization.
+	case ${extra_netfs_types} in
+	[Nn][Oo])
+		;;
+	*)
+		netfs_types="${netfs_types} ${extra_netfs_types}"
+		;;
+	esac
+
+	# Mount everything except nfs filesystems.
+	mount_excludes='no'
+	for i in ${netfs_types}; do
+		fstype=${i%:*}
+		mount_excludes="${mount_excludes}${fstype},"
+	done
+	mount_excludes=${mount_excludes%,}
+
+	(sleep ${background_fsck_delay}; nice -4 fsck -B -p -t ${mount_excludes}) 2>&1 | \
 	    logger -p daemon.notice -t fsck &
 }
 
--- /usr/src/etc/rc.d/fsck	Sat Oct 12 06:31:31 2002
+++ fsck	Sat Feb 21 03:08:18 2004
@@ -36,10 +36,28 @@
 		echo "Starting file system checks:"
 		case ${OSTYPE} in
 		FreeBSD)
+			# Set up the list of network filesystem types for which mounting
+			# should be delayed until after network initialization.
+			case ${extra_netfs_types} in
+			[Nn][Oo])
+				;;
+			*)
+				netfs_types="${netfs_types} ${extra_netfs_types}"
+				;;
+			esac
+
+			# Mount everything except nfs filesystems.
+			mount_excludes='no'
+			for i in ${netfs_types}; do
+				fstype=${i%:*}
+				mount_excludes="${mount_excludes}${fstype},"
+			done
+			mount_excludes=${mount_excludes%,}
+
 			if checkyesno background_fsck; then
-				fsck -F -p
+				fsck -F -p -t {mount_excludes}
 			else
-				fsck -p
+				fsck -p -t {mount_excludes}
 			fi
 			;;
 		NetBSD)


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: ceri 
State-Changed-When: Sat Feb 21 06:26:15 PST 2004 
State-Changed-Why:  
Please followup with a copy of your /etc/fstab file.  I strongly suspect 
that this is happening because you have neglected to set fs_passno to 
zero. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=63169 
State-Changed-From-To: feedback->closed 
State-Changed-By: kris 
State-Changed-When: Sat Apr 24 01:08:29 PDT 2004 
State-Changed-Why:  
Feedback timeout 

http://www.freebsd.org/cgi/query-pr.cgi?pr=63169 
>Unformatted:
