Subject: Re: [Q] DS3100 installation? (trying something new)
To: None <Havard.Eidnes@runit.sintef.no>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: port-pmax
Date: 10/17/1997 16:40:59
On Fri, 17 Oct 1997 15:20:21 +0200,  Havard.Eidnes@runit.sintef.no writes:

[tohru nisimura writes:]

>> You failed to create correct NetBSD/pmax diskimage because you
>> used /dev/sd1a.  As Bill Studenmund pointed out, use 'd' instead.
>>
>> NetBSD/i386 uses partition 'd' to refer to entire disk.  Not 'c',
> nor 'a' no matter how you adjust the BSD disklabel parameter.

>I think this is false.  On the i386 there is nothing special about
>partition 'd' except that it's permitted to use the partition even
.though it's marked as "unused".

Nope.  If there's no label, the kernel fakes up a label with the `d'
partition as the whole disk.  By convention the 'd' partition (or c
partition on other, saner ports) is always the whole disk.

There's no i386 disklabel on the disk, because we're trying to write a
NetSD/pmax diskimage.  So all we get is the faked-up disklabel, where
D (or C) *is* special.



>On the i386, sector 0 contains the master boot record, with the DOS
>partition table starting from byte 446.  In sector 1 you'll find the
>BSD disklabel.  The file system code will (if I'm not terribly
>mistaken) leave the first part of the partition untouched, to allow
>room for the boot code.

Yes. But there may be an additional offset of up to one whole cylinder
between the MBR and the 'a' partition, for boot managers or
what-have-you

>So, both partition 'a' and 'c' could be made to cover the entire
>disk depending on the contents of the disk label.  However, without
>a proper i386 on-disk disk label, you'd have to use partition 'd'
>from the "dummy" in-core disk label.

Yes. This is exactly the problem.  The on-disk label has been blown
away by previous attempts to write a pmax diskimage onto the 'a'
partition.

we need to write the pmax bootblocks and disklabel starting at sector
0. So The correct solution is to use the `/dev/rsd?d' partition (or
/dev/rsd?c, on anything other than NetbSD/i386).
That should *always* work.

Time for another FAQ answer, I guess...