Subject: Re: [Q] DS3100 installation? (was: [Q] disklabel error)
To: Paul Bickford <bickford@jimmy.harvard.edu>
From: D. J. Vanecek <djv-list@bedford.net>
List: port-pmax
Date: 10/15/1997 11:26:47
> At 10:03 AM 10/15/97 +0900, you wrote:
> >> Hi, all: I'm trying install NetBSD onto a DS3100 (24MB RAM), and am using a
> >> i386 NetBSD machine as my "helper."
> >>
> >
> >Let me clarify some.  Your ST1480 is attached with NetBSD/i386, and
> >you have 'cross-compiled' disklabel command *specifically* designed
> >for NetBSD/pmax, or, I'm afraid, you are using NetBSD/i386 disklabel
> >to install NetBSD/pmax bootblock?  If latter case, it won't work
> >because every NetBSD/xxx implementation has different bootblock
> >structure peculiar to each platform.
> >
> >Is it impossible for you to go the way for 'network boot + network install'?
> >
> >Tohru Nishimura
> >Nara Institute of Science and Technology
>
 ...

> Forgive my ignorance, but how can I get NetBSD onto a DS3100, then? If,
> according to the "Installing NetBSD on a PMAX" faq, "...you may have no
> option but to construct a bootable disk using a _miniroot_ and a helper
> machine," and my helper machine can't label the disk, I seem to be at an
> impasse. 

There are back doors...

> So I don't waste any more time on this now seemingly impossible task, how
> would *you* (the PMAX community) install NetBSD on a formerly diskless
> DS3100 (now with a Seagate ST1480 HD), given that a stand-alone i386 NetBSD
> machine is your only available helper? Is it even ppossible under these
> circumstances?

Well, I'm not a NetBSD pmax user, (I run OpenBSD on my pmaxes), but my
two-cents worth is to get ahold of the pmax boot blocks and install them
explicitly with the 386bsd disklabel.  They ought to exist in the
miniroot or 32MB fs or whatever you have for the pmax NetBSD distribution.
THis might still suck, or it might produce a bootable disklabel, that
you could then relabel from the pmax, and install again. 

Let's say you did that, and it still has failed. Then I would make the
cross-compiled disklabel that Mr. Nishimura is talking about.
To do that, I would get the sources for disklabel, and look *real careful*
at how they differ, from one architecture to another. Are there defines?
Well, let me look ... yeah, there are differences. (BTW, I *do* run NetBSD
on my i386's... so I'm not dragging in any OpenBSD specific stuff here,
this will all refer to NetBSD disklabel, unless I say otherwise :)

The makefile for disklabel has things specific to amiga, i386, hp300,
vax, but not pmax. This is a little odd, since the pmax seems to want
two bootblocks, like the i386. (NOTE: OpenBSD/pmax has two boot blocks,
bootrz and rzboot, but I don't know about NetBSD/pmax). i386 throws in
partition "d" as "Raw partition" too.

>From your original message, it looks like you used 386 disklabel and
installed 386 bootblocks. Notice also that you got a "d" partition
spanning the whole disk, something that is (to my knowledge) i386
specific. The bootblocks, of course, are binaries, and *have* to be different,
not just ide vs. scsi, but for each different architecture.

I have a feeling that if you unpack the source for disklabel, and
compile it with the pmax in mind, and use the binary boot blocks
from the pmax distribution, you might be in business. Note, this
is not really a cross-compilation -- you are compiling on the 386,
to make code to run on the 386. I assume that you don't need to compile
the boot blocks themselves.  WE'LL NEED SOME HELP HERE FROM A NETBSD/PMAX
HACKER!

Hacks you will need to make:  #undef i386 in the source code, for sure.
Maybe #define pmax or #define mips or whatever, although I saw *no*
pmax specific code in the code for disklabel, or in its Makefile.
This I find a little troubling, and wonder how this could be. Could
there be some very magic special pmax code not part of the generic BSD
source distribution? I don't know.  One thing that appears critical,
is to define the paramater NUMBOOT to the correct value, whether this
is 0 1 or 2 (it is 2 for i386).  Someone else (a NetBSD pmax expert)
will tell you, I hope. My guess is 2.

Another alternative is t not use disklabel at all, but to use
dd to write to the raw disk. Is this the way the 32MB fs is installed on
NetBSD? The NetBSD install doc for the pmax has some stuff about
"quick and dirty hacks" to get a viable disklabel. Go over them.

Alternative: find a kind soul with a running NetBSD pmax, who will label
the disk for you. harvard.edu ought to have a few. While he's at it,
he might as well install most of BSD, too!

Alternative: find a kind soul with a running NetBSD pmax, who has a disk
labelled in a way you can use, who will do something like dd if=/dev/rrz0c,
of=file.for.jim  count=ask.somebody.else   and then you could reverse
this procedure on the 386 now holding the disk, of=/dev/rsd1d I think.

I hope I've shed a little light on this subject. 

One thing is clear, there needs to be, as part of the pmax distribution,
precompiled disklabels for the pmax, but runnable on all other likely
architectures. (There's one for ultrix as helper-host, that I know
about. Are there others? They should be part of the distribution, if
they're not already.)

If you get really desperate and no NetBSD Pmax knight rides to the rescue,
mail me the disk, and I'll stick OpenBSD on it. You should be able to
work from that to get NetBSD to go over it. Maybe the OpenBSD disklabel+
bootblocks will work as-is ? (Probably not for the bootblocks. Maybe for
the label itself).

Dave