Subject: Re: Continuing sun3 nbsd142 funzies.....SUCCESS!!!!!
To: None <port-sun3@netbsd.org>
From: NetBSD Bob <nbsdbob@weedcon1.cropsci.ncsu.edu>
List: port-sun3
Date: 05/29/2000 13:29:41
> Ah, OK.  That wasn't very clear to me from your previous post -- I don't
> think you really said how you'd installed SunOS, just that you couldn't
> get NetBSD of any form to boot from tape.

I could not get any form to boot from tape.  But, SUCCESS!! finally,
after a lot of headscratching, perusing my other machines, and consulting
my odd sun3 docs for bits of trivium, playing with odd jumpers on drives
and tapes, etc......

> I'm still not exactly sure from your description what's happening when
> "NetBSD won't boot from tape".  I.e. what *exactly* happens?  Please
> describe the actions of the tape drive in relation to a cut&paste (or
> equivalent) of the console output from the time you initiate the boot
> command.
> 
> BTW, if you've got a working 4/260 why the heck don't you just netboot
> the 3/60 from it and install via NFS?  That way you'll even have all of
> the tools at your disposal, not just those that squeeze on the miniroot.
> Or you could just netboot, dd the miniroot to your disk, and then
> continue with either an ftp, nfs, or tape install.

Netbooting will be my next challenge.  I really did want to get the misc
problems I was having fixed before I got into the netbooting thing.

Ok, so now to the trivium, horror story, and final solutions to the
funky sun3 problems I was having......

First, I made up tape sets for all the sun3 NetBSD distros, back to 1.1.
None of them would boot.   All of them stuck on the scsi i/o.  For the
life of me, I could not quite figure it out.  In every case, the tape
booted, and the kernel loaded, then stuck on accessing the HD's.
Sunos booted and loaded properly, every time!

The errors were, using NetBSD-1.1 as an example:

si0 at obio0 addr 0x1400000 level 2 : options=1 
scsibus 0 at si0

(then screetching halt with nothing working), since the 3/60 does not
even have a reset button, I could not even hardware reset the beast.

Reboot and load sunos, to make sure my mind was not going crazy.....
Yep, sunos boots and loads fine.  Headscratching time.....

Reboot and load NetBSD-1.1 and halt at scsibus 0 at si0.....

I gots meself rather frustrated, and went up for a cup o' joe, and
then thought I would dustbunny the new sun3/60 I had picked up friday....
Come back 30 or so minutes later... and some more error messages were
on the screen, indicative of the kernel not returning something from
the hard drives.... hmmmm.....

More headscratching.... Everything up through 1.4 did the exact same
thing.

Test tape time for a sunos boot tape but switching to the netbsd miniroot
on the tape instead of the sunos miniroot....  Booted, loaded, ran fine.
But, scsibus 0 at si0 and nothing on the early distros up through 1.4.
NetBSD 1.4.2, and snapshot 3 from dec 1999, did not get that far.
They complained after booting on the NetBSD distro tape boots with:

root on md0a dumps on md0b
warning: no /dev/console

and total lockup.

But, booting the sunos boot tape with the NetBSD miniroot did fine.
Something is off on the NetBSD tape drivers or the ramdisk kernels
or somesuch......

I was about to pull me hair out (what little I still have.....),
and then I put my hand on the scsi drive!  It was not spinning!
OK, time for the ol' garage shade-tree mechanics trick of listening
to the valve trains through a length of broom handle placed on the
heads and against the ear.

Hmmmmm..... sunos spins up the drives..... NetBSD does not.... what
is going on here.....?

OK, I checked my drives in all my suntoyz, and all of them are set
to command spin up the motors, instead of hard jumpered to motor on
at power up, EXCEPT for the 3/260 that is running NetBSD.  Hmmmmm,
Eureka, propeller-beanie-headed-lamp lights!  Ahhh, must have motors
spinning for NetBSD..... OK.  Now, diving in the spare parts shelves
for a known jumperable motor-on-at-power-on drive, and, guess what....
NetBSD gets past the scsi probing, and the kernel loads.  YEAH! (almost).
Then, the tape won't read.  It errors out.  Gotta reach for another
tape transport..... Someone long ago had mentioned that mt02 driven
transports were... the pits.... to say the least.  I confirm that.....

On a lark, I swap the standard traditional sun3 tape drives, you know,
the ones with the qic36 interface and the mt02 interposer controller boards
that are the default type of tape transport on all the early sun3 gear,
for a nonstandard built-in scsi interface archive tape transport device.
I figure what the heck, I will drop in an archive 2150S tape transport
that has the built-in scsi interface (somewhat rare critters, but a fellow
sent me one, recently, so I figures, why not?)..... Mebbie it will do
something a little differently.....

BINGO. 

The Archive 2150S transport comes up and runs, and streams properly, and
loads sunos properly, and...... it loads NetBSD properly from a sunos
load tape AND partitions and sets up the drives, OK.  Hmmmmmm.....

OK, I loads up 1.4.2 with the drives jumpered to motor-on spin up at power
up, and with the regular archive scsi tape transport.... and, using the
ftp install, loads up 1.4.2 from the 4/260 beastie.... SUCCESS!!!! it
works.  This all from a sunos tape load of a netbsd miniroot.

Moral of the story, so far:

NetBSD REQUIRES motor-on-spin-up at power-on on its HD'.  That is not
in the INSTALL.txt, nor in the README files!!!!  Can someone put a note
in the INSTALL.txt AND in the README file that you must jumper the HD's
to motor-on-spin-up at power-on, rather than motor-on-spin-up on command?

For two years, off and on, I have been trying to get NetBSD up on my
suntoyz, and success was nil.... all boiling down to a bit of trivium,
which must be common knowledge to all the gurus aboard, but not to me,
that the silly HD's require motor-on-spin-up at power-on.  Normal sunos
does not, and all my usual drives are set to command spin up rather
than hardwire spin up.... oh, well.

Figuring I was in a gambling mood, and what the heck... now that I had
discovered (or rediscovered) the trivium of the week about the HD
jumpers, let's see if a later snap will load and go.  So, I rolls me
a tape with sunos boots and NetBSD-1.4P snap miniroot, and it loads
and goes, just fine.

The tape reads fine on installs, but for some reason, has troubles after
installing.  This issue needs to be resolved.  So, I figured I would pfutz
around with it bit and see what is goings on, 'ere.  I have 3 tape 
transports that are working, 1) Archive 2150S, 2) sun3 qic36 with jumpers
set one way, and 3) another qic36 with jumpers set, for some reason, a
different way.  Alas, I don't have any jumpering information for the
Archive qic36 drives, and if anyone does, I would love to find out those
jumper settings and what they mean.  So, I knows the Archive 2150S works
for booting and installing.  Some testing indicates that the drive reads
tarballs OK, but it won't write tarballs.  Errors out, again.
Testing the two qic36 tapes one reads but won't write, and the other
won't read or write.  Perusing the jumpers on the drives indicates that
the qic36 tapes have jumpers set as (looking from the back):

     0 0-0    This one reads but does not write.
     0-0 0

     0 0-0
     0 0-0    This one won't read or write.


If anyone knows what these settings are, do holler.

The 2150S tape has jumpers:


    0 0 0-0 0-0
    0 0 0-0 0 0
    0 0 0-0 0 0
    0-0 0-0 0 0

If anyone knows what these settings are, do holler.  They control things
like drive ID, parity, and that sort of thing.

As to the tape reading, the Archive 2150S streams correctly.
The qic36 tape did not.  I am assuming it may have to do with
the mt02 controller timings, or possibly with the NetBSD drivers.

Anyone using mt02 controller driven tape transports successfully
on NetBSD sun3?   If you are, what are your jumper settings?

Moral, the second:

NetBSD still is having trouble with tape transports, and the type
and jumpering of the transport is critical.  If you have a choice,
use a standard scsi-interface 60mb tape transport and not an mt02
interposer controller driven qic36 tape transport.

Moral, the third:

Something needs to be done to fix the NetBSD tape booting kernels.
The late ones (1.4P and 1.4.2) die on the ``warning: no /dev/console''
and should not do that.  Using a sunos boot tape with the netbsd
miniroot was a fix to get around the problematic netbsd-rd kernels.
If this is fixed, where is a later snap than 1.4P?

Moral the fourth:

Someone put this info somewhere into the INSTALL.txt, so others don't
waste so much time, as me?  OK?

Now, me is a happy NetBSD sun3 camper.... mostly... still need to
resolve the tape issues, before it can be said to be bulletproof.

Thanks all....

Bob