conf/72927: Undefined variable used in /etc/rc.d/root
Giorgos Keramidas
keramida at freebsd.org
Wed Oct 20 09:30:32 PDT 2004
The following reply was made to PR conf/72927; it has been noted by GNATS.
From: Giorgos Keramidas <keramida at freebsd.org>
To: Ralf Wenk <RZ-FreeBSD1004 at fh-karlsruhe.de>
Cc: bug-followup at 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 at 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
%%
More information about the freebsd-bugs
mailing list