NetBSD Problem Report #48927

From www@NetBSD.org  Thu Jun 19 12:47:56 2014
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 804A2A64F0
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 19 Jun 2014 12:47:56 +0000 (UTC)
Message-Id: <20140619124755.32518A6531@mollari.NetBSD.org>
Date: Thu, 19 Jun 2014 12:47:55 +0000 (UTC)
From: tnn@nygren.pp.se
Reply-To: tnn@nygren.pp.se
To: gnats-bugs@NetBSD.org
Subject: config(8) root on dkN doesn't work
X-Send-Pr-Version: www-1.0

>Number:         48927
>Category:       kern
>Synopsis:       config(8) root on dkN doesn't work
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jun 19 12:50:00 +0000 2014
>Closed-Date:    Sun Jun 12 14:50:18 +0000 2016
>Last-Modified:  Sun Jun 12 23:15:00 +0000 2016
>Originator:     Tobias Nygren
>Release:        6.99.44
>Organization:
>Environment:
>Description:
config(8) cannot wire the rootdev configuration to dk(4) devices.

>How-To-Repeat:
Try to build kernel:

include "arch/amd64/conf/GENERIC"
no config netbsd
config netbsd root on dk7 type ffs

Notice that it fails with:

# config GENERIC.test
GENERIC.test:7: netbsd: device `dk' does not exist

Attempt to trick config(8) by adding the following to GENERIC.test:

defpseudodev dk: disk
pseudo-device dk

... does not work:

dk.o:(.data+0x80): multiple definition of `dk_cd'

(additionally it will use the wrong minor number)

>Fix:
Workaround is to manually hack the desired root device into swapnetbsd.c after config(8) has run.

config(8) will probably have to be specifically taught about dk(4) devices.

>Release-Note:

>Audit-Trail:
From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/48927: config(8) root on dkN doesn't work
Date: Sun, 12 Jun 2016 03:28:17 +0000

 On Thu, Jun 19, 2014 at 12:50:00PM +0000, tnn@nygren.pp.se wrote:
  > config(8) cannot wire the rootdev configuration to dk(4) devices.
  > [...]
  > config(8) will probably have to be specifically taught about dk(4) devices.

 I had a patch for this a while back but it didn't work; I forget the
 details but I can rake it up if anyone would like to take charge of it.

 -- 
 David A. Holland
 dholland@netbsd.org

From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/48927: config(8) root on dkN doesn't work
Date: Sun, 12 Jun 2016 11:17:13 +0200

 On Sun, Jun 12, 2016 at 03:30:00AM +0000, David Holland wrote:
 >  I had a patch for this a while back but it didn't work; I forget the
 >  details but I can rake it up if anyone would like to take charge of it.

 I think it is fixed and even pulled up to -7 already:

 usr.bin/config/config.5                         1.35
 usr.bin/config/gram.y                           1.53
 usr.bin/config/sem.c                            1.74

         Extend syntax of config phrase, a quoted string instead of a
         device name is passed as root specification string.  
         This can be used to specify a wedge by name.
         [mlelstv, ticket #1164]

 Martin

State-Changed-From-To: open->closed
State-Changed-By: tnn@NetBSD.org
State-Changed-When: Sun, 12 Jun 2016 14:50:18 +0000
State-Changed-Why:
Have actually been running with root on dk(4) for a
good while and forgot I send this PR.
Confirmed fixed.


From: mlelstv@serpens.de (Michael van Elst)
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: kern/48927: config(8) root on dkN doesn't work
Date: Sun, 12 Jun 2016 23:08:09 +0000 (UTC)

 dholland-bugs@netbsd.org (David Holland) writes:

 > On Thu, Jun 19, 2014 at 12:50:00PM +0000, tnn@nygren.pp.se wrote:
 >  > config(8) cannot wire the rootdev configuration to dk(4) devices.
 >  > [...]
 >  > config(8) will probably have to be specifically taught about dk(4) devices.

 dk device names are a bit volatile. That's why config(8) has been taught
 to configure root by wedge name instead.


 -- 
 -- 
                                 Michael van Elst
 Internet: mlelstv@serpens.de
                                 "A potential Snark may lurk in every tree."

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.