Subject: Re: disklabelling an ide drive
To: Takeshi Shibagaki <sibagaki@lsi.melco.co.jp>
From: Bob Nestor <rnestor@augustmail.com>
List: port-mac68k
Date: 08/27/2002 16:22:19
On Tuesday, August 27, 2002, at 07:39 AM, Takeshi Shibagaki wrote:

> Hi,
>
>>>>>> On Mon, 26 Aug 2002 20:06:56 -0500 (CDT), Frederick Bruckman 
>>>>>> <fredb@immanent.net> said:
>
> Frederick> Partition "a" is the partition with the BZB_ROOTFS bit set, 
> *not*
> Frederick> the first partition on the disk (unless the bit isn't set 
> for any
>
> That's right. But in NetBSD/mac68k, only partition "a" must be
> recognized as root partition automatically.
>
> See, arch/mac68k/mac68k/autoconf.c.

Not sure where you're headed with this, but you should look at
    arch/mac68k/mac68k/disksubr.c
for the  code that constructs the in-core disklabel from the contents of 
the Apple Disk Partition Map.  It works the way Frederick described, 
processing the partitions that are of type Apple_UNIX_SVR2 looking for 
the NetBSD Root, SWAP and Usr-type partitions.  For these type 
partitions it looks at the flags in the Boot Zero Block. Any remaining 
slots in the in-core disklabel will be filled in with non-BSD type 
partitions such as HFS parts.

The Apple_UNIX_SVR2 partitions can be just about anyplace on the disk 
and still be correctly found.  There's nothing that requires the NetBSD 
Root partition to be the first physical partition on the disk.

> Basically, it is not related BZB_ROOTFS and automatic recognization
> for root partition.

Not sure what you mean here, but the BZB data is used to find Root, SWAP 
and Usr partitions.

> Sysinst mediates that difference, (I'm understanding now.)

Sysinst does the same thing as the Kernel which is what Frederick 
described.

-bob