Subject: Re: disklabelling an ide drive
To: None <rnestor@augustmail.com>
From: Takeshi Shibagaki <sibagaki@lsi.melco.co.jp>
List: port-mac68k
Date: 08/28/2002 12:29:59
Hi,

>>>>> On Tue, 27 Aug 2002 16:22:19 -0500, Bob Nestor <rnestor@augustmail.com> 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.

Bob> Not sure where you're headed with this, but you should look at
Bob>     arch/mac68k/mac68k/disksubr.c
Bob> for the  code that constructs the in-core disklabel from the contents of 
Bob> the Apple Disk Partition Map.  It works the way Frederick described, 
Bob> processing the partitions that are of type Apple_UNIX_SVR2 looking for 
Bob> the NetBSD Root, SWAP and Usr-type partitions.  For these type 
Bob> partitions it looks at the flags in the Boot Zero Block. Any remaining 
Bob> slots in the in-core disklabel will be filled in with non-BSD type 
Bob> partitions such as HFS parts.
Bob> The Apple_UNIX_SVR2 partitions can be just about anyplace on the disk 
Bob> and still be correctly found.  There's nothing that requires the NetBSD 
Bob> Root partition to be the first physical partition on the disk.

Yes, I understand.

>> Basically, it is not related BZB_ROOTFS and automatic recognization
>> for root partition.
Bob> Not sure what you mean here, but the BZB data is used to find Root, SWAP 
Bob> and Usr partitions.

Where?

I read boot process briefly,

kern/init_main.c: main()
arch/mac68k/mac68k/autoconf.c: cpu_rootconf()
kern/kern_subr.c: setroot()

There is not BZB_ROOTFS anywhere.

In my recognization, automatic root partition selection is machine
independent, But BZB_ROOTFS is machine dependent.

So I think that it is not related BZB_ROOTFS and automatic
recognization for root partition immediately.

Takeshi Shibagaki
ie9t-sbgk@asahi-net.or.jp