Subject: port-sparc64/26044: disklabel fails to write to SCSI disk on Netra T1 (sparc64)
To: None <gnats-bugs@gnats.NetBSD.org>
From: Chris Ross <cross+netbsd@distal.com>
List: netbsd-bugs
Date: 06/24/2004 20:32:30
>Number:         26044
>Category:       port-sparc64
>Synopsis:       disklabel fails to write to SCSI disk on Netra T1 (sparc64)
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    port-sparc64-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jun 24 20:33:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Chris Ross
>Release:        2.0F (20040623)
>Organization:
>Environment:
N/A
sparc64 Netra T1-105, 2 SCSI disks (internal)
>Description:
I've built an install ISO for a sparc64 build.  I've built this release and ISO on each of a Solaris sparc64, and a NetBSD 2.0F i386.  In both cases, the installed ISO boots, and begins sysinst.  After defining disk partitioning, the 'disklabel' command fails with an error in write(2):

     Status: Command failed
    Command: disklabel -w -r -f /tmp/disktab sd0 'mydisk'
     Hit enter to continue
--------------------------------------------------------------------------------
write: No such file or directory

  In looking at the source (sbin/disklabel/disklabel.c - rev 1.133), there are two places in the writelabel() function that could cause this error message (lines 558 and 567), but I don't know which one I'm hitting, or why.  The same command (listed above) fails in the same way from a shell, and without the -r (thus avoiding writing to the device) works just fine.

  Please let me know if you understand why this is happening, or what I can do to fix it.  This is preventing me from installing on sparc64's, which I need to fix very quickly.

  Thank you.
>How-To-Repeat:
Build an ISO for the current sparc64 sources, boot it, and try to label a disk.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted: