From nobody@FreeBSD.org  Thu Oct 18 11:38:00 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id D9A4848F
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 18 Oct 2012 11:38:00 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id C1E8A8FC0A
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 18 Oct 2012 11:38:00 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.5/8.14.5) with ESMTP id q9IBc0LU052665
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 18 Oct 2012 11:38:00 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id q9IBc0iJ052664;
	Thu, 18 Oct 2012 11:38:00 GMT
	(envelope-from nobody)
Message-Id: <201210181138.q9IBc0iJ052664@red.freebsd.org>
Date: Thu, 18 Oct 2012 11:38:00 GMT
From: Alexander Yerenkow <yerenkow@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Missing fstab in rootfs leads to problems
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         172849
>Category:       misc
>Synopsis:       Missing fstab in rootfs leads to problems
>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:   Thu Oct 18 11:40:00 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Alexander Yerenkow
>Release:        10.0-CURRENT FreeBSD 10.0-CURRENT #0 r241608: Tue Oct 16 16:32:03 EEST 2012
>Organization:
>Environment:
10.0-CURRENT FreeBSD 10.0-CURRENT #0 r241608: Tue Oct 16 16:32:03 EEST 2012     root@:/usr/obj/zstorage/src-clone/sys/GENERIC  amd64

>Description:
If you have single media, with missing fstab file (e.g. - no such file /etc/fstab)

Then boot will throw you forcedly to single user mode, and you will need interactively enter rootfs device, like

ufs:ada0s1 rw

More of that, options are really ignored, rootfs is always in RO, and 
mount -u / not working, so you can't set rootfs writeable, to create fstab.

This is very obscure situation, which required from you some external media to boot from just to mount your disk and create fstab with / record.

Currently even
mount -o rw -u /dev/ada0s1a /
NOT working.
>How-To-Repeat:
Get some FreeBSD, erase fstab, boot.
>Fix:
1. Fix options in mountroot prompt, e.g.
ufs:ada0s1 rw
will mount in RW, not in RO, so you'll be able to create fstab. (Or if UFS root can not be mounted in rw, change help, it's lying to me)

2. Deal with mount -u / when there's no fstab exists (make it work).


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