Subject: Re: A new partition handling scheme: wedges
To: None <>
From: Gordon W. Ross <>
List: tech-kern
Date: 01/26/1998 12:32:30
> From: (Charles M. Hannum)
> Date: 26 Jan 1998 06:26:43 -0500

CGD> (1) what's the 'native' way of storing wedge information, if any? [...]

> I'm not sure this question makes sense.  By default, the installation
> tools should use whatever partitioning scheme is most appropriate for
> that particular type of machine -- on PCs, the MBR; on Amigas, RDBs;
> etc.  `Labels' should be valid on all systems if people want to use an
> architecture-neutral format (but one which is incompatible with other
> OSes).

It would be very helpful if we could retain the ability to boot a
NetBSD kernel from a disk partitoned on SunOS (compatibility).
The paragraph above seems to imply that feature might be lost.

CGD> (2) How do you mount root off of an alternate root device, e.g. when
CGD> booting with 'askname' or if the kernel doesn't 'understand' the
CGD> device you've booted from (e.g. can't get to it, because it's on a
CGD> controller for which there is no driver; not as odd as you might
CGD> think)?  "Please don't say you have to specify block offsets."
CGD> This isn't really a 'legacy' need, so it's not clear to me that the
CGD> pseudo-device you suggest would be particularly appropriate.

> We have to teach libsa how to find a random wedge anyway, so I suggest
> that something like the above would be a reasonable thing to do. [...]

> There are at least two possible solutions to dealing with RB_ASKNAME:
> 1) Put all of the information on how to handle partitions into the
> kernel, and just leave it there.  This is undesirable, in that it
> bloats the kernel substantially just for the case of booting.
> Especially if you (as I do) consider it a requirement that we deal
> with all types of partitioning on all ports.

It may be a reasonable trade for the kernel to keep the ability to
understand the disklabel format used by the ROM, but leave out all
knowledge of other formats (let wedgeconfig deal with that).

> 2) Since libsa already has to deal with this, modify the boot blocks
> to allow specifying the root and dump partitions and pass in wedge
> information for both of them, and *remove* RB_ASKNAME from the kernel
> (except as part of the old boot block compatibility).  (While I'm sure
> this will inspire lots of flames, I note that *no* non-BSD systems I'm
> aware of have this functionality, and in practice I've never seen
> anyone else use it.  It didn't even completely work in 4.4BSD, and
> only gave you one shot as specifying the device names anyway.)

Well, I'll try not to flame, but there certainly are lots of non-BSD
systems that support an "ASKNAME" feature. (unless you consider all of
SunOS, Solaris, IRIX, ... to be "BSD" systems 8)

Anyway, if we lose RB_ASKNAME then one method of disaster recovery
is lost: boot a kernel from device X and tell it root on device Y.

One additional point about libsa:  The Sun PROM takes care of all
partition interpretation for you, so libsa does nothing more than
pass the partition number to the PROM device open function.  Any
attempt to deal differently will just bloat libsa on Sun boxes.