Subject: port-hp300/4071: hp300 standalone disklabel doesn't fill out required fields
To: None <gnats-bugs@gnats.netbsd.org>
From: None <Havard.Eidnes@runit.sintef.no>
List: netbsd-bugs
Date: 09/01/1997 20:12:59
>Number:         4071
>Category:       port-hp300
>Synopsis:       hp300 standalone disklabel doesn't fill out required fields
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Sep  1 11:20:01 1997
>Last-Modified:
>Originator:     Havard Eidnes
>Organization:
	SINTEF RUNIT
>Release:        NetBSD-current snapshot 970818
>Environment:
	HP-9000/433t, hp300 snapshot 970818
System: NetBSD vader.runit.sintef.no 1.2G NetBSD 1.2G (VADER) #8: Tue Aug 26 17:26:24 MEST 1997 he@vader.runit.sintef.no:/usr/src/sys/arch/i386/compile/VADER i386

>Description:
	I recently tried to install the 970818 hp300 snapshot on a
	system with a single brand new 4GB disk.  The system on the
	miniroot didn't manage to mount the root file system; the last
	messages during boot were:

	boot device: sd0
	root on sd0b dumps on sd0b
	no file system for sd0 (dev 0x401)
	cannot mount root, error = 79

	I had a suspicion that the reason was that when we did 'zap' in
	the standalone installation program and proceeded to label the disk
	with a fresh disklabel, some fields were left uninitialized (i.e.
	zeroed out).  In particular, from eyeballing the code, the "file 
	system type" fields doesn't appear to be filled out at all.

	This suspicion was confirmed when I booted from an external disk
	and inspected and fixed the disklabel (also filling out the "total
	number of sectors", setting blocksize/fragsize/cpg), and then
	proceeded to boot from the miniroot already downloaded to the system
	disk, and this time the miniroot system came up just fine.

	Thus, I conclude that the 'zap' function (or other parts of the
	standalone disklabel functions) need to be modified to provide
	sensible values to the non-user-supplied fields in the disklabel.

>How-To-Repeat:
	Use the 'zap' function in sys_inst, set up a new disk label, download
	the miniroot to the b partition, and watch the miniroot fail to boot
	properly.

>Fix:
	Sorry, no code here, but the above should (hopefully) be enough to 
	suggest what needs to be fixed.
>Audit-Trail:
>Unformatted: