Subject: Re: Item of future thought: disklabels
To: Todd Vierling <tv@pobox.com>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: current-users
Date: 07/27/1996 09:22:52
On Fri, 26 Jul 1996 21:16:06 -0400 (EDT) 
 Todd Vierling <tv@pobox.com> wrote:

 > : Do you mean to say that even native NetBSD disklabels on different
 > : architectures with the _same_ byte-order may have different layouts?!?
 > 
 > Absolutely.  They have to be different to be compatible with the various
 > machines' boot ROMs.  Amiga Rigid Disk Block (RDB) disklabel for Amiga;
 > HP300 HP-UX disklabel for HP300; SunOS style disklabel for Sun3... and all
 > three of these are not only the same byte order, but the same processor!

Couple of comments (one of which was partially addressed above, but I'll 
repeat it anyway :-)

	a) NetBSD/hp300 does not use HP-UX disklabels; it uses
	   native BSD (where BSD is defined as 4.4BSD... To my 
	   recollection, HP-BSD from Utah didn't support disklabels
	   in any release.)  In fact, even through HP-UX 9, HP-UX
	   didn't support disklabels/partitions on the hp300.
	   The only platform that I remember HP-UX supporting real
	   partitions on was the early 800-series.

	b) The layout of the disklabel really has nothing to with
	   the kind of processor a system has.  It's really dependent
	   on what the platform's boot monitor expects.  The sun3,
	   for example, requires Sun labels so that the PROM will load
	   the boot block.  The hp300 PROM doesn't expect any partitions,
	   but expects a LIF file to appear in a certain place on the disk.
	   So, NetBSD/hp300 needs to keep the label in an area that won't
	   interfere with the LIF file.

Realistically, forcing all ports to behave in exactly the same way is 
impossible.  The best we can hope for is to provide a reasonable 
abstraction/interface to the user so that the user doesn't have to care 
about these details.

Ciao.

 -- save the ancient forests - http://www.bayarea.net/~thorpej/forest/ -- 
Jason R. Thorpe                                       thorpej@nas.nasa.gov
NASA Ames Research Center                               Home: 408.866.1912
NAS: M/S 258-6                                          Work: 415.604.0935
Moffett Field, CA 94035                                Pager: 415.428.6939