Subject: port-hp300/17710: hp300 disklabel does not generate valid default labels and does not work in sysinst/miniroot
To: None <gnats-bugs@gnats.netbsd.org>
From: None <michael@nosflow.com>
List: netbsd-bugs
Date: 07/24/2002 14:04:56
>Number:         17710
>Category:       port-hp300
>Synopsis:       hp300 disklabel does not generate valid default labels and does not work in sysinst/miniroot
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    port-hp300-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jul 24 14:05:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     michael wolfson
>Release:        1.6_BETA4
>Organization:
>Environment:
NetBSD 1.6_BETA4 (INSTALL) #0: Sat Jul 20 23:22:33 UTC 2002
    autobuild@tgm.daemon.org:/autobuild/hp300/OBJ/autobuild/src/sys/arch/hp300/c

>Description:
Several problems with hp300 disklabel.

A) does not generate valid default labels.  This prevents sysinst from working correctly (plus it's really annoying when creating a new label by hand)

B) miniroot is unable to label a new disk (one without a label).

C) does not properly deal with hp300 bootloader.  See the comments in the basesrc/distrib/hp300/miniroot/install.md

# because
	# of limitations in disklabel(8), we've had to fudge the number
	# of cylinders up 1 so that disklabel(8) doesn't complain about
	# `c' running past the end of the disk, which can be quite
	# common even with OEM HP drives!
>How-To-Repeat:
Take a fresh disk (one without a label), such as sd0
sd0 at oscsi0 targ 0 lun 0: <QUANTUM, FIREBALL540S, 1Q09> (SCSI-2)
sd0: 3835 cylinders, 2 heads, 1065235 blocks, 512 bytes/block

A) run sysinst and use anything other than "use existing" label, for example I chose "Standard with X", and this is what it came up with:
 We now have your BSD-disklabel partitions as (Size and Offset in MB):

    Size      Offset    End       FStype Bsize Fsize Preserve Mount point
    --------- --------- --------- ------ ----- ----- -------- -----------
 a: 20        0         19        4.2BSD 8192  1024  No       /
 b: 128       20        148       swap
 c: 0         0         0         unused
 d: -148      149       -1        4.2BSD 8192  1024  No       /usr
 e: 0         0         0         unused
 f: 0         0         0         unused
 g: 0         0         0         unused

B) Run miniroot, and edit the label on your new disk.  When done, it says:
disklabel: ioctl DIOCWDINFO: No disk label on disk;
use "disklabel -I" to install initial label
re-edit the label? [y]:

C) Try creating a disklabel by hand from the drive's physical info and writing it to the disk.
>Fix:

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