Sunday, October 25, 2020

ULTRIX 4.00 problems writing to devices hosted on a Linux NFS server

When the VAX ULTRIX 4.00 Rev. 158 /usr/diskless/genvmunix kernel does a non-appending write to a device, like "echo foo > /dev/console", that fails if the device is located on a x86_64 Ubuntu 20.10 Linux 5.8.0-25-generic NFS server.

ULTRIX seems to be at fault. It sends an NFS V2 SETATTR call setting the length of that device file (eg. /dev/console) to zero, and that fails. This behaviour was observed after netbooting ULTRIX, on the root NFS file system, and is a problem for running netbooted ULTRIX. Even if I mount another NFS file system read-only, ULTRIX still sends the SETATTR there. Surely it shouldn't be trying to change things on a file system that's mounted read-only! 

Use of SETATTR to truncate a file is standard behaviour when overwriting a file, like "echo foo > bar". In that case it works fine on a writable file system. Also, ULTRIX doesn't make attempts to change ordinary files on read-only mounted NFS file systems.

Appending to devices, like "echo foo >> /dev/console" works properly, both on writable and read-only file systems. 

Monday, October 19, 2020

Installing MIT Project Athena 4.3BSD onto a VAX

Athena 4.3BSD is an MIT modification of 4.3BSD for their Project Athena distributed computing environment. Although it is designed to work in such an environment, it can be installed and used on a single machine. A few things do break, but there are ways around that.

First, you need the Athena 4.3BSD srvd tree, and a way to boot the VAX into a minimal environment. Both are available via http at those links, though if you want proper Unix permissions and ownerships, you should download srvd via AFS if possible.

You also may need a VAX. I have successfully installed on a VAXstation 2000, MicroVAX II, and VAXstation 3100 m38, but I have not successfully installed in simh yet. Though the RD53 drive image from the MicroVAX II does work in simh.

Export the srvd tree read-only via NFS, using a server which accepts version 2 NFS and mountd protocols. In Linux you can add --nfs-version 2,3,4 to nfsd and mountd options. In Ubuntu and probably also Debian, in /etc/default/nfs-kernel-server add --nfs-version 2,3,4 to both at the start of RPCNFSDCOUNT (because RPCNFSDARGS won't make any difference) and in RPCMOUNTDOPTS.

I have not mastered netbooting yet. The first stage seems to be etftp loaded via MOP, but then it seems you cannot simply TFTP load the kernel and expect it to run, and I'm not sure the kernel supports root over NFS. If interested take a look at the vax650 folder in bootkit and the LORE file there. In this case, I'm using an RX33 floppy image from bootkit, 61+.floppy, to boot a VAXstation 2000. That's an ordinary 5.25" 1.2 MB floppy image, which can be written on a PC using dd or rawritewin. Maybe you could netboot NetBSD/VAX on the same VAXstation 2000 and write from there, but I don't know which version has working floppy support.

If not using an attached display and keyboard, hook up the serial console. The VAXstation 2000 uses 9600 baud. The initial steps seem to be 8-N-1, but later on the OS switches to 7-E-1, meaning you'll see lots of characters with the high bit set if you don't reconfigure your terminal emulator.

After booting from the floppy, you'll see kernel output, a few lines from the startup script, a big warning that this destroys the contents of the hard disk, and a prompt for the hostname. I don't believe you can get past this prompt, because it relies on Athena infrastructure to query the hostname. So just control-C out of that. Then you get a prompt. It's a very minimal environment, without even ls.

Now you need to configure networking and mount the srvd tree via NFS. You need to use get_pack to mount via NFS, because mount doesn't seem to understand it. Change the network device name and IP addresses as needed. Note that the NFS server address and path are separate arguments, and not connected with a colon like you would use with mount.

# stty erase ^H
# ifconfig se0 192.168.1.5
# get_pack nfs 192.168.1.42 /srv/nfs/vax/athena/srvd /srvd
/srv/nfs/vax/athena/srvd server ok
/srv/nfs/vax/athena/srvd mounted on /srvd

At this point you could run stuff from /srvd if you wanted and explore. Note that the root filesystem is on a floppy and there is little space and few inodes available there. To continue the installation, you need to set some variables and run the phase 2 installer.

# MACH=VS2000
# save_site_flag=false
# . /srvd/install/phase2.sh

Actually, you might want to first look at phase2.sh, because it assumes some things. For me it was a perfect fit because it assumed the disk was an RD32, but you might have a different hard disk. Also, if your VAX has multiple hard disks, and you want to install onto a particular one, be careful. Remember the front panel write protect buttons.

The installer worked fine, except umount didn't work, and at the end I got a "/dev/rrd0a: DIRECTORY /etc/athena: LENGTH 1040 NOT MULTIPLE OF 512 (ADJUSTED)" warning. This should put a bootable system on your hard disk, but some customizations are needed for a successful multi-user boot. If you try to boot you'll get errors which might be mostly unreadable over serial because new console output starts before old output is finished, making network configuration failure look like "Setticannot opeUnablePleaseHaltinsyncing disks... done". If you do end up in that situation, boot with "b/2 dua0" to enter single user mode and fix things from there.

Since /etc/athena/rc.net relies on Athena infrastructure, I replaced that line in /etc/rc with just a simple "/etc/ifconfig se0 192.168.1.5". Also, change the configuration in /etc/athena/rc.conf. You can set everything false except for NFSCLIENT if you need it to mount srvd. In particular AFSADJUST takes a long time or maybe never completes, and needs to be disabled.

The installer only creates the root filesystem and a site filesystem for local storage. Most of the operating system is in the srvd tree, which will need to be read-only mounted at /srvd. If you don't have space to put it somewhere on the VAX, again mount it via NFS. Add the hostname of the server to /etc/hosts, and add the line for mounting it to /etc/fstab. You can't mount via IP address in fstab.

In /etc/ttys, there are lines which either start an X display manager or getty in text mode. Booting the VAXstation 2000 from serial, X fails to start. This means a wait for a timeout before getting a login prompt. Commenting out the /etc/athena/dm line for console and uncommenting the /etc/getty line fixes that.

You can get rid of the root password by removing the 2pEdLRdD8rMnk from /etc/passwd. (Documents about Athena say the root password of workstations is identical and not secret, but I don't know what it is.) Trying to set a new password via passwd doesn't work because it wants to talk to a Kerberos server.

That should be it. You now have a VAX which runs Athena 4.3BSD. You can even run X on a VAXstation or a KA630 MicroVAX with QDSS. (The KA650 kernel doesn't include QDSS support, though the bootkit one seems to have it.) It's leaner than NetBSD, even working fine on a VAXstation 2000 with 4 MB RAM.

Friday, October 16, 2020

AT motherboard serial connector pinouts can differ between motherboards

Older AT format motherboards don't have a back panel with many connectors, like an ATX motherboard. The only direct external connection is for a keyboard. Many motherboards have onboard serial and parallel ports. These connect to the outside via ribbon cables which go to standard connectors. The standard connector is mounted on an expansion slot cover or elsewhere on the case (so slots aren't wasted for this), and the ribbon cable connects to the motherboard.

Different motherboards can have the same ribbon cable connectors for serial and parallel ports. However, the pinout of those connectors differs, and swapping motherboards may require swapping those connectors.

Thursday, October 15, 2020

ATI Mach 64 GX character generator failure

This is an PCI video card from ATI, based on the 210888GX00 Mach64 chip. I think it's a Graphics Pro Turbo. It is only designed to accelerate the Windows desktop, and was released well before 3D cards became common. To the right you see a 2 MB VRAM expansion board which plugs into the main board.

Here's the image produced by the card:

Note that this isn't just random garbage. It is a text mode screen. Some characters are blank and the rest are all the same horizontal lines. Colours are still there. This is a BIOS startup screen. At the top right you would see the Energy Star logo in yellow and EPA pollution preventer in green. Those graphics are created in text mode by changing some characters of the font and putting them there. So, both standard and user defined characters are wrong the same way.

It's weird that such a card failed while sitting unused in a PC for a long time. I don't know what's wrong with it. If anyone knows, leave a comment.

An ugly fix for on ODIN OEC12C887A RTC

The Odin OEC12C887A chip contains a battery backed real time clock and a small amount of battery backed RAM. The battery and the crystal needed for this are part of the chip. Many old motherboards use these chips, and have them soldered onto the board. Of course, batteries don't last forever, and when they fail, motherboards lose the time, date and settings. Unfortunately it seems settings cannot be retained even while the PC is on. After applying settings, the BIOS reboots and then reports they're invalid. Some motherboards can function this way, with problems related to few settings, like floppy drive type. Others may not allow you to boot.

Then the proper fix is to unsolder the chip, solder a socket, and put a new chip into the socket. Though it's also possible to drill into the chip and connect a new 3V lithium non-rechargeable battery, such as a CR2302. I don't have a Dremel or equivalent, so I used a soldering iron. The result is ugly but it works. Here is a photo of the chip with exposed connections:

You can see 5 metal pieces among the melted plastic. Going clockwise you see a pin from the chip, a tiny bit of metal which it was pried away from (which connects to the bottom of the battery), the top of the battery, a bit of metal connecting to the top of the battery, and another pin from from the chip which was pried away from that.

To understand this better, imagine a normal dual in-line package (DIP) chip. The pins come out the side and bend downwards, in order to go through holes in the circuit board and connect to the rest of the circuit. In this case, some of the pins instead bend upwards, and connect to the battery and crystal. If you look underneath the board you'll see that some pins are missing, and some or all of those are bent upwards. Probably these devices start off as a typical DIP package, which is then encased in a second layer of plastic after those components are added.

The pinout can be found at https://www.betaarchive.com/forum/viewtopic.php?t=22000, in particular in this image. Pin 16 is negative, and pin 20 is positive. Pin 16 has continuity with motherboard ground. Pin 20 has continuity with the larger surface of the coin cell, which is generally positive. Probably the crystal is connected to pins 2 and 3.

It doesn't smell too bad, and controlling the temperature so it's mostly melting and not burning plastic helps. I'm not going to recommend it because plastic fumes might be unhealthy, and I certainly wouldn't want to do this on a regular basis. But the repair was a success. The PCI slot is fine too, with only very minor cosmetic damage to the outer surface.

Monday, October 12, 2020

Fix for Tseng ET3000AX SVGA card displaying monochrome

This is a Micro-Labs VGA Solution, an ISA super VGA card based on the Tseng Labs ET3000AX. It seems to be a reference design because other brands of cards also exist with the same board layout. It displayed in monochrome on the SVGA monitor.

At first I thought the switches on the back were set incorrectly. They tell the board what kind of monitor is connected and whether it's primary or secondary. They're documented here, but basically they all need to be off. That tells it a that it's the primary card, a "multisync analog monitor" is connected, and a secondary monochrome card may or may not be present. Up, away from the circuit board, is off.

The switches seemed to make no difference. So, I thought the board was broken. But no, the VGA connector standard changed. Those switches only talk about colour and monochrome regarding TTL monitors, using the DB9 connector. The VGA monitor is detected via monitor ID bits according to the old VGA connector standard. The current standard doesn't include those and instead uses an EEPROM providing information about the monitor. It seems that based on what the board detects on those ID bits, it can go into monochrome mode. All the palette entries get transformed via gray-scale summing, making everything black and white. This even happens if you try to set the palette via int 10h.

A software solution is coloron.com, which uses int 10h functions to switch the card to colour mode from DOS. Another solution is to boot with the monitor disconnected. This doesn't only mean power-on, but also if you reboot via the reset button or control-alt-delete. I opted for a hardware solution, cutting the circuit board trace between those connector pins and the rest of the card:

One last thing. The old VGA connector standard has a key at pin 9, meaning no pin there in the male and no hole there in the female. Now that is +5 V DC supplied to the monitor for the identification EEPROM. You might want to drill a hole there in the connector to avoid breaking pins on more modern VGA connectors.

Monday, October 05, 2020

Telequipment D54 oscilloscope bad MPS6518 transistor in sweep-gating bistable

My Telequipment D54 oscilloscope didn't show a trace. Instead, if I turned up brightness all the way there were some very faint blobs which changed a bit with the horizontal position adjustment. If I pulled the plug, the spot appeared coming from the left of the screen. This is similar to when trigger stability has been turned up and it is not being triggered, but stability couldn't make it work and even external X input mode did not work.

The service manual (available at radiomuseum.org) contains schematics and a detailed circuit description.

Clearly the horizontal deflection circuit was pushing the beam all the way to the left. I first removed JFET TR107 and connected a resistor to ground from the sawtooth output. This affected the voltage at the collector of TR108, and the horizontal deflection amplifier worked as expected. But there was still no spot on the screen. I assumed that was due to blanking.

The fact the CRT was blanked and even external X input didn't work made me focus on the sweep-gating bistable built around TR105 and TR106 transistors. After probing it a bit I unplugged TR105, an MPS6518 transistor, and to my surprise the base seemed open circuit. I don't know what made it fail there. Putting in a 2N2907A made it work. This replacement was very easy thanks to the fact all the transistors are socketed. Here's the right side board with the timebase circuitry, a closeup on TR105, and the bad MPS6518 transistor:




For completeness, here's the left side board, with the two channel inputs, vertical amplifiers, and trigger circuitry which provides an input to that sweep-gating bistable:



Friday, October 02, 2020

DEC KA650 (MicroVAX III / 3500 / 3600) error 62 can mean a bad keyboard connected to QDSS

My MicroVAX produced no output via the QDSS. I saw the monitor flash as if the QDSS was initialized, but video output appeared. Instead text went to the serial console of the KA650 CPU board. There, at the start of self test, I saw an error:

?62 2 08 FF 00 0000


According to the KA650 CPU Module Technical Manual, this is:

62 2004 E254 console QDSS mark_notpresent self test r0 self test r1 ****

It appeared at the same time as a keyboard beep. At the end of self tests there was the ominous "Normal operation not possible" warning. Swapping the LK201 keyboard fixed the problem. The keyboard causing the problem had all 4 LEDs lit, while the working keyboard had them all unlit except for a flash during initialization. There is no more error, and QDSS console works fine.

The MicroVAX can still boot NetBSD/VAX 1.3_BETA from the RA90 drive. Digital sure built this stuff to last!

The known failing parts are the RD53 drives. They can spin up with the trick of disconnecting the head actuator coil at startup, but have many read errors. I'll try reformatting them.