Subject: Disk slices [was: Re: dev_t ... ]
To: Perry E. Metzger <>
From: Jeremy Cooper <>
List: tech-kern
Date: 01/16/1998 09:39:55
On Fri, 16 Jan 1998, Perry E. Metzger wrote:

> > > Bill S.(?) wrote:
> > > [ The advantage of disk slices is interoperability between OSes ] 
> > 
> > ... ... ... ...                                  Do you really suggest
> > that we implement the disklabel scheme of every other OS in the world?
> > _In the kernel_?
> Wolfgang, this is actually useful, yes. It makes a considerable amount
> of sense for your FreeBSD partitions to "just work" or to be able to
> just look at your Linux or Windows paritition without bending over
> backwards. This is a serious win for the users.

Don't get too far out of hand here.  I think Wolfgang is asking if adding
slices to the disk model means that we have to add support for the
interpretation of the contents of other slices that might exist on a disk,
or add generic (machine independent) code to interpret the slice tables of
all machine architectures.  (Neither is true.)

It's important to note here that the ROM or BIOS code on virtually every
machine that runs or will run NetBSD has a partitioning scheme of its own.
Under the PC-AT architecure this scheme is the ``Master Boot Record''.  On
Sun machines I haven't heard any official name for it, but there is a
partitioning table dictated by the ROM as well.

Sometimes the structure of this partition table is good enough that NetBSD
can adopt it as its own.  (Such as with Sun machines.)  But sometimes it
is just too rigid or limited.  (As with the MBR, which can only support 4
partitions on a disk.)  As such, we'd like to add a little knowledge in
the kernel that NetBSD will sometimes have to live in entirely within one
of these ROM partitions, which would now be called a 'slice', and 
within it create sub-partitions in the normal UNIX sense, which would
be called 'partitions'.

The point of this excercise is to create an interface such that other
parts of the kernel, or even user-level programs, can address the other
ROM partitions, instead of denying their existance as is currently done. 
This doesn't mean that the kernel need be taught about the
sub-partitioning scheme of the operating systems inhabiting the other
slices, if any.