NetBSD Problem Report #38356
From minoura@nas-nfsclient1.tech.local.valinux.co.jp Wed Apr 2 07:24:31 2008
Return-Path: <minoura@nas-nfsclient1.tech.local.valinux.co.jp>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by narn.NetBSD.org (Postfix) with ESMTP id D5BC963B293
for <gnats-bugs@gnats.NetBSD.org>; Wed, 2 Apr 2008 07:24:31 +0000 (UTC)
Message-Id: <20080402060539.1D9EC7E@nas-nfsclient1.tech.local.valinux.co.jp>
Date: Wed, 2 Apr 2008 15:05:39 +0900 (JST)
From: minoura@netbsd.org
Reply-To: minoura@netbsd.org
To: gnats-bugs@gnats.NetBSD.org
Subject: multiboot(8) command line option root= does not work
X-Send-Pr-Version: 3.95
>Number: 38356
>Category: port-i386
>Synopsis: multiboot(8) command line option root= does not work
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: port-i386-maintainer
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Apr 02 07:25:00 +0000 2008
>Closed-Date: Thu Aug 10 13:55:45 +0000 2017
>Last-Modified: Thu Aug 10 13:55:45 +0000 2017
>Originator: minoura@netbsd.org
>Release: NetBSD 4.0_STABLE
>Organization:
>Environment:
System: NetBSD nas-nfsclient1 4.0_STABLE NetBSD 4.0_STABLE (VA22XX) #18: Wed Apr 2 13:31:03 JST 2008 minoura@c1:/usr/obj/sys/arch/i386/compile/VA22XX i386
Architecture: i386
Machine: i386
>Description:
multiboot(8) commandline option root= does not work when the
device unit number is not 0 (eg. root=sd1a), and the device is
configured with a wildcard unit number (eg. sd* at scsibus0).
>How-To-Repeat:
Boot GENERIC from the second disk via grub with root= option.
eg. kernel (hd1,a)/netbsd root=sd1a
>Fix:
Use struct device instead of struct cfdata to match the unit number.
(-current has the same code...)
--- /sys/arch/x86/x86/x86_autoconf.c.BAK 2006-10-06 11:29:08.000000000 +0900
+++ /sys/arch/x86/x86/x86_autoconf.c 2008-04-02 13:36:02.000000000 +0900
@@ -452,7 +452,7 @@
len = strlen(cd->cf_name);
if (strncmp(cd->cf_name, biv->devname, len) == 0 &&
- biv->devname[len] - '0' == cd->cf_unit) {
+ biv->devname[len] - '0' == dv->dv_unit) {
handle_wedges(dv, biv->devname[len + 1] - 'a');
return;
}
>Release-Note:
>Audit-Trail:
From: yamt@mwd.biglobe.ne.jp (YAMAMOTO Takashi)
To: gnats-bugs@NetBSD.org
Cc: port-i386-maintainer@netbsd.org, gnats-admin@netbsd.org,
netbsd-bugs@netbsd.org
Subject: Re: port-i386/38356: multiboot(8) command line option root= does not
work
Date: Fri, 4 Apr 2008 13:02:39 +0900 (JST)
> if (strncmp(cd->cf_name, biv->devname, len) == 0 &&
> - biv->devname[len] - '0' == cd->cf_unit) {
> + biv->devname[len] - '0' == dv->dv_unit) {
i guess it should be device_unit().
otherwise seems reasonable to me.
YAMAMOTO Takashi
From: makoto@hauN.ORG (MINOURA Makoto)
To: yamt@mwd.biglobe.ne.jp (YAMAMOTO Takashi)
Cc: gnats-bugs@NetBSD.org, port-i386-maintainer@netbsd.org,
gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: port-i386/38356: multiboot(8) command line option root= does not work
Date: Fri, 04 Apr 2008 21:00:16 +0900
|> In <20080404040239.7C5AD11704@yamt.dyndns.org>
|> yamt@mwd.biglobe.ne.jp (YAMAMOTO Takashi) wrote:
> > if (strncmp(cd->cf_name, biv->devname, len) == 0 &&
> > - biv->devname[len] - '0' == cd->cf_unit) {
> > + biv->devname[len] - '0' == dv->dv_unit) {
> i guess it should be device_unit().
> otherwise seems reasonable to me.
I didn't know that function. Thanks.
--
Minoura Makoto <makoto@hauN.org>
From: =?UTF-8?B?R3LDqWdvaXJlIFN1dHJl?= <gsutre@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/38356 CVS commit: src/sys/arch/x86/x86
Date: Mon, 19 Sep 2011 10:03:32 +0000
Module Name: src
Committed By: gsutre
Date: Mon Sep 19 10:03:32 UTC 2011
Modified Files:
src/sys/arch/x86/x86: x86_autoconf.c
Log Message:
PR/38356: Minoura Makoto: Use the device's unit (instead of autoconf's)
to match the bootinfo root device.
Fixes multiboot(8) root= option as well as GRUB knetbsd --root option.
To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/sys/arch/x86/x86/x86_autoconf.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: PR/38356 CVS commit: src/sys/arch/x86/x86
Date: Sat, 5 Nov 2011 12:42:06 +0000
On Mon, Sep 19, 2011 at 10:05:03AM +0000, Gr?goire Sutre wrote:
> Log Message:
> PR/38356: Minoura Makoto: Use the device's unit (instead of autoconf's)
> to match the bootinfo root device.
I guess at this point this should be pulled up to both -4 and -5?
--
David A. Holland
dholland@netbsd.org
State-Changed-From-To: open->closed
State-Changed-By: maxv@NetBSD.org
State-Changed-When: Thu, 10 Aug 2017 13:55:45 +0000
State-Changed-Why:
This issue was obviously fixed; and no need for -4 and -5 pullups anymore.
I'm closing this PR.
>Unformatted:
(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-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.