Subject: Re: Sharing disk with Win95 (Was: Re: booting off of second partitio
To: Phil Knaack <flipk@ncremp.ag.iastate.edu>
From: Michael Graff <explorer@flame.org>
List: port-i386
Date: 04/22/1996 01:13:39
>	The i386 port has two different places it looks for a disklabel on
>the disk: if no NetBSD/386BSD partitions are listed on the DOS partition table
>(tag 0xA5) then it expects the disklabel to be located on the second sector
>of the disk (the sector after the dos partition table).

This is an error I feel.  We live under a system where partitions are
expected...  there should always be a partition table with correct
information for the NetBSD side, not a hacked 50000 entry...

So you loose one cylinder.  Big deal, even on big cylinders.

>	If an A5 partition _does_ exist, it expects to find the disklabel on
>the second sector *of that partition*.

Which is what I'd expect.

>	This is part of the problem. For some reason, even though I had a
>valid 0xA5 partition created, the "disklabel" program was WRITING the label
>I created to the second sector of the DISK, not of that PARTITION.

That's odd..

>	When I did "disklabel -r -R wd0 wd0.label" just a moment later it
>told me it was writing to offset 512, and there went OSBS. (As an aside, for
>those tempted to ask, I did this several times with different "c" partitions
>specified. I left it out, I specified it as the whole disk (copy of "d"), and
>I specified it as the same as the dos-partition-table-0xA5 partition. Same
>results, always writes to offset 512.)

IMHO, d == whole disk, c == NetBSD partiton, a, b, e, f, g, h are all
within c if NetBSD, etc...

>	If someone can point out something that I've done really stupid, 
>please tell me. Or, if someone is aware of a bug in disklabel.c's calcu-
>lation of the destination offset, please tell me .. otherwise I'm going to
>keep poking about and learning more about the internals.

Here's what I did on my IDE drive:

o	partitioned for a primary and ``extended'' DOS partition using
	DOS's fdisk
o	used NetBSD's fdisk to alter the partiton type of the extended
	partition to NetBSD.
o	installed a disklabel and boot blocks, using disklabel.
o	installed OS-BS beta from _dos mode_ of win95.

It just works.

--Michael

--
Michael Graff <explorer@flame.org>        NetBSD is the way to go!
PGP key on a key-server near you!         Netshade the world!
Cthulhu for president:  Tired of voting for the *LESSER* of two evils?