Ultrix, Pi and SimH

Following on from getting a VAX/VMS system emulated on the Pi, and installing DECnet on it, I’ve had a look at getting an old copy of ULTRIX (Unix for the VAX) running.

Having already got Simh up and running, I just cloned the SD card from the VMS host and deleted the VMS specific bits, copied across an image of the Ultrix 4.0 install tape, knocked together a shonky .ini file and tried it…

Firstly, here is the vax.ini file that I’m using:

;
; Load CPU microcode
load -r /home/vax/data/ka655x.bin
;

set cpu 16m
set tto 7b
set tti 7b
set cr dis
set lpt dis
set rl dis
; Set up the disk
set rq0 ra81
att rq0 /home/vax/data/ultrix.dsk
set rq1 dis
set rq2 dis
set rq3 dis
set ry dis
set ts dis
; Set up the tape drive
set tq tk50
att tq0 /home/vax/data/Ultrix_4.0_Supported.tap
set tq1 dis
set tq2 dis
set tq3 dis
; Assign a MAC address suitable for this machine
set xq mac=AA-00-04-00-FD-04
attach xq eth0
;att xq 1
;att nvr ultrix.nvr
;dep bdr 0
boot cpu

The tape image files should be downloaded from http://bitsavers.org/bits/DEC/vax/ultrix/4.0/ gunzipped and put into the data directory.

Finally, here is a transcript of the install session. I’ve edited out a lot of whitespace, and highlighted the user responses in red.

root@thay:/home/vax/bin# ./vax
VAX simulator V3.9-0
Eth: opened OS device eth0

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.
>>>boot mua0
(BOOT/R5:0 MUA0
  2..
-MUA0
  1..0..

Ultrixload (using VMB version 13)
Sizes:
text = 768800
data = 1248256
bss  = 945472

Rewinding tape ...
Starting at 0x4d4d

ULTRIX V4.0 (Rev. 160) System #3: Thu Apr  5 08:42:35 EDT 1990

real mem  = 16723968
avail mem = 11548672

Buffer configuration adjusted to run with small system page table
using 245 buffers containing 1672192 bytes of memory

KA655 processor with an FPU

	CPU microcode rev = 6, processor firmware rev = 83

Q22 bus
uda0 at uba0
uq0 at uda0 csr 172150 vec 774, ipl 17
klesiu0 at uba0
uq16 at klesiu0 csr 174500 vec 770, ipl 17
NO LOOPBACK
ra0 at uq0 slave 0 (RA81)
tms0 at uq16 slave 0 (TK50)
WARNING: clock gained 87 days -- CHECK AND RESET THE DATE!

*** STANDALONE ULTRIX ENVIRONMENT *** 

If you select the BASIC Installation option from the list that follows,
the installation software creates file systems on default partitions on
your system disk and loads the mandatory ULTRIX software subsets.

If you require additional installation choices, select the ADVANCED
Installation option.

Select one of the following options: 

        1) BASIC Installation
        2) ADVANCED Installation
        3) System management 

Enter your choice: 2 

I chose to install the ADVANCED Installation as I wanted the online manual pages, and intend to have a play with UUCP at some point (along with some other things). If you’re just having a play about with ULTRIX, you can probably just go for the BASIC Installation.

*** SYSTEM DISK SELECTION ***

The installation booklet for your processor explains the following table 
of system disk drives.  Select one of the devices below to contain the
root file system: 

SYSTEM DISK TABLE 

Selection   Device     ULTRIX     Device       Controller   Controller 
            Name       Name       Number       Name         Number     
---------------------------------------------------------------------- 
    1       RA81        ra0          0         RQDX3          0
---------------------------------------------------------------------- 

Enter your choice: 1 
You selected RA81, device number 0. Make sure this disk drive 
is on line and write-enabled (if applicable to your disk drive), then
confirm your choice.

Use RA81, ra0, for your system disk? (y/n) []: y 
The installation procedure now allocates the root file system on
partition 'a' of the system disk, ra0 RA81. 

Making the root file system on ra0 RA81.

The installation procedure is now restoring the root file system to
partition 'a' of the system disk, ra0 RA81.

The installation procedure now checks the root file system on partition 'a'
of the system disk, ra0  RA81.
** /dev/rra0a
** Last Mounted on /mnt
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
223 files, 6198 used, 9353 free (17 frags, 1167 blocks, 0.1% fragmentation)

 *** BOOTSTRAP COMMAND SEQUENCE ***

Enter the following boot sequence at the console mode prompt
after the installation software halts the processor: 

        >>> b dua0

syncing disks... done

HALT instruction, PC: 8005F28D (BRB 8005F28C)

Note here that you’ll need to boot the cpu from SimH before you boot from the tape, so:

sim> boot cpu 
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.
>>>b dua0 
(BOOT/R5:0 DUA0

  2..
-DUA0
  1..0..

Ultrixboot - V4.0  Sat Mar 31 04:11:56 EST 1990

Loading (a)vmunix ...

Sizes:
text = 990392
data = 232960
bss  = 1248872
Starting at 0x4d4d

ULTRIX V4.0 (Rev. 160) System #5: Thu Apr  5 08:44:16 EDT 1990

real mem  = 16723968
avail mem = 11992064

Buffer configuration adjusted to run with small system page table
using 239 buffers containing 1672192 bytes of memory

KA655 processor with an FPU

	CPU microcode rev = 6, processor firmware rev = 83

Q22 bus
uda0 at uba0
uq0 at uda0 csr 172150 vec 774, ipl 17
klesiu0 at uba0
uq16 at klesiu0 csr 174500 vec 770, ipl 17
qe0 at uba0 csr 174440 vec 764, ipl 17
qe0: DEC DELQA Ethernet Interface DEQNA-lock Mode, hardware address aa:00:04:00:fd:04
ra0 at uq0 slave 0 (RA81)
tms0 at uq16 slave 0 (TK50)

 *** SYSTEM NAME SPECIFICATION *** 

Select the name of your system using alphanumeric characters. 
The first character must be a letter.   For example, tinker.

Enter your system name:  judoon 

You can pick whatever name you like (up to a maximum of 6 characters if you intend to play with DECnet later). I chose judoon to fit in with the naming scheme on my network.

You selected judoon as the name of your system.  Is this
correct? (y/n) [y]: y 
*** DATE AND TIME SPECIFICATION *** 

The current date and time should be specified using the following
format:

        yymmddhhmm

Use two digits for year (yy), month (mm), day (dd), hour (hh), and
minute (mm).  Enter the time in 24-hour format.  For example, 11:30
p.m. on May 3, 1990 would be entered as:

        9005032330

Enter the date and time: 8407010429 

Hang on, isn’t that 1984? Well yes. ULTRIX doesn’t play nice with dates after 2000, and 1984 just happens to fit neatly with 2012. Next comes the timezone selection. If you’re not in the UK, you’ll need to change these.

*** TIME ZONE SELECTION ***

Select the time zone for your area, using the options listed in the
table below.  You can also enter the number of hours (-12 to 12) in
time east of Greenwich.

  Selection     Time Zone 
---------------------------------
      e         Eastern
      c         Central
      m         Mountain
      p         Pacific
      g         Greenwich
---------------------------------

Enter your choice: g 
Does your area alternate between Daylight Savings and Standard
time? (y/n) [y]: y 
Select your geographic area for Daylight Savings Time, using the
options in the table below.

  Selection     Geographic Area 
--------------------------------
      u         USA
      a         Australia
      e         Eastern Europe
      c         Central Europe
      w         Western Europe
--------------------------------

Enter your choice [u]: w 
The current date and time is Sun Jul  1 03:29:08 GMT 1984

Next its time to set the root password. Usual password rules apply: Don’t use “password”.

*** SPECIFY THE SUPERUSER PASSWORD *** 
The installation booklet for your processor instructs
you on how to enter the superuser password.  
Changing password for root
Enter new password: {not echoed} 
Verify: {not echoed}

*** FILE SYSTEM DEFAULT OPTION ***

The following table shows the default file system layout on RA81, ra0:

partition     bottom        top       size    overlap       default
    a              0      32767      32768    c             root
    b          32768      99457      66690    c             swap, dump
    g          99458     259457     160000    c             /usr 

If you choose the defaults, the var area will be allocated to /usr/var.  

Do you want to choose the default file system layout? (y/n): y 
Making the new file system for /usr on /dev/rra0g RA81

This distribution media includes subsets for ULTRIX Worksystem
Software (UWS).  A UWS license (on a workstation) or a UWS Server
License (on a timesharing machine or server) is required to install
these subsets.

Do you want to install ULTRIX Worksystem Software? y/n []: n 

I didn’t bother with this, mainly down to the lack of having a license. Not installing it will save time and disk space too.

*** SUPPORTED SOFTWARE INSTALLATION ***

Please make sure your installation tape is mounted and on-line.
Are you ready (y/n)? y 
Positioning Tape

*** Enter Subset Selections ***

The following subsets are mandatory and will be installed automatically:
 * Base System                      * Kernel Configuration Files           
 * TCP/IP Networking Utilities      * Network File System Utilities        
 * Extended (Berkeley) Mailer           

The subsets listed below are optional:
 1) System Exerciser Package        2) RAND Mail Handler                   
 3) Kerberos Network Authentication 4) Enhanced Security Features          
 5) Document Preparation Software   6) Printer Support Environment         
 7) Adobe Font Metric Files         8) Software Development Utilities      
 9) RPC Runtime Environment         10) RPC Development Environment         
11) Internationalization Tools      12) Source Code Control System          
13) Pascal Development Package      14) VAX C/ULTRIX                        
15) On Line Manual Pages            16) Accounting Software                 
17) Communications Utilities        18) Bisynchronous Communications        
19) Maintenance Operations Protocol 20) Unix-to-Unix Copy Facility          

21) All of the Above
22) None of the Above
23) Exit without installing subsets

Enter your choice(s): 17 20 5 15 8 14 

These options are entirely, um, optional. I wanted to include the man pages (which need the document preparation system), UUCP, VAX C, the software development stuff and communication utilities. If you don’t want any of this, then 22 would be your option. But then you might as well have just installed the BASIC Installation (see above).

You are installing the following subsets:
   Base System                      Kernel Configuration Files           
   TCP/IP Networking Utilities      Network File System Utilities        
   Extended (Berkeley) Mailer       Document Preparation Software        
   Software Development Utilities   VAX C/ULTRIX                         
   On Line Manual Pages             Communications Utilities             
   Unix-to-Unix Copy Facility           

Is this correct? (y/n): y 

At this point it would be advisable to go and find something else to do. On the test run though on my server this took about five minutes. On the Pi, over an hour.

Copying Base System (ULTBASE400) from tape
Verifying Base System (ULTBASE400)
Copying Kernel Configuration Files (ULTBIN400) from tape
Verifying Kernel Configuration Files (ULTBIN400)
Copying TCP/IP Networking Utilities (ULTINET400) from tape
Verifying TCP/IP Networking Utilities (ULTINET400)
Copying Network File System Utilities (ULTNFS400) from tape
Verifying Network File System Utilities (ULTNFS400)
Copying Extended (Berkeley) Mailer (ULTUMAIL400) from tape
Verifying Extended (Berkeley) Mailer (ULTUMAIL400)
Copying Document Preparation Software (ULTDCMT400) from tape
Verifying Document Preparation Software (ULTDCMT400)
Copying Software Development Utilities (ULTPGMR400) from tape
Verifying Software Development Utilities (ULTPGMR400)
Copying VAX C/ULTRIX (ULTVAXC400) from tape
Verifying VAX C/ULTRIX (ULTVAXC400)
Copying On Line Manual Pages (ULTMAN400) from tape
Verifying On Line Manual Pages (ULTMAN400)
Copying Communications Utilities (ULTCOMM400) from tape
Verifying Communications Utilities (ULTCOMM400)
Copying Unix-to-Unix Copy Facility (ULTUUCP400) from tape
Verifying Unix-to-Unix Copy Facility (ULTUUCP400)
Rewinding Tape...

The installation software has successfully installed the software
subsets. You can now remove the tape containing the software subsets
from the device.

*** CONFIGURATION FILE KERNEL OPTION SELECTION *** 

    Selection   Kernel Option 
---------------------------------------------------------------
        1       Local Area Transport (LAT)
        2       Bisynchronous Communication protocol (VAX only)
        3       Computer Interconnect (CI) network
        4       Ethernet Packet Filter
        5       Enhanced Security Features
        6       DECnet
        7       All of the above
        8       None of the above
----------------------------------------------------------------

Enter the selection number for each kernel option you want.
For example, 1 3 :  7 

Having no idea by this point, I just plumped for everything.

You specified the following kernel options: 

        Local Area Transport (LAT)
        Bisynchronous Communication protocol
        Computer Interconnect (CI) network
        Ethernet Packet Filter
        Enhanced Security Features
        DECnet

Is this correct? (y/n) [n]: y 
*** SYSTEM CONFIGURATION PROCEDURE ***
The installation software found these devices in the floating
address space:

        dz0             on uba0         at 0160100
        dz1             on uba0         at 0160110
        dz2             on uba0         at 0160120
        dz3             on uba0         at 0160130

Configuration file complete.

Do you want to edit the configuration file? (y/n) [n]: n 

Once again: No idea. Also, I tried this on my server version and I’m still having flashbacks to the ED text editor. Never Again!

*** PERFORMING SYSTEM CONFIGURATION *** 
*** DEVICE SPECIAL FILE CREATION *** 
*** SOFTWARE INSTALLATION PROCEDURE COMPLETE ***

The following files were created during the installation procedure:

/vmunix                         - customized kernel
/genvmunix                      - generic kernel
/usr/adm/install.log            - installation log file
/usr/adm/install.FS.log         - file systems log file
/usr/adm/install.DEV.log        - special device log file

Enter the following boot sequence at the console mode prompt
after the installation software halts the processor: 

        >>> b dua0

syncing disks... done

HALT instruction, PC: 80080411 (BRB 80080410)

Once again you’ll need to boot the cpu before you boot from the disk.

sim> boot cpu 
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.
>>>b dua0
(BOOT/R5:0 DUA0

  2..
-DUA0
  1..0..

Ultrixboot - V4.0  Sat Mar 31 04:11:56 EST 1990

Loading (a)vmunix ...

Sizes:
text = 711280
data = 124416
bss  = 705976
Starting at 0x2b4d

ULTRIX V4.0 (Rev. 161) System #1: Sun Jul  1 04:30:40 GMT 1984

real mem  = 16723968
avail mem = 12550144
using 408 buffers containing 1672192 bytes of memory
KA655 processor with an FPU

	CPU microcode rev = 6, processor firmware rev = 83

Q22 bus
uda0 at uba0
uq0 at uda0 csr 172150 vec 774, ipl 17
klesiu0 at uba0
uq16 at klesiu0 csr 174500 vec 770, ipl 17
qe0 at uba0 csr 174440 vec 764, ipl 17
qe0: DEC DELQA Ethernet Interface DEQNA-lock Mode, hardware address aa:00:04:00:fd:04
dz0 at uba0 csr 160100 vec 300, ipl 17
dz1 at uba0 csr 160110 vec 310, ipl 17
dz2 at uba0 csr 160120 vec 320, ipl 17
dz3 at uba0 csr 160130 vec 330, ipl 17
ra0 at uq0 slave 0 (RA81)
tms0 at uq16 slave 0 (TK50)

Thu Jan  1 00:00:31 GMT 1970
Automatic reboot in progress...
/dev/ra0a: 632 files, 5777 used, 9774 free (174 frags, 1200 blocks, 1.1% fragmentation)
/dev/rra0g: umounted cleanly
Warning Creating new license database
Warning creating new history file
check quotas: done.
savecore: checking for dump...dump does not exist
local daemons: syslog sendmail.
Removing remnant Opser files
preserving editor files
clearing /tmp
standard daemons: update cron accounting network snmpd.
start errlog daemon - elcsd
Sun Jul  1 05:39:05 GMT 1984

ULTRIX V4.0 (Rev. 161) (judoon)

Now log in as root, with your carefully chosen password, and set up the TCP/IP networking.

login: root 
Password: {not echoed} 
ULTRIX V4.0 (Rev. 161) System #1: Sun Jul  1 04:30:40 GMT 1984

                Digital Equipment Corporation
                Nashua, New Hampshire

*** SOFTWARE INSTALLATION PROCEDURE COMPLETE ***

The following files were created during the installation procedure:

/vmunix                         - customized kernel
/genvmunix                      - generic kernel
/usr/adm/install.log            - installation log file
/usr/adm/install.FS.log         - file systems log file
/usr/adm/install.DEV.log        - special device log file

# netsetup install 
You will be asked a series of questions about your system.
Default answers are shown in square brackets ([]).
To use a default answer, press the RETURN key.

Your system's name is "judoon".  Is this correct [yes]? yes 

Your system can have one or more abbreviation names.  An abbreviation
name reduces the number of keystrokes required for network commands. A
common abbreviation name is the first letter of the system name.

Press the RETURN key if you do not want any abbreviation names for
judoon.  Otherwise, enter one or more abbreviation names, separated by
blank spaces: <cr> 

You do not want any abbreviation names for judoon.  Is this correct [yes]? yes 
For a Class A network, the network number is in the range 1 through
126.  For a Class B network, the network number consists of two fields
separated by periods.  The first field is in the range 128 through 191,
and the second field is in the range 1 through 254.  For a Class C
network, the network number consists of three fields separated by
periods.  The first field is in the range 192 through 223, the second
field is in the range 0 through 255, and the third field is in the
range 1 through 254:

   Class A:  1       through 126
   Class B:  128.1   through 191.254
   Class C:  192.0.1 through 223.255.254

My network is the class C 192.168.0.* network, and the ip address for this machine will be 192.168.0.143, so:

Enter the network number for judoon: 192.168.0 
The network number is 192.168.0.  Is this correct [yes]? yes 
Subnetworks allow the systems on a given local area network to be on
different network wires.  If your existing local area network is using
subnet routing, you need to know how many bits of your host number
are being reserved for specifying the subnetwork address.

Are you setting up judoon on a network that uses subnet routing [no]? no 
You will NOT set up judoon on a network that uses subnet
routing.  Is this correct [yes]? yes 
You are setting up judoon on a Class C network.
Valid Class C host numbers (including the subnet number) are in the range 
1 through 254.

Enter the host number for judoon: 143 
The Host number is 143.  Is this correct [yes]? yes 
***** UPDATING /etc/hosts WITH judoon AND localhost *****

An Internet Protocol (IP) broadcast address is an address in which the
bits of the host number are either all ones or all zeros.  You need to
know what the other hosts on your existing local area network are using as
their broadcast address.  If you are setting up your own network, use
the default..

WARNING! You must use the same broadcast address as all of the other
hosts on your network.  This is very important!

If you use all ones your IP broadcast address is: 192.168.0.255
if you use all zeros your IP broadcast address is: 192.168.0.0

Enter a "1" if you use all ones, or "0" if you use all zeros [1]: 1 
You are using all ones for your broadcast address.
Is this correct [yes]? yes 
Please specify the device name and unit number of your network
interface.  This information is entered in the /etc/rc.local file so
that the correct device is initialized when you bring the system to
multiuser mode.  The device name consists of the network device
as found in your system config file.  The following are some common
network device names:

        Device Name     Description
        -----------     -----------
          xna0          DEBNI - BI bus
          ni0           DEBNT, DEBNA - BI bus
          de0           DEUNA, DELUA - UNIBUS
          qe0           DEQNA, DELQA - Q-Bus
          ln0           DESVA, Busless LANCE network interface
	 ne0           Second Generation Ethernet Controller interface
          scs0          SCS network interface to CI

What is the device name of your Network Interface [qe0]? qe0 
Your Network interface is "qe0".  Is this correct [yes]? yes 
***** UPDATING /etc/rc.local WITH network configuration information *****

Network numbers have names so you can refer to them by name rather than
by number.  The network name is entered in the /etc/networks file.  If
you are adding judoon to an existing network, you should use the same
names as the other hosts on the network use for the various network
numbers.  If you are not adding judoon to an existing network, you can
name the network number whatever you want.  You can assign alias names
for the network number.

What is the name of network 192.168.0 [ethernet]? <cr> 
The network name for judoon is "ethernet".  Is this correct [yes]? yes 
Enter any aliases for ethernet: <cr> 
You do not have any aliases for ethernet.  Is this correct [yes]? yes 
***** UPDATING /etc/networks WITH ethernet *****

***** ADD/CHANGE SYSTEMS IN /etc/hosts *****

I didn’t bother with messing about in the /etc/hosts file, as I planned to import the /etc/hosts file from another machine.

Enter the host name, abbreviations, network number, and host number for
each host on the network.  Enter this information on separate lines
when prompted.  This information is stored in the /etc/hosts file.  When
finished, press the RETURN key at the hostname prompt.

Enter the name of the host you want to add to /etc/hosts: 
Are you finished adding hosts [yes]? yes

Enter the names of trusted hosts.  Trusted hosts are systems you
consider to be secure.  Be careful if you select trusted hosts.  Any
users on a trusted host can log in to judoon without password
verification if they have a valid account on your system.  The names of
the trusted hosts are stored in the /etc/hosts.equiv file.  When you
have finished entering the names of trusted hosts, press the RETURN key.

Enter the name of a trusted host: <cr>
Have you finished entering the names of trusted hosts [yes]? yes

***** SETTING UP /usr/hosts DIRECTORY *****

***** NETWORK SETUP COMPLETE *****

Now, start up networking. Quite why the system doesn’t do this automatically is beyond me.

# ifconfig qe0 192.168.0.143 

As the /etc/hosts file is empty, I grabbed a copy from my main server (which the other machine periodically grab their copies from). Obviously you shouldn’t (and shouldn’t be able to) grab my copy, and this is just an example.

# ftp 192.168.0.200 
Connected to 192.168.0.200.
220 recondite FTP server (Version 6.4/OpenBSD/Linux-ftpd-0.17) ready.
Name (192.168.0.200:root): tony 
Password (192.168.0.200:tony): {not echoed}
331 Password required for tony.
230- Linux recondite 2.6.32-41-generic #89-Ubuntu SMP Fri Apr 27 22:22:09 UTC 2012 i686 GNU/Linux
230- Ubuntu 10.04.4 LTS
230- 
230- Welcome to Ubuntu!
230-  * Documentation:  https://help.ubuntu.com/
230- 
230- 0 packages can be updated.
230- 0 updates are security updates.
230- 
230- *** System restart required ***
230 User tony logged in.
ftp> get /etc/hosts 
200 PORT command successful.
150 Opening ASCII mode data connection for '/etc/hosts' (317 bytes).
226 Transfer complete.
local: /etc/hosts remote: /etc/hosts
338 bytes received in 0.02 seconds (17 Kbytes/s)
ftp> exit
221 Goodbye.

Now ping a machine on the network (but not the machine on which the ULTRIX system is being simulated).

# ping tardis 
tardis is alive

Finally, add a non-privilidged user, so that you don’t completely arse things up by playing about as root.

# adduser 
Enter login name for new user (initials, first or last name):  tony 
Enter uid for new user [268]: <cr>  
Enter full name for new user: Tony Blews 
What login group should this user go into [users]:  <cr> 
Enter another group that 'tony' should be a member of
(<RETURN> only if none):  <cr> 
Enter parent directory for tony [/usr/users]: <cr> 
/usr/users not found, do you want to create it [yes]? <cr>  
The shells are:

/bin/sh		  /bin/csh	    /usr/bin/ksh      /usr/bin/sh5

Enter the users login shell name [/bin/csh]: <cr> 

Adding new user ...
Creating home directory...
Until the password is set for tony they will not be able to login.
Changing password for tony
Enter new password: {not echoed} 
Verify: {not echoed} 

Now either play about with the thing a bit more, leaving it running for a while, or shut it down and go to sleep. I chose sleep, as it was 6am by the time I finished this.

# shutdown now
Shutdown at 05:42 (in 0 minutes) [pid 168]
System shutdown time has arrived
erase ^?, kill ^U, intr ^C
# <ctrl-e> 
Simulation stopped, PC: 800033C4 (TSTL 24(R3))
sim> quit 
Goodbye
Eth: closed eth0
root@thay:/home/vax/bin# exit 

I’ve still got a few things to get working on judoon, such as getting DECnet running, using NFS to mount part of the filesystem from my server, and seeing if some very old code from about 1990 that I have on some floppy disks will compile.

Pi-VAX

As previously told, I’ve been emulating a MicroVAX 3900 on my ancient Linux machine. Now that I have a Raspberry Pi, it is time to try it on that too.

microvaxStarting from my Common Debian Raspberry Pi/Debian Networking SD image some things need to be installed.

sudo apt-get install m4
sudo apt-get install flex
sudo apt-get install bison

At this point creating a user for the Vax and switching to that user is probably a good idea. That’s what i’m doing. Adding this user to /etc/sudoers will probably help too.

After you’ve done that, you’ll need libpcap:

wget http://www.tcpdump.org/release/libpcap-1.1.1.tar.gz
tar vxf libpcap-1.1.1.tar.gz
cd libpcap-1.1.1
./configure
make
sudo make install
cd ..

Now you’ll need to download and compile SIMH:

mkdir simh
cd simh
wget http://simh.trailing-edge.com/sources/simhv39-0.zip
unzip -a simhv39-0.zip
mkdir BIN
make USE_NETWORK=1 BIN/vax

This will take a while, so go and make a brew.

When thats done, cd up and make some directories and copy a file:

cd ..
mkdir bin
mkdir data
cp simh/BIN/vax bin
cp simh/VAX/ka655x.bin data

Now you’re going to need the iso file of the VMS install media. Get the image (somehow) and store it in the data directory as “openvms.iso”. FTPing the image onto the Pi will take a long time, so I suggest you go and make something to eat, but don’t eat it yet.

Anyway, once that it done you’ll need a vax.ini file in your data directory.

So, vi data/vax.ini and make it thus:

;
; Load CPU microcode
load -r /home/vax/data/ka655x.bin
;
; Attach non-volatile RAM to a file
attach nvr /home/vax/data/nvram.bin
;
; This virtual machine has 64M memory
set cpu 64m
;
; Define disk drive types. RA92 is largest-supported VAX drive.
set rq0 ra92
set rq1 ra92
set rq2 ra92
set rq3 cdrom
;
; Attach defined drives to local files
attach rq0 /home/vax/data/d0.dsk
attach rq1 /home/vax/data/d1.dsk
attach rq2 /home/vax/data/d2.dsk
;
; Attach the CD-ROM to its file (read-only)
attach -r rq3 /home/vax/data/openvms.iso
;
; Disable unused devices. It’s also possible to disable individual devices,
; using a construction like “set rq2 disable” if desired.
;
set rl disable
set ts disable
;
; Attach Ethernet to a network interface
set xq mac=08-00-2B-AA-BB-CC
attach xq eth0
;
; Now start the emulator
boot cpu

We also need this in the bin dir, so

ln -s /home/vax/data/vax.ini bin/vax.ini

So now it is time to try to start the emulator up.

sudo bin/vax

This gives you a load of guff, followed by a “>>>”prompt.

boot dua3

Then enter the date/time when asked, and “yes” when asked.

Once it gives you a “dollar” prompt:

backup dua3:vms073.b/save_set dua0:

Now go and eat the food you cooked earlier.

Once the thing comes up with “Enter “YES” to continue”, hit Ctrl-E and and the prompt enter:

boot cpu

When is comes up with “Tests completed” and shows the $ prompt:

set boot dua0
boot

You’ll be asked for the date/time again, and other questions.

The name of the drive holding the OpenVMS media is DUA3, and Yes it is mounted and you do want to install the OpenVMS library and optional files, along with the MSGHLP database (at its’ default location).

You’ll probably also want the optional OpenVMS Management Station files, but none of the DECWindows or DECnet support (unless you really want it). Answer “Y” when is asks if this is correct.

Now, go and build a yacht while it does the things that it needs to do.

Eventually it will ask you to set passwords for the SYSTEM, SYSTEST and FIELD accounts. Pick ‘em wisely.

Next you’ll need an SCSNODE name and SCSSYSTEMID. Pick your own name (6 characters max – I used PIVAX) and use 1025 as the ID.

Next, you will be asked:

Do you want to register any Product Authorization Keys? (Y/N):

Yes you do, and you’ll need your license info (you do have that, don’t you?). So just follow the instructions to enter and confirm your details.

If this goes wrong, which it probably will, exit to the main menu, then use option 99. After entering your timezone details, and waiting for the seasons to change.

When you get back to the sim> prompt, type

boot cpu

and when it shows >>>

boot

Eventually you’ll see a message saying something like “Accounting information” and a whole load of numbers that you don’t need to bother about. Press ENTER, and log in as SYSTEM using the password you set earlier.

If your licence failed earlier, copy your license file directly on to the the command line now (I copied from ConText to Putty in an WinXP box).

My file looked like this (with all the preamble guff removed):

$ LICENSE REGISTER VAX-VMS -
/ISSUER=OPENVMS_HOBBYIST -
/AUTHORIZATION=DECUS-DEC-FANAMA-NADODOO -
/PRODUCER=DEC -
/UNITS=0 -
/TERMINATION_DATE=15-DEC-1971 -
/ACTIVITY=A -
/OPTIONS=(NO_SHARE) -
/CHECKSUM=2-DIDO-DOFA-NAMA-DODO

You may want to do the same to install any other Product Keys that you have.

By now a reboot is in order, so:

$ shutdown now
>>> boot cpu

Next we’ll set up some disks:

initialize dua1: DATA1
initialize dua2: DATA2
mount/system dua1 data1
mount/system dua2 data2

We’ll want these when we reboot, so these lines should be added to the end of the sys$manager:systartup_vms.com file:

$! Locally added stuff
$ mount/system dua1 data1
$ mount/system dua2 data2

And finally you’ll be wanting to add a user.

$ set def sys$system
$ r authorize
UAF> add pi/password=pi/owner="Raspberry Pi"/dev=dua1/dir=[pi]/uic=[200,201]
/flag=nodisuser/priv=all
UAF> exit
$ create/dir dua1:[pi]
$ set directory/owner=pi dua1:[pi]

Of course the user “pi” will need to change the password when they first log in.

I’ll look at adding TCP/IP to it later, but for now I’ll just look at setting up virtual serial linesand make the thing auto boot.

Add this to the vax.ini file after the “Disable unused devices bit”:

;
; Fire up some serial lines! Fun, telnet to 4000
;
set DZ lines=8
attach -am DZ 4000
;
;
; Uncomment the line below to enable auto-boot
dep bdr 0
;

Now you have a working VAX 3900 VMS system emulated on A Raspberry Pi. Fantastic.

2012-05-25-19.17.08Elsewhere, someone has successfully emulated an IBM 4381!

(In all fairness, a lot of this post was cribbed from Phil Wherry’s guide Running VAX/VMS Under Linux Using SIMH, with config bits from Tim Russell)

I has Raspberry Pi!

Thanks to a mate, Jamie Sutherland, I now has Pi.

2012-05-20-21.36.17

2012-05-25-19.17.08

I’ve not actually done much with it yet, save for setting up some of the extra software I need for Operation Dalek.

Currently the Raspberry Pi is connected to my ancient Nokia portable TV (which doesn’t have an ariel connected – so sod off TV Licensing people) with a £4.99 lead from Maplin (part #L94BA). Power is coming from the Micro-USB PSU from my Samsung Europa, and the SDHC card contains Debian Squeeze.

As I don’t currently has a compatible WiFi dongle, the thing is connected to my router via a patch lead. Not an ideal situation, but one I can handle for the moment.

2012-05-21-13.42.16The first thing do, after logging in and changing the default passwords etc, is to change the/boot/config.txt file to make the display usable. These are the settings for the aforementioned ancient Nokia 14″ portable:

sdtv_mode=2

overscan_left=20

overscan_reight=12

Then, you’ll probably want to enable ssh:

sudo insserv ssh

And then install tightvncserver:

apt-get install tightvncserver

(assuming you are connected to the internet)

Now, instead of squinting at this on a crap old telly:

2012-05-21-13.45.22I can look at this virtual desktop from one of my other computers (with a good monitor):

2012-05-21-14.22.41Now the Pi can work headless, and I can have my combined keyboard/trackball back as the “remote control” for my current WinXP based media PC (although I think that if all goes well they will be re-united soon).

2012-05-21-14.23.20That, by the way, is the Raspberry Pi sitting on top of the desktop that it (or it’s soon to be ordered sibling) will eventually replace.

Next steps? Well, back up the SD card for a start, fix a niggling hardware fault on my home-built Arduino shield, try the Dalek software (which I know works on the Ubuntu box), and see if SIMH will emulate a VAX properly on this tiny little thing. Oh that would be so cool.

The Arduino Dalek Master Plan – Episode 2

Looking back on my grand ideas, I’ve decided on a bit of a change of plan.

The current scheme will not have ports for video, or extraneous USB holes for keyboards and things of that ilk.

The current list of ports to stick on the Dalek is:

  • Ethernet – as i think I’ll need it in case the wifi fails
  • USB (using the already fitted port) for power while testing

The Raspberry will need USB for these:

  • Connection to the Arduino
  • Connection to the webcam (unless i can get a camera that uses the on-board connection)
  • Some form of microphone

So it still looks like I’ll need an unpowered hub.

It will also need a speaker connection for whatever sound output I decide to use.

Also, at some point i intend to get the ear lights working again.