From nobody@FreeBSD.org  Sat Nov  5 08:22:51 2005
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id BACAA16A41F
	for <freebsd-gnats-submit@FreeBSD.org>; Sat,  5 Nov 2005 08:22:51 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 86DC243D4C
	for <freebsd-gnats-submit@FreeBSD.org>; Sat,  5 Nov 2005 08:22:51 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id jA58MnGL096280
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 5 Nov 2005 08:22:49 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id jA58MnDR096279;
	Sat, 5 Nov 2005 08:22:49 GMT
	(envelope-from nobody)
Message-Id: <200511050822.jA58MnDR096279@www.freebsd.org>
Date: Sat, 5 Nov 2005 08:22:49 GMT
From: Brad Huntting <huntting@glarp.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: cannot mount root rw at boot
X-Send-Pr-Version: www-2.3

>Number:         88518
>Category:       kern
>Synopsis:       cannot mount root rw at boot
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Nov 05 08:30:14 GMT 2005
>Closed-Date:    
>Last-Modified:  Wed Jul 03 01:36:20 UTC 2013
>Originator:     Brad Huntting
>Release:        6.0-RELEASE
>Organization:
>Environment:
?     
>Description:
              The machine in question has problems booting the 6.0-RELEASE 'boot-only' CD.  But it can boot diskless over the network.

The procedure listed below works when installing 5.4-RELEASE, but not on 6.0-RELEASE.  The problem is that the kernel is mounting the root partition readonly even when the root partition is an 'md' pseudo-device.

A hack in 5.4's kern/vfs_mount.c causes mountroot to use RW when mounting an md device.  This appears to be missing in 6.0.

But what's more disturbing, is that the kernel flag (was it -w ?) for 'mount the root partition readwrite' appears to be missing in 5.4 and probably 6.0.  This was a very usefull flag, did it change?  Why was it removed?
>How-To-Repeat:
        Copy the 'boot-only' cd to a tftp- and nfs-exported directory and setup dhcp.conf accordingly.  For example:

  filename "/scratch/diskless/FreeBSD/6.0R/boot/pxeboot";
  option root-path "pernicious.glarp.com:/scratch/diskless/FreeBSD/6.0R";

Assuming you have permissions set correctly in /etc/exports, and tftp enabled from /etc/inetd.conf, a machine which net-boot's should get thrown into the FreeBSD install procedure.

>Fix:
              Either restore the -w flag (or make a kernel environment switch 'boot_readwrite'), or reinstitute the hack in vfs_mount.c that causes 'md' root filesystems to be mounted readwrite initially.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->rodrigc 
Responsible-Changed-By: rodrigc 
Responsible-Changed-When: Sat Jun 3 04:43:09 UTC 2006 
Responsible-Changed-Why:  
Mine 

http://www.freebsd.org/cgi/query-pr.cgi?pr=88518 
State-Changed-From-To: open->open 
State-Changed-By: linimon 
State-Changed-When: Wed Jul 3 00:50:32 UTC 2013 
State-Changed-Why:  
commit bit has been taken in for safekeeping. 


Responsible-Changed-From-To: rodrigc->freebsd-bugs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Wed Jul 3 00:50:32 UTC 2013 
Responsible-Changed-Why:  

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