From marck@woozle.rinet.ru  Tue Feb 10 11:14:07 2004
Return-Path: <marck@woozle.rinet.ru>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id AEE5816A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 10 Feb 2004 11:14:07 -0800 (PST)
Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 0609B43D31
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 10 Feb 2004 11:14:07 -0800 (PST)
	(envelope-from marck@woozle.rinet.ru)
Received: from woozle.rinet.ru (localhost [127.0.0.1])
	by woozle.rinet.ru (8.12.10/8.12.10) with ESMTP id i1AJE5ci001546
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 10 Feb 2004 22:14:05 +0300 (MSK)
	(envelope-from marck@woozle.rinet.ru)
Received: (from marck@localhost)
	by woozle.rinet.ru (8.12.10/8.12.10/Submit) id i1AJE594001545;
	Tue, 10 Feb 2004 22:14:05 +0300 (MSK)
	(envelope-from marck)
Message-Id: <200402101914.i1AJE594001545@woozle.rinet.ru>
Date: Tue, 10 Feb 2004 22:14:05 +0300 (MSK)
From: Dmitry Morozovsky <marck@rinet.ru>
Reply-To: Dmitry Morozovsky <marck@rinet.ru>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: loader/kernel answer to `boot -a' ignored when comconsole is configured
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         62658
>Category:       kern
>Synopsis:       [boot] loader/kernel answer to `boot -a' ignored when comconsole is configured
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Feb 10 11:20:14 PST 2004
>Closed-Date:    Fri Nov 24 12:10:52 GMT 2006
>Last-Modified:  Fri Nov 24 12:10:52 GMT 2006
>Originator:     Dmitry Morozovsky
>Release:        FreeBSD 4-STABLE i386
>Organization:
Cronyx Plus LLC (RiNet ISP)
>Environment:
System: FreeBSD 4-STABLE 


>Description:

FreeBSD loader/kernel refuses to set up the emergency root device when asked to, if
the console is configured as comconsole:

[loader prompt] boot -a -s
...
...
ad0: 7339MB <QUANTUM FIREBALL EL7.6A> [15907/15/63] at ata0-master UDMA33

Manual root filesystem specification:
  <fstype>:<device>  Mount <device> using filesystem <fstype>
                       eg. ufs:/dev/da0s1a
  ?                  List valid disk boot devices
  <empty line>       Abort manual input

mountroot> ufs:/dev/ad0s1e
Mounting root from ufs:/dev/ad0s1a

Look at the two last lines. Input asked at vfs_mountroot_ask() has not been
used, possibly because kern/vfs_conf.c:gets() dit not actually read the input
from comconsole. However, I'm not kernel hacker and looking at kern/tty_cons.c
scares me a bit :)

yar@ confirmed this bug also exists in -current

>How-To-Repeat:
configure comconsole, such as `echo -h >/boot.config'
reboot
enter any path to root partition but configured, or simple `?'
watch for kernel mounting default root partition

>Fix:

None for the moment, sorry.

Possible workaround (at least for 4-stable):

set vfs.root.mountfrom="/dev/DEVICE-TO-MAKE-ROOT"

at loader prompt before `boot'
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: marck 
State-Changed-When: Fri Nov 24 12:08:57 UTC 2006 
State-Changed-Why:  
Fixed both in HEAD and RELENG_6 after 2006-11-22. 


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