Subject: Re: root fs on non-"a" partition?
To: John Valdes <valdes@uchicago.edu>
From: Bill Studenmund <wrstuden@zembu.com>
List: port-macppc
Date: 01/18/2001 12:18:02
On Wed, 17 Jan 2001, John Valdes wrote:

> Unfortunately, given the order of the partitions, NetBSD treats the
> Linux partition as the "a" partition, while the NetBSD partition is
> seen as the "h" partition (the swap partition is seen as the "b"
> partition, though).  I can boot the netbsd kernel off h w/o a problem,
> but unfortunately, the kernel is unable to spawn "init".  I'm assuming
> this is because it's looking for init on partition "a" and not
> partition "h".  My PB screen is almost completely dimmed at this
> point (see my other email :) ), but as far as I can tell, the kernel
> prints "root on wd0" and "swap on wd0b" (note the lack of any
> partition identifier for root) just before it tries to spawn init.

I think NetBSD will really want the root partition in partition a.

However there is something you can do. Make the Linux partition not get
recognized as "a". :-) You'll need to run a disk tweaking program. I know
Norton Disk Editor will work.

136 bytes into the partition entry for the Linux partition in the partiton
table are the A/UX special fields, which are in the "blockzeroblock" or
bzb. The bzb starts with a magic number, 0xABADBABE. 8 bytes after that
(144 bytes, at offset 0x90) should be the bzbFlags field, which we take to
be 16-bits(*). This field is a big-endian number. The flags defined are
BZB_ROOTFS 0x8000, BZB_USRFS 0x4000, and BZB_USRFS_NEW 0x0004.

I bet the field has 0xc000 in it now. Try setting it to 0x4000 and see if
both NetBSD and Linux are happy.

(*) I mention how big we take it to be as pdisk takes it to be 32-bits,
and adds an extra four zeros to the flags, so it all works out.

Hopefully that's not too confusing!

Take care,

Bill