Subject: Re: Disk slices [was: Re: dev_t ... ]
To: None <email@example.com, firstname.lastname@example.org>
From: Wolfgang Solfrank <email@example.com>
Date: 01/16/1998 19:03:55
> 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.)
More or less so.
> 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'.
Good description. Except for the last part, which implies that the 'partitions'
have to be entirely within a 'slice'. At least for the x86 architecture
this is _not_ so. In fact, the MBR 'slice' is only used to find the NetBSD
disklabel (if there happens to be one). I.e. the MBR 'slice' only needs to
have its start sector correct, length is ignored. (I'm using this on my
machine, as it happens to have a 1.3 GB disk of which the BIOS and thus the
MBR can only address the low 500 MB or so). And it's common practice to
address your DOS 'slice' by adding a NetBSD 'partition' to your NetBSD
disklabel that resembles exactly the layout of the DOS 'slice' from the
Now if there were support for converting foreign disklabel entries to
NetBSD 'partitions', and there were the possibility to have disklabels
only in core (so that you don't have to have a NetBSD 'slice' on a disk
in order to access its parts), everything would work out fine as far
as I'm concerned.
> 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.
ws@TooLs.DE (Wolfgang Solfrank, TooLs GmbH) +49-228-985800