Subject: Re: Some help with disklabel please?
To: David Brownlee <>
From: Jason Thorpe <>
List: current-users
Date: 08/09/1995 08:30:33
On Wed, 9 Aug 1995 11:18:38 +0100 (BST) 
 David Brownlee <> wrote:

 > 	I guess its mods to the kernel & disklabel
 > 	You could define in the kernel config file what disklabel
 > 	support you wanted.
 > 	options         SUNOS_DISKLABEL
 > 	options		MACOS_DISKLABEL

Indeed, it's arguable that all NetBSD ports should support the disklabel 
format of all other NetBSD ports of at least the same byte order...

Several months ago, I got inspired to work on this, and I had a disklabel 
auto-switching system that groked hp300 and Sun disklabels on my hp380.  
However, the fact that a few ports use a large value for MAXPARTITIONS 
made it ... extremely difficult to do in a generic fashion without 
changing the disklabel structure itself.  I'm sure there's a way to do 
it, but a combination of running ot of time and running out of motivation 
halted that effort.  I don't have the code anymore (it was thrown 
together as proof-of-concept, so probably isn't worth looking at anyhow), 
but I'm more than willing to describe to folks how it worked and some of 
the issues involved in a private e-mail, if interested.

 > 	Maybe a /sys/ufs/disklabels/ directory to hold the code?

Ummm ... well, given that disklabels are _not_ UFS-specific, this is a 
less-than-desirable place to put them.  My code lived in 

Also, to touch on a few things that I read before, but deleted the message...

In this thread there was a procedure posted, about that could happen with 
a disklael switch system...couple of point to make that could affect that 

	* At least in the MI SCSI code, the disklabel is read then the
	  device is opened, not when it is probed/matched/attached.

	* Not all ports keep the `whole disk' in the `c' partition.

	* Probably others ... maybe I'll dig through the archives today...

Just random thoughts on this subject...


Jason R. Thorpe                             
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