From nobody@FreeBSD.org  Sat Mar  1 06:33:58 2014
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id F22F0676
	for <freebsd-gnats-submit@FreeBSD.org>; Sat,  1 Mar 2014 06:33:58 +0000 (UTC)
Received: from newred.freebsd.org (cgiserv.freebsd.org [IPv6:2001:1900:2254:206a::50:4])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id DC9571CCB
	for <freebsd-gnats-submit@FreeBSD.org>; Sat,  1 Mar 2014 06:33:58 +0000 (UTC)
Received: from cgiserv.freebsd.org ([127.0.1.6])
	by newred.freebsd.org (8.14.7/8.14.7) with ESMTP id s216Xw7q029258
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 1 Mar 2014 06:33:58 GMT
	(envelope-from nobody@cgiserv.freebsd.org)
Received: (from nobody@localhost)
	by cgiserv.freebsd.org (8.14.7/8.14.7/Submit) id s216XwsA029236;
	Sat, 1 Mar 2014 06:33:58 GMT
	(envelope-from nobody)
Message-Id: <201403010633.s216XwsA029236@cgiserv.freebsd.org>
Date: Sat, 1 Mar 2014 06:33:58 GMT
From: "A.J. Kehoe IV (Nanoman)" <3LmB4Mvj@nanoman.ca>
To: freebsd-gnats-submit@FreeBSD.org
Subject: FreeBSD memstick Images Fail to Boot from Read-Only Media
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         187161
>Category:       conf
>Synopsis:       FreeBSD memstick Images Fail to Boot from Read-Only Media
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Mar 01 06:40:01 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     A.J. Kehoe IV (Nanoman)
>Release:        10.0-RELEASE
>Organization:
Nanoman's Company
>Environment:
FreeBSD localhost 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014     root@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
By default, /etc/rc.d/root tries to mount the root filesystem as read-write, which causes startup to abort when booting from read-only media that was created using the official memstick images.
>How-To-Repeat:
1. Get a USB flash drive that has a write protection switch.
2. Disable write protection on the USB flash drive.
3. Connect the USB flash drive to your system.
4. dd if=/path/to/FreeBSD-10.0-RELEASE-amd64-memstick.img of=/dev/usbflashdrive
5. Enable write protection on the USB flash drive.
6. Boot your system from the USB flash drive.
>Fix:
On the system that creates the official FreeBSD memstick images:

echo 'root_rw_mount="NO"' >> /path/to/memstick/etc/rc.conf

To patch your current memstick image before creating your read-only media:

1. mdconfig -a -t vnode -u 0 -f /path/to/FreeBSD-10.0-RELEASE-amd64-memstick.img
2. mount -t ufs /dev/md0 /mnt
3. echo 'root_rw_mount="NO"' >> /mnt/etc/rc.conf
4. umount /mnt
5. mdconfig -d -u 0

>Release-Note:
>Audit-Trail:
>Unformatted:
