Port-vax archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

KA630 hangs running boot during netboot attempt



Hello everyone!

I've recently been using my VAXen again after many years
of no use. I've had difficulty trying to netboot a KA630 based system
with DEQNA,
QDSS, and RQDX3 in a BA23. I'm doing it from Linux, using
https://github.com/qu1j0t3/mopd. The same procedure could netboot a
VAXstation 2000 and another MicroVAX with a KA650. But with this KA630
based system I ran into problems.

I was first using the NetBSD 1.4.1 boot in mop format, because of
https://github.com/qu1j0t3/mopd/blob/master/HOWTO-MicroVAX-II.md. It
kept telling
me on the QDSS screen that there's 5 seconds left until automatic boot,
not counting down, and not responding to input from the keyboard or
serial. All I can do at that point is use the halt or restart buttons.

That was simple to fix at least. Due to loss of battery backup, the
firmware stops the TOY clock. It can be started via:
d/b 200b8016 6
The seconds value can be inspected to see if it is stopped or running:
e/b 200b8000

After starting the clock, the timeout expires and boot says it's loading
netbsd. But the machine hangs with the run light blinking. At that point
the halt button does nothing, and only the restart button works.
(Actually at first even restart didn't work, but that was because it
was disabled by one of the 2 tiny switches on the front panel board.)

Later versions of boot in mop format send output to serial and lock up
similarly, without needing TOY activation to get to that point.
Earlier versions act as if they don't know about the DEQNA.

Fortunately l noticed that my old backup of NetBSD 1.3_BETA has Athena
4.3BSD etftp in /tftpboot/mop, which reminded me I had used that to
netboot NetBSD in the past. It did not work from the linux mopd. That
program seems to only work with files in mop format. Other formats
like a.out and ELF crash (like SCB2NDINT). I guess NetBSD's mopd would
serve the a.out properly, but its mopa.out refused to convert etftp.
So I ended up figuring out how to build mopa.out on Linux by using a
few NetBSD header files. I also overrode the mid check because etftp
had mid of 0.

That worked. I could enter the machine's IP address, TFTP server and
file name at the etftp prompt and boot older NetBSD kernels like
1.3_BETA. (Even 1.4.1 has an unsupported file format.) Ubuntu 16.04.7
LTS needed to have the VAX ARP address set to not cut off the TFTP
transfer in the middle, sending ARP queries which don't get answered.
Also, etftp uses the name image instead of octet for type of transfer.
Initially I changed the tftpd-hpa binary via sed s/octet/image/,
though changing etftp would make more sense, and atftp doesn't need
the change. After tftp, tell NetBSD that root is on qe0 and have rarpd
and bootparamd ready.

Actually, when booting kernels without QDSS support, with output on
the serial console, the last few characters of the root device prompt
would repeat endlessly, with beeps. But kernels with QDSS support
worked great. I could even enter multi-user mode and start X. The same
MicroVAX can also boot MicroVMS 4.5 off the attached RD53. So I guess
the hardware is fine? Why couldn't I netboot the normal way?

I suppose now I could try newer versions of boot, converting them via
objcopy and then mopa.out.

Here are modifications I made to mopd to build mopa.out on Linux. This
may be ugly, but it was useful.
---cut-here---
diff --git a/common/file.c b/common/file.c
index 984ec3f..cd109f1 100644
--- a/common/file.c
+++ b/common/file.c
@@ -53,10 +53,7 @@ static char rcsid[]="$NetBSD: file.c,v 1.5
1998/02/07 00:03:22 cgd Exp $";
 #define MID_VAX 140
 #endif
 #if defined(__linux__)
-#define NOAOUT
-#include <a.out.h>
-#define MID_I386 100
-#define MID_SPARC 3
+#include "/home/bgjenero/tmpfs/vax/usr/include/sys/exec.h"
 #endif
 #endif

@@ -343,7 +340,7 @@ getMID(old_mid,new_mid)
  break;
  }

- return(mid);
+ return(MID_VAX);
 }

 int
diff --git a/mopa.out/mopa.out.c b/mopa.out/mopa.out.c
index 194eaf6..d4f84db 100644
--- a/mopa.out/mopa.out.c
+++ b/mopa.out/mopa.out.c
@@ -48,24 +48,13 @@
  */

 #include <sys/cdefs.h>
-#ifndef lint
-__RCSID("$NetBSD: mopa.out.c,v 1.5 1997/10/16 23:25:09 lukem Exp $");
-#endif

-#include "os.h"
-#include "common/common.h"
-#include "common/mopdef.h"
-#include "common/file.h"
-#if defined(__NetBSD__) || defined(__OpenBSD__)
-#include <sys/exec_aout.h>
-#endif
-#if defined(__FreeBSD__)
-#include <sys/imgact_aout.h>
-#endif
-#if defined(__bsdi__) || defined(__Linux__)
-#include <a.out.h>
-#define NOAOUT
-#endif
+#include "../common/os.h"
+#include "../common/common.h"
+#include "../common/mopdef.h"
+#include "../common/file.h"
+#include "/home/bgjenero/tmpfs/vax/usr/include/sys/exec.h"
+
 #if !defined(MID_VAX)
 #define MID_VAX 140
 #endif
---cut-here---

Here are accompanying modifications to NetBSD 1.3_BETA header files
---cut-here---
diff -ru vaxorig/usr/include/sys/exec_aout.h vax/usr/include/sys/exec_aout.h
--- vaxorig/usr/include/sys/exec_aout.h 1997-01-22 12:46:51.000000000 -0500
+++ vax/usr/include/sys/exec_aout.h 2020-10-08 16:13:12.869054455 -0400
@@ -37,20 +37,22 @@
 #define N_PAGSIZ(ex) (__LDPGSZ)
 #endif

+#include <stdint.h>
+
 /*
  * Header prepended to each a.out file.
  * only manipulate the a_midmag field via the
  * N_SETMAGIC/N_GET{MAGIC,MID,FLAG} macros below.
  */
 struct exec {
- u_long a_midmag; /* htonl(flags<<26 | mid<<16 | magic) */
- u_long a_text; /* text segment size */
- u_long a_data; /* initialized data size */
- u_long a_bss; /* uninitialized data size */
- u_long a_syms; /* symbol table size */
- u_long a_entry; /* entry point */
- u_long a_trsize; /* text relocation size */
- u_long a_drsize; /* data relocation size */
+ uint32_t a_midmag; /* htonl(flags<<26 | mid<<16 | magic) */
+ uint32_t a_text; /* text segment size */
+ uint32_t a_data; /* initialized data size */
+ uint32_t a_bss; /* uninitialized data size */
+ uint32_t a_syms; /* symbol table size */
+ uint32_t a_entry; /* entry point */
+ uint32_t a_trsize; /* text relocation size */
+ uint32_t a_drsize; /* data relocation size */
 };

 /* a_magic */
@@ -169,7 +171,7 @@
 #define N_STROFF(ex) \
  (N_SYMOFF(ex) + (ex).a_syms)

-#include <machine/aout_machdep.h>
+#include "/home/bgjenero/tmpfs/vax/usr/include/machine/aout_machdep.h"

 #ifdef _KERNEL

diff -ru vaxorig/usr/include/sys/exec.h vax/usr/include/sys/exec.h
--- vaxorig/usr/include/sys/exec.h 1997-09-12 07:21:47.000000000 -0400
+++ vax/usr/include/sys/exec.h 2020-10-08 15:31:30.663038198 -0400
@@ -212,6 +212,6 @@

 #endif /* _KERNEL */

-#include <sys/exec_aout.h>
+#include "/home/bgjenero/tmpfs/vax/usr/include/sys/exec_aout.h"

 #endif /* !_SYS_EXEC_H_ */
---cut-here---

You can find etftp here:
https://stuff.mit.edu/afs/athena/system/vax_bsd43/srvd.76/tp/

The problem for me with old computers is that once I get things
working it's just an old computer that's slow and with little memory.
But getting things working can be an adventure.


Home | Main Index | Thread Index | Old Index