Date: Wed, 20 Oct 2004 09:42:45 -0700 From: Brooks Davis <brooks@one-eyed-alien.net> To: Giorgos Keramidas <keramida@freebsd.org> Cc: freebsd-bugs@freebsd.org Subject: Re: conf/72927: Undefined variable used in /etc/rc.d/root Message-ID: <20041020164245.GD11477@odin.ac.hmc.edu> In-Reply-To: <200410201630.i9KGUVI0079659@freefall.freebsd.org> References: <200410201630.i9KGUVI0079659@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <keramida@freebsd.org> > To: Ralf Wenk <RZ-FreeBSD1004@fh-karlsruhe.de> > 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 <RZ-FreeBSD1004@fh-karlsruhe.de> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041020164245.GD11477>