From owner-freebsd-bugs@FreeBSD.ORG Wed Oct 20 16:41:50 2004 Return-Path: Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 46FDE16A4CE; Wed, 20 Oct 2004 16:41:50 +0000 (GMT) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 10BD843D60; Wed, 20 Oct 2004 16:41:50 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id i9KGgjV4023980; Wed, 20 Oct 2004 09:42:45 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id i9KGgjF7023979; Wed, 20 Oct 2004 09:42:45 -0700 Date: Wed, 20 Oct 2004 09:42:45 -0700 From: Brooks Davis To: Giorgos Keramidas Message-ID: <20041020164245.GD11477@odin.ac.hmc.edu> References: <200410201630.i9KGUVI0079659@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200410201630.i9KGUVI0079659@freefall.freebsd.org> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu cc: freebsd-bugs@freebsd.org Subject: Re: conf/72927: Undefined variable used in /etc/rc.d/root X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Oct 2004 16:41:50 -0000 On Wed, Oct 20, 2004 at 04:30:31PM +0000, Giorgos Keramidas wrote: > The following reply was made to PR conf/72927; it has been noted by GNATS. > > From: Giorgos Keramidas > To: Ralf Wenk > Cc: bug-followup@freebsd.org > Subject: Re: conf/72927: Undefined variable used in /etc/rc.d/root > Date: Wed, 20 Oct 2004 19:23:23 +0300 > > On 2004-10-20 17:50, Ralf Wenk wrote: > > The root_rw_mount variable which is evaluated in /etc/rc.d/root is, > > even in the case of a diskless boot, undefined. This causes a diskless > > boot with a read only root filesystem to fail. > > > > >How-To-Repeat: > > Try a diskless boot with readonly root filesystem or search for another > > occurence of root_rw_mount in the source other than /usr/src/etc/rc.d/root. > > > > >Fix: > > Until there is a better solution, like the detection of a read only root > > filesystem in "the right place", add root_rw_mount="YES" to /etc/rc.conf. > > How about setting this in /etc/defaults/rc.conf to "YES" and documenting > it in rc.conf(5) for people using a diskless setup? Does the following > look ok to you? > > %% > Index: etc/defaults/rc.conf > =================================================================== > RCS file: /home/ncvs/src/etc/defaults/rc.conf,v > retrieving revision 1.225 > diff -u -u -r1.225 rc.conf > --- etc/defaults/rc.conf 13 Oct 2004 07:12:14 -0000 1.225 > +++ etc/defaults/rc.conf 20 Oct 2004 16:13:29 -0000 > @@ -55,6 +55,7 @@ > gbde_swap_enable="NO" # Set to YES to automatically initialize gbde swap > # devices listed in fstab with a random one-shot key > > +root_rw_mount="YES" # Set to NO to inhibit remounting root read-write. > fsck_y_enable="NO" # Set to YES to do fsck -y if the initial preen fails. > background_fsck="YES" # Attempt to run fsck in the background where possible. > background_fsck_delay="60" # Time to wait (seconds) before starting the fsck. > Index: share/man/man5/rc.conf.5 > =================================================================== > RCS file: /home/ncvs/src/share/man/man5/rc.conf.5,v > retrieving revision 1.228 > diff -u -u -r1.228 rc.conf.5 > --- share/man/man5/rc.conf.5 17 Oct 2004 13:19:10 -0000 1.228 > +++ share/man/man5/rc.conf.5 20 Oct 2004 16:19:51 -0000 > @@ -1093,6 +1093,17 @@ > .Pa /etc/fstab > will be initialized with a random, one-shot key. > Note that this makes recovery of kernel dumps impossible. > +.It Va root_rw_mount > +.Pq Vt bool > +If set to > +.Dq Li YES , > +the root file system is remounted as read-write after the filesystems > +are checked. > +Diskless systems that mount their filesystem from a read-only remote > +NFS share should set this to > +.Dq Li NO > +in their > +.Pa rc.conf . > .It Va fsck_y_enable > .Pq Vt bool > If set to > %% This looks like the correct fix to me. -- Brooks