Subject: Re: Some help with disklabel please?
To: Leo Weppelman <>
From: Bill Studenmund <>
List: current-users
Date: 08/10/1995 10:27:30
On Thu, 10 Aug 1995, Leo Weppelman wrote:

> > Huh?  I assume you mean ``Is it easy to tell the difference between 
> > Umm .. the _is_ no difference between them, except for the size of the 
> > partition map in them.  For example, the MAXPARTITIONS value on the hp300 
> > is 8, but on the Amiga it's 16.  This means that sizeof(struct disklabel) 
> > is different on these platforms.  So, the disklabel checksums will be 
> > wrong if an hp300 reads an amiga's disklabel, since it won't read the 
> > whole disklabel ... The biggest problem is _finding_ the disklabels...
> This problem is far from trivial. Mostly the exact location depends on
> the contents of the systems native partition table, because disks tend to
> be shared between more than on OS. This means that if you want to read
> the NetBSD-disklabel from an atari disk on some other platform, you first
> have to interpret the native AHDI partitioning to find out what partitions
> are not used by GEM (the native OS). The remaining partitions _may_
> contain an NetBSD label or a Linux label or .... .
> An extra problem is that some ports 'fake' a disklabel from the 'native'
> disklabel when there is no real NetBSD label. These disks look perfectly
> labeled from NetBSD.... This is true for the atari and ,if i am correct,
> also for the amiga.

(Eduardo E. Horvath, in a seperate message confirms that the Amiga fakes 
a disklabel. The Mac port also fakes a disklabel.)

I agree that it is a far-from-trivial problem. But my assertion is
that it is a far-from-trivial _SOLVED_ problem. Each port has had to
decide what to do about disklabels. Are they really on the disk, or 
faked? Can they be written?

What I'm trying to suggest is that we make a way for ports to share
with each other how to deal with their native OS's partitioning scheme, and
for the kernel to be able to tell if a drive is formatted with a 
particular scheme. We then respect the ports choices about behaviors for
its drives (I.E. you can only write disklabels on drives partitioned in
a scheme that supports writing disklabels).

I think the -endianism will be the one big problem.

Take care,