Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Jun 2003 12:26:19 +0300
From:      Vasil Dimov <vd@datamax.bg>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:    bin/53366: rc.d/root is trying "mount /" while starting up any jails
Message-ID:  <1055755579.736081.5730.nullmailer@sinanica.lg2a.datamax>
Resent-Message-ID: <200306160930.h5G9UKDL087896@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         53366
>Category:       bin
>Synopsis:       rc.d/root is trying "mount /" while starting up any jails
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun 16 02:30:19 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Vasil Dimov
>Release:        FreeBSD 5.1-RELEASE i386
>Organization:
DataMax
>Environment:
System: FreeBSD sinanica.lg2a.datamax 5.1-RELEASE FreeBSD 5.1-RELEASE #1: Wed Jun 11 17:17:57 EEST 2003 root@sinanica.lg2a.datamax:/usr/obj/usr/src/sys/SINANICA i386
>Description:
/etc/rc.d/root unconditionally executes
umount -a >/dev/null 2>&1
mount /
which causes warnings while jails' startup.
According to jail(8) /etc/fstab in the jail must be empty, so the included
patch fixes the problem. But probably rc.d/root must not be executed at all
during jail startup. I think removing it from the jail's rc.d/ directory is
not a good idea. Another fix is if rc.d/root can understand whether it is
running in a jail and quit in this case.
>How-To-Repeat:
Setup and start a jail as described in jail(8).
>Fix:
--- /usr/src/etc/rc.d/root	Thu Oct 31 04:06:05 2002
+++ root	Mon Jun 16 10:51:51 2003
@@ -32,8 +32,10 @@
 			;;
 		esac
 
-		umount -a >/dev/null 2>&1
-		mount /
+		if [ -s /etc/fstab ] ; then
+			umount -a >/dev/null 2>&1
+			mount /
+		fi
 
 		# If we booted a special kernel remove the record
 		# so we will boot the default kernel next time.
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1055755579.736081.5730.nullmailer>