Subject: port-macppc/15825: Machines booting from third-party SCSI cards can't find root device
To: None <gnats-bugs@gnats.netbsd.org>
From: None <monroe@pobox.com>
List: netbsd-bugs
Date: 03/06/2002 20:19:55
>Number:         15825
>Category:       port-macppc
>Synopsis:       Machines booting from third-party SCSI cards can't find root device
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    port-macppc-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Mar 06 20:20:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Monroe Williams
>Release:        1.5.2
>Organization:
>Environment:
NetBSD critter.criticalpath.com 1.5.2 NetBSD 1.5.2 (CRITTER) #8: Tue Oct 16 18:55:30 PDT 2001     monroe@macppc.indirect.org:/mount/ide/critter/1.5.2/usr/src/sys/arch/macppc/compile/CRITTER macppc

>Description:
Boot NetBSD-macppc on a disk attached to a SCSI card with a comma (",") in its Open Firmware name.  (This is quite common, since the standard naming scheme is the manufacturer's stock ticker symbol, a comma, and the card name.)  The kernel will not be able to find its root device.

The culprit is in canonicalize_bootpath() in sys/arch/macppc/macppc/autoconf.c.  This bit:

>        /* XXX Does this belong here, or device_register()? */
>       if ((p = strrchr(cbootpath, ',')) != NULL)
>               *p = 0;

truncates the boot path if any of the devices in the path have commas in their names.

This problem, along with one solution, was reported here:

http://mail-index.netbsd.org/port-macppc/2001/10/20/0000.html

and a reason not to use this solution is here:

http://mail-index.netbsd.org/port-macppc/2001/10/21/0001.html

It would be really nice to fix this in the release branch before the next release, since it can keep new users from getting up and running.

>How-To-Repeat:
See full description.
>Fix:
Removing the offending code fixes the problem on machines with Open Firmware 3.x, but may cause problems for OF 1.x or 2.x machines.  I'm not sure what the general-case fix is.  There's a comment in the code that suggests another solution.
>Release-Note:
>Audit-Trail:
>Unformatted: