Subject: Re: Disklabel ioctls (was Re: nore on disk ...)
To: None <tech-kern@NetBSD.ORG>
From: Ty Sarna <>
List: tech-kern
Date: 11/17/1995 16:24:24
In article <>,
Waldi Ravens  <> wrote:
> Looks good. I just wonder if there could be clashes between the vendor
> specific labels. The AHDI label must be one of the worst, no magic
> numbers, no checksums, just try to find some sensible data, doing as
> much sanity checks (e.g. partition extends beyond medium) as possible.
> I wonder if any other vendors were foolish enough to `invent' such
> nonsense.

There should probably be some sort of priority scheme, so that formats
that can quickly and accurately be probed would be read first, down to
AHDI next to last, and DISKLABEL_NONE last of all.

> I suppose you mean re-initialising the disk, not transferring from one
> format to another, while keeping all original partitions and data?

Yes. Well, if told to rewrite the disklabel with a format different than
that currently in place, it would do so, with the understanding that
this might trash partitions. Trying to guarantee format conversion with
no loss of data is a bit much, but for some formats (different versions
of BSD labels, perhaps) it might be possible.

> Indeed, that's one of the reasons to have a NetBSD disk label within one
> of the AHDI partitions. The former can easily be modified and rewritten,
> which is mostly impossible (or at least extremely complicated) with the
> latter.

AHDI and RDB seem quite similar in concept (but RDB has magic numbers
and is sane :->), yet the Amiga port went the other route, and uses one
RDB partition per BSD partition, and offers no label writing capability.
This also has advantages.