Site logo 14114

<REFERENCE>PRIME>DRB>INSTPRIMOS210


Objective

To help you get PRIMOS 21.0 running on Jim Wilcoxson's Prime 50-series emulator software. Note that there are subtle differences between the different versions of this document for different versions of PRIMOS.

This document is "what to type". For background on what's happening here, see PRIMOS installation overview.

Note that the 21.0.6 release of PRIMOS used here has a bug: an AMLC command used on a line an odd number of times results in a hung line. An even number of invocations results in a working line. The setup on the supplied configuration tape works around this.

What you need to bring

  • A unix-ish system of some sort. The emulator has been tested on Linux and Mac OS X. It might work on FreeBSD or Solaris-family operating systems without too much trouble. Windows has not been tested at all.
  • The usual unix build tools: make and a c compiler.
  • The git or unzip programs.
  • Working knowledge of the unix command line.
  • The ability to understand octal numbers. Primes love base eight. (Wikipedia Octal)

Resources

Questions can be asked in the comp.sys.prime newsgroup or on IRC in #classiccmp on Libera. Various power users, former employees of Prime distributors, and ex-Primates, as well as the author of the emulator, read the newsgroup. In IRC, try asking pjustice or sark. If all else fails, open an issue in the github tracker.

Many Prime manuals are available in the Prime reference section of this site. Some additional manuals not yet scanned or uploaded are in the possession of various members of the community, so if you need something you can't find, ask.

Background

The process involves:

  • Downloading and building the emulator
  • Setting up a directory structure
  • Downloading install media
  • Creating partitions with MAKE
  • Restoring files from virtual tapes with MAGRST
  • Configuring PRIMOS

We will set up the virtual disk drive as a 600MB SMD device and partition it with 30 of the 40 heads used for the file system, and 10 heads used for virtual memory paging.

Downloading and building the emulator

Change to a place where you ordinarily store and build source code. On Linux you might for example use /usr/src.

You can use git to check out the source code from the p50em github repository by giving the command:

git clone https://github.com/prirun/p50em.git

This will result in a new directory called p50em.

If you prefer, you can download the current source as a zip file and extract it. This will result in a new directory called p50em-master.

Once you have the source code downloaded and extracted, change into that new directory. Compile the software by typing:

make

This should result in an executable new file called em, which is the built emulator. There may be some compiler warnings.

Setting up a directory structure

I suggest you set up a run directory structure something like this:

p50emu -+
        |
        +- tapes
        |
        +- standalones
        |
        +- <versionorname>
        |
        +- <otherversionorname>
        ...

Copy the emulator binary (em) from where you built it into this new directory structure.

You can't run multiple copies of the emulator in a single directory, so make a subdirectory (represented by <versionorname> above) named such that you can keep track of what emulated system is installed in it. (You can make multiple emulated systems.) For example, you could use PRIMOS version numbers, or name the directory based on how you intend to use the system it contains (games, softwaredev, etc).

Change into this new directory.

Use the touch command to create an empty file called disk26u0.600m.

touch disk26u0.600m

The emulator uses filenames to find its configured devices; this file becomes the disk set to be unit 0 and attached to the controller at address '26.

Downloading install media

Distribution tapes for PRIMOS 21.0 are available from the distribution sets page.

Extract the tape images from the tarball and place those files into your run directory under tapes.

In your <versionorname> directory, create a symlink called mt0 pointing to the file name m210bt.tap of your PRIMOS tape set:

ln -s ../tapes/m210bt.tap mt0

Obtain cfg210.tap from here. This contains starter configuration files for PRIMOS, to reduce the amount of editing you have to do. Put this in tapes.

Doing the install

You'll need two terminal windows or consoles available. You will run the emulator in one, and use the other to "change tapes" by replacing the target of the "mt0" symlink. If you like to use screen or tmux, they'll work fine for this too.

NOTE: by default when talking to PRIMOS, the "backspace" character is a double quote (") and the line kill character is a question mark (?). Yes, printing characters you'd want for other things. We'll change this later, but during the install you'll have to suffer through with this very early-seventies set of choices.

Setting up the disk

First we need to make a filesystem on the emulated disk. To do this, we will boot the MAKE program off the tape. In your first terminal window, start the emulator by typing this command:

../em -boot 10005

You'll see one or more version/copyright banners. Then you'll be asked:

RUN FILE TREENAME=

Enter:

make.save

The system will tell you it's loading MAKE, then you'll get the version/copyright banner from MAKE, and it will ask you to Enter command line options:.

Enter the following carefully, all on one line. Some versions of the emulator seem to double echo here. Remember the backspace and line kill thing from above.

-disk -part -dt -badlev -baud -ac -no_init -newdsk -noflmp

MAKE will then ask you a series of questions. The questions and their answers are:

Physical device? 7460

Partition name? comdev

Disk type must be one of the following:
                    SMD         80MB or 300MB removable
                    CMD         Cartridge module device
                    68MB         68 megabyte fixed media
                    158MB       158 megabyte fixed media
                    160MB       160 megabyte fixed media
                    600MB       600 megabyte fixed media
                    MODEL_4475  300 megabyte fixed media
                    MODEL_4714   84 megabyte fixed media
                    MODEL_4711   60 megabyte fixed media
                    MODEL_4715  120 megabyte fixed media
                    MODEL_4735  496 megabyte fixed media
                    MODEL_4719  258 megabyte fixed media
                    MODEL_4845  770 megabyte fixed media
                    MODEL_4721  328 megabyte fixed media
                    MODEL_4860  817 megabyte fixed media
Disk type? 600mb

Level of badspot checking? (default = 4) 0

Baud rate? 9600

Which file sectoring scheme would you like?
Type "0" (Reverse Sector)
 or "1" (Forward Sector)
> 0

MAKE will create the filesystem and the emulator will exit. You should see the phrase "Disk created" somewhere in the output.

If you instead get a series of messages like this:

DISK  RD ERROR 007460  000000 000002 000000 000000 100002

you probably forgot to touch the disk file above.

Next, we need to create the paging space. Boot MAKE again:

../em -boot 10005
make.save

This time use these (slightly different) MAKE options (all on one line):

-disk -split -part -dt -badlev -baud -ac -no_init -newdsk -noflmp

MAKE will ask, and you will answer:

Physical device? 172460

Partition name? pagdev

Disk type must be one of the following:
                    SMD         80MB or 300MB removable
                    CMD         Cartridge module device
                    68MB         68 megabyte fixed media
                    158MB       158 megabyte fixed media
                    160MB       160 megabyte fixed media
                    600MB       600 megabyte fixed media
                    MODEL_4475  300 megabyte fixed media
                    MODEL_4714   84 megabyte fixed media
                    MODEL_4711   60 megabyte fixed media
                    MODEL_4715  120 megabyte fixed media
                    MODEL_4735  496 megabyte fixed media
                    MODEL_4719  258 megabyte fixed media
                    MODEL_4845  770 megabyte fixed media
                    MODEL_4721  328 megabyte fixed media
                    MODEL_4860  817 megabyte fixed media
Disk type? 600mb

Level of badspot checking? (default = 4) 0

Total decimal number of records available:      75690
Decimal records for paging? max ? ? ?

Baud rate? 9600

Which file sectoring scheme would you like?
Type "0" (Reverse Sector)
 or "1" (Forward Sector)
> 0

You should again see "Disk successfully." and the emulator will again halt.

Loading the base software

Now we'll boot PRIMOS from tape to begin restoring the software distribution. Start the emulator again:

../em -boot 10005

and at:

RUN FILE TREENAME=

enter:

prirun>primos.save

Remember, the kill character is a question mark. Now PRIMOS will ask you a few questions to get itself configured enough for basics, and you will answer:

Enter COMmand DEVice: 7460
Enter PAGing DEVice: 172460
Enter Number Terminal USeRs: 1
PAGDEV 172460, partition <PAGDEV>, has not previously been used for paging.
 Are you SURE you want to page on PAGDEV 172460? yes
Enter system name: SYS210

You pick the sytem name. It may contain up to six characters, and the first must be a letter). Note that these values are only used for the current boot, and are not saved anywhere permanent. After you answer those questions, you should see the version/copyright banner and some other startup messages. (You may also see some emulator messages about device initialization.) Eventually, you'll get to a command prompt ("OK, "). Terminal i/o in PRIMOS is not synchronous, so it may appear, then be followed by a few other lines.

Now type the following commands to set your working directory, claim the tape drive device, and run the tape restore program from the tape:

a mfd 0
as mt0
mtresume mt0 magrst

Now MAGRST will banner, and ask you three questions, and you will answer:

Tape Unit (9 Trk): 0
Enter logical tape number: 1
Ready to Restore: yes

When you've answered these questions, MAGRST will restore the files from the boot tape onto the disk.


Do the following for each of the other tape images you extracted. Do them in this order: u1, v1, c1, ic. (About tapeids)

Remove the mt0 symlink and re-create it pointing to m210<tapeid>.tap. Then start MAGRST from disk. It should look something like this:

rm mt0
ln -s ../tapes/m210u1.tap mt0
r magrst

and again answer the three questions with 0, 1 and yes.


For the final restore, we'll read a set of basic configuration files from the cfg.tap file to get you started. In your second window, remove the mt0 symlink again, and make a new one pointing to cfg.tap. Then, in the first window:

magrst
0
1
yes

The files read you read from cfg210.tap were:

  • CMDNC0>CONFIG - system configuration settings, including erase and kill
  • CMDNC0>PRIMOS.COMI - commands to configure shared libraries, start spoolers, enable user login, and other such housekeeping
  • CMDNC0>AMLC.COMI - commands to configure serial ports, called from PRIMOS.COMI

You've now read in all of the basic operating system parts. Note that the CONFIG file sets the "erase character" to backspace, and the line kill character to a Control-U.

Configuring the base software

Type the following commands to set up the spooler, search rules and the translator libraries:

spac comdev system:all

a mfd 0
create spool_data*
create spool_queue*

co system>ed.share.comi

a system
r entry$.install.cpl
ssr search_rules*>entry$.sr
r attach$.install.cpl
r binary$.install.cpl
r command$.install.cpl
r include$.install.cpl
r spool.install_acl.cpl
a translators
r translators.install.cpl

Now shut down the operating system:

shut all
yes

and boot again, from disk this time:

../em -boot 14114

Create the user authorization database. The dialog looks something like this:

OK, edit_profile
SAD does not exist.  Create it? y
*** Creating User Validation File.  Projected number of users: 32
System administrator name: system
Create project "DEFAULT"? y
Set system-wide attributes for user "SYSTEM":
        Password: <password for system>
        Groups: <enter>
Set limits for project "DEFAULT":
        Groups: <enter>
        Maximum number of command levels: 10
        Maximum number of live program invocations per command level: 10
        Maximum number of private, dynamic segments: 64
        Maximum number of private, static segments: 64
Set profile attributes for project "DEFAULT":
        Groups: <enter>
        Initial attach point: <comdev>cmdnc0
Attribute limits for the project:
        Number of command levels: 10
        Number of live program invocations per command level: 10
        Number of private, dynamic segments: 64
        Number of private, static segments: 64
Create/change user attributes? n
Set attributes for user "SYSTEM" in project "DEFAULT":
        Groups: <enter>
        Initial attach point: <comdev>cmdnc0
Create/change user attributes? no
Check entry? no
> csd -ds 64 -ss 64
> sd -on
> quit

Now shut down the operating system again:

shut all
yes

and boot from disk again:

../em -boot 14114

and you should have a working operating system.

Now what?

You probably want to have some emulated serial ports so you can telnet into the emulator. Pick an unused port number on your machine, say 2023. (If you want to run multiple copies of the emulator at the same time, they each need a distinct port number.) From here on out, start the emulator with this command line:

../em -boot 14114 -tport 2023

and then you can:

telnet localhost 2023

You might want to read some of the Prime documentation to learn how to actually use your new toy. Some suggested manuals to start, from https://sysovl.info/reference_prime_generalos.html:

FDR3108/DOC3108 Primos Commands Guide
FDR3104 User's Guide to Editor and Runoff

and from https://sysovl.info/reference_prime_adminop.html:

DOC9304 Operator's Guide To System Commands
DOC10131 System Administrator's Guide Vol1/2/3

The formal software installation guide for Rev. 22 (not an exact match for this version) is at:

https://sysovl.info/pages/blobs/prime/adminop/r22sinstgde.pdf

Most distribution tape sets include layered software. Installation of this software generally involves restoring additional logical saves from the tapes using magrst, attaching to restored directories, and running install scripts. You might also need to arrange to share parts of the code at boot time for some products. The above install guide shows how this process might look.

You restored the layered products from this tape set, and they include BASIC, FTN, BRMS, and INFORMATION.

For additional suggestions, visit the places listed in Resources, explain what you'd like to do, and someone can probably help you get started.

I don't want to do all of this!

There are pre-built binaries of the emulator, and sample system images available from the downloads page, which you can use instead.