netbsd-bugs@netbsd.org
[Top] [All Lists]

port-i386/38356: multiboot(8) command line option root= does not work

Subject: port-i386/38356: multiboot(8) command line option root= does not work
From:
Date: Wed, 2 Apr 2008 07:25:01 +0000 UTC
>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:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Apr 02 07:25:00 +0000 2008
>Originator:     minoura@xxxxxxxxxx
>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;
                        }

<Prev in Thread] Current Thread [Next in Thread>