[Simh] VAX 780 emulation - How to install Netbsd

Mark Pizzolato - Info Comm Mark at infocomm.com
Sat Dec 27 21:02:28 EST 2014


On Thursday, December 25, 2014 at 8:52 PM, Jason Stevens wrote:
> I had installed NetBSD 1.2 a while back.. I documented the steps here..
> 
> http://gunkies.org/wiki/Installing_NetBSD_1.2_on_the_SIMH_MicroVAX_II
> >
> When NetBSD re-introduced support for the VAX I belive it was mostly the
> 730/750 and then the MicroVAX II.  The first bianry distribution I could find
> was 1.2 although it was incredibly unstable in SIMH and I had to use some
> parts of 1.3 to get it installed.


Hmmm...  That example is not installing on a MicroVAX II, but on the simh VAX simulator which simulates the MicroVAX 3900.  

Observe:

          The ini file contains:
                    set cpu 32M
          The MicroVAX II only supported 16MB of RAM.

          The boot log says:
                VAX simulator V3.8-1
                Loading boot code from ka655x.bin
                
                ←[c
                KA655-B V5.3, VMB 2.7
                Performing normal system tests.
                40..39..38..37..36..35..34..33..32..31..30..29..28..27..26..25..
                24..23..22..21..20..19..18..17..16..15..14..13..12..11..10..09..
                08..07..06..05..04..03..
                Tests completed.

          A MicroVAX II boot should look something like:

                MicroVAX II (KA630) simulator V4.0-0 Beta        git commit id: 1d530cc4
                sim> b
                Loading boot code from ka630.bin
                
                ←[c
                
                KA630-A.V1.3
                
                Performing normal system tests.
                
                  5..4..3..
                
                Tests completed.
                
                >>> 

It isn't surprising that some instabilities under the VAX simulator were noted since there may have been some new functionality in the 3900 which the NetBSD 1.2 code didn't yet include... 

It would be interesting to explore how that version behaved with the MicroVAX II simulator.

Apart from running under the MicroVAX II or MicroVAX 3900 simulators, Devin specifically asked about running on the VAX780 simulator.  

As it turns out, there were issues with booting and basic installing of NetBSD on the older VAX systems.  Much of NetBSD evolved after the relatively low cost MicroVAX systems were very common.  It seems that although some folks with older VAX hardware (VAX750, VAX780, VAX730 and VAX8600) may have been running NetBSD, they didn't install it from CD media, but merely upgraded existing older BSD operating system installs.

Sometime after Matt Burke implemented the simh simulators for these older VAX systems and they were included in the simh codebase at github, a few folks tried to install NetBSD on one of these older systems.  It seemed that although all of these simulators had no problem booting any 'supported' version of VMS and Ultrix, booting from the NetBSD install CD's didn’t work.  On older systems, Ultrix (and old versions of various BSD operating systems) boot with a 'Boot Block' boot.  A 'Boot Block' boot reads sector 0 of the disk into memory and starts execution at offset 2 of the buffer which had been read.  For the older systems, a Boot Block boot was requested by setting bit 3 of R5 when VMB was started (i.e. BOOT dev /R5:8).  Boot block booting works just find for Ultrix on these older platforms, but NetBSD's CD distribution media no longer booted, even though those same CD images would boot just fine on the MicroVAX 3900 simulator (as well as the MicroVAX II).

Some digging showed that the NetBSD disks had a sector 0 which was almost completely 0s (i.e. it didn't have a secondary bootstrap program in sector 0), while the sector 0 of Ultrix disks certainly had a secondary bootstrap program in sector 0.  The question was: "Why did these CD images boot on a MicroVAX II and MicroVAX 3900?".  Well, the difference here is the fact that the all of the MicroVAX systems boot with a version of VMB which is part of the console ROM.  It seems that VMB was extended as it was migrated to the ROMs and several enhancements were made:
1) Boot Block Boots were attempted automatically if the boot device did not contain an ODS2 disk structure.
2) Boot Block Boot logic was merged with the PROM boot support that the ROMs also supported.  The PROM boot support allowed booting from a Qbus ROM which had a particular signature at the beginning of the ROM.  When VMB attempted a Boot Block boot, it read in sector 0 and if the contents of the data written had the ROM boot signature, then the same logic which initiated booting from ROM was performed.  The ROM signature contains the 'address' of a secondary bootstrap program.  The address is specified as Offset, Size and Starting address.  Since VMB already has a driver which can read the disk it merely reads the data at the offset and size indicated and then starts execution at the specified starting address.  The ROM based VMB logic will first try this ROM based boot, but if the signature doesn't match, then it will merely start execution at offset 2 of the sector 0 data, and thus automatically perform the legacy Boot Block behavior.

It seems that since the only active development and installation testing for NetBSD was being done on systems with ROM based VMB someone changed the boot sector setup process to only put the ROM signature in sector 0 and no one ever tested on the old hardware.

After this issue was discovered, I created a patched version of VMB.EXE for simh which also implemented the above logic that already existed in the ROM based VMB systems.  The latest code at github includes VMB.EXE which will run as needed.

Once this issue was understood by the NetBSD folks someone went back and fixed the pieces which populate sector 0 on boot disks to both contain the ROM based signature information AND the legacy boot sector code which had gone missing...  Someone may have also gone back and changed the boot sector data on the available CD images.  This would have allowed booting of those images with any version of VMB.EXE (possibly with /R5=8), however the program which populates the boot sector of a newly formatted disk for all of these older installations also would need to change in order to boot from a disk which was installed from one of those CD images.

Johnny Billquist was the person who first encountered this problem while working with the VAX8600 simulator.  He was instrumental in engaging and interacting with the right NetBSD folks to understand what had been broken and to ultimately fix the current NetBSD VAX code.

As an answer to Devin's original question, I don't think that the generic NetBSD recipes which exist for installing on the MicroVAX 3900 simulator are substantially different when using a VAX780 simulator beyond using the latest simh code from github.

Devin mentioned: http://www.netbsd.org/ports/vax/emulator-howto.html

The instructions there have a configuration file for the MicroVAX 3900 simulator which contains:

        load -r /usr/pkg/share/simh/ka655x.bin
        set cpu 64m
        set rq0 ra92
        at rq0 netbsd.dsk
        set rq1 cdrom
        at rq1 /path/to/vaxcd.iso
        at xq0 name-of-network-interface-on-host
        boot cpu

For a VAX 780 the following should be equivalently useful:

        set cpu 64m
        set rq0 ra92
        at rq0 netbsd.dsk
        set rq1 cdrom
        at rq1 /path/to/vaxcd.iso
        set xu0 enable
        at xu0 name-of-network-interface-on-host
        boot rq1

    
- Mark



More information about the Simh mailing list