Tuesday, March 25, 2014

Cromemco UNIX V.2 Installation


Building on the story of the injured Cromemco UNIX system I am outlining the exact recovery procedure I followed to restore UNIX V2 onto a new Hard Disk.

Hardware Notes
To run UNIX V2 you will need a working  XMU Memory Management unit.   These are as rare as hens teeth.  Without it you can still run Cromix 172 XXU version and in article to come I'll document that installation   (from diskette which is much simpler).


Recovery Materials
2 XDOS diskettes which are written in xfs format
Cromemco 68020 computer with a tape QIC60 SCSI tape drive controlled from the ESDC controller card
New blank MFM format ST506 type disk controlled by STDC controller card
A 360K disk drive
UNIX V2 tape example from catalog 669
Extended Patience and Coffee.


Note Down Disk Geometry

Before inserting the new MFM hard disk into the computer note down it's vital statistics.   Recall that on these old disks the computer can not make an enquiry to the disk to ask for these parameters to be returned to it.


        Number of heads.................. = 5
        Number of cylinders.............. = 977
        Number of alternate tracks....... = 15
        Start of write precompensation... = 300
        Location of alternate tracks..... = 976


Now insert the MFM hard drive connecting up the Power and the 2 Data cables.

In the next section you will repeatedly use diskettes 078 and 079 to perform essential low level tasks.

Once a program is loaded and used once a : prompt will appear.  Simply hit RETURN and you will return to XDOS (DDOS) prompt at which point you will pres ESCape to abort a boot and then load the next program:

078 is XDOS disk 2 contains
1990-02-02  01:07            31,548 diskinfo
1990-02-02  01:07            53,116 ftar
1990-02-02  01:07            29,716 inithard
1990-02-02  01:08            26,544 ls
1990-02-02  01:08            27,860 makfs
1990-02-02  01:08            30,056 readall

2009-02-12  03:04            65,536 xdos

079 is XDOS disk 1 contains
1990-02-02  01:07            25,160 cat
1990-02-02  01:07            31,548 diskinfo
1990-02-02  01:07            45,260 fsck
1990-02-02  01:07            53,116 ftar
1990-02-02  01:07            29,716 inithard
1990-02-02  01:08            26,544 ls
1990-02-02  01:08            27,860 makfs
1990-02-02  01:08            27,456 newboot
1990-02-02  01:08            25,980 od

1990-02-02  01:08            33,840 patch


Initialise the hard Disk
Boot from diskette 079 and intialise the Hard Disk
DDOS version 01.04
Co-processor test OK

Preparing to boot Std 31 - type ESC for DDOS prompt

;lua
Do you wish to specify program name (y/n) <n>? y

Enter program name: inithard

Loading file: inithard
File loaded
New drive (Y/N) <N> ? y
Standalone inithard Version V.2.1.4
Press:          RETURN to supply default answers
                CTRL-C to abort program
Warning:        INITHARD can destroy all disk data
Warning:        NEWDRIVE switch is enabled

Device name? std(31,0)

Number of surfaces (1 - 16) <16> ? 5
Number of cylinders (1 - 4096) <1280> ? 977
    Max number of alternate tracks must be
    a multiple of the number of surfaces
Max number of alternate tracks (0 - 112) <0> ? 20
Starting cylinder of disk (0 - 977) <1> ?
Starting cylinder for write precomp (0 - 977) <977> ? 300
Do you want to initialize any tracks (Y/N) <N> ? y
First cylinder (0 - 976) <0> ?
Last cylinder (0 - 976) <976> ?
First head (0 - 4) <0> ?
Last head (0 - 4) <4> ?
Surface Cylinder
      4       9
...

STDC: format track error s=3 c=40 B4

: I/O error
STDC: format track error s=3 c=41 B4
: I/O error
STDC: format track error s=3 c=42 B4
: I/O error
STDC: format track error s=3 c=49 B4
: I/O error
STDC: format track error s=2 c=392 B4
: I/O error
      4     976
Partition #  Starting Cylinder  Size (Kbytes)
     0                    1          48600
Do you want to change partition table (Y/N) <N> ? y
Partition 0
Size of partition (Kbytes) (50 - 48600) <48600> ? 25000
Partition 1
Size of partition (Kbytes) (50 - 23600) <23600> ? 5000
Partition 2
Size of partition (Kbytes) (50 - 18600) <18600> ? 10000
Partition 3
Size of partition (Kbytes) (50 - 8600) <8600> ?
Alternate track location (1 - 972) <972> ?

Do you want to add an alternate track (Y/N) <N> ? n



Bad track formatting should be ignored here  (unless it is every track), we'll deal with that more robustly in a moment

The partition layout is important.  Follow these rules

  • Track 0 should not be used
  • First partition is where UNIX will live and should be at least 20MB and for my tape 30MB
  • Partition 2 will house the UNIX swap area, >4MB
  • Partition 3 and later can store anything you like.  A convention I have seen is to store in Partition 3 Cromix 172 and in Partition 4 and later your user data

Read the Surface of the Disk
With old MFM hard disks it is advisable to keep the temperature stable and to leave the disk spinning for at last 30 minutes.  Then in steady state check the readability of the full hard disk surface.

Load the standalone readall program from XDOS disk#2 (078)


DDOS version 01.04
Co-processor test OK

Preparing to boot Std 31 - type ESC for DDOS prompt
;lua
Do you wish to specify program name (y/n) <n>? y

Enter program name: readall

:  std(31,0)
Reading surfaces 0-4 on cylinders 0-976
Pass    0 Surface  Cylinder
Surface  1, cylinder   34, primitive read error FF 04
Surface  1, cylinder   35, primitive read error FF 04
Surface  3, cylinder   38, primitive read error FF 04
Surface  3, cylinder   39, primitive read error FF 04
Surface  3, cylinder   40, primitive read error FF 04
Surface  3, cylinder   41, primitive read error FF 04
Surface  3, cylinder   42, primitive read error FF 04
Surface  3, cylinder   49, primitive read error FF 04
Surface  2, cylinder  392, primitive read error FF 04
                4,      976

Obviously your printout will differ, but note down these cylinders and surfaces and run inithard a second time and add in the alternate tracks


Populate Alternate Track Table
Based on 9 bad tracks that readall found I need to run inithard again and map the alternate tracks

DDOS version 01.04
Co-processor test OK

Preparing to boot Std 31 - type ESC for DDOS prompt

;lua
Do you wish to specify program name (y/n) <n>? y

Enter program name: inithard

Loading file: inithard
File loaded
New drive (Y/N) <N> ?
Standalone inithard Version V.2.1.4
Press:          RETURN to supply default answers
                CTRL-C to abort program
Warning:        INITHARD can destroy all disk data
Device name? std(31,0)
Number of surfaces (1 - 16) <5> ?
Number of cylinders (1 - 4096) <977> ?
    Max number of alternate tracks must be
    a multiple of the number of surfaces
Max number of alternate tracks (0 - 112) <20> ?
Starting cylinder of disk (0 - 977) <1> ?
Starting cylinder for write precomp (0 - 977) <300> ?
Do you want to initialize any tracks (Y/N) <N> ?
Partition #  Starting Cylinder  Size (Kbytes)
     0                    1          25000
     1                  501           5000
     2                  601          10000
     3                  801           8600
Do you want to change partition table (Y/N) <N> ?
Alternate track location (1 - 972) <972> ?
Do you want to add an alternate track (Y/N) <N> ? y
Bad cylinder number (0 - 976) <0> ? 34
Bad head number (0 - 4) <0> ? 1
Bad cylinder number (0 - 976) <0> ? 35
Bad head number (0 - 4) <0> ? 1
Bad cylinder number (0 - 976) <0> ? 38
Bad head number (0 - 4) <0> ? 3
Bad cylinder number (0 - 976) <0> ? 39
Bad head number (0 - 4) <0> ? 3
Bad cylinder number (0 - 976) <0> ? 40
Bad head number (0 - 4) <0> ? 3
Bad cylinder number (0 - 976) <0> ? 41
Bad head number (0 - 4) <0> ? 3
Bad cylinder number (0 - 976) <0> ? 42
Bad head number (0 - 4) <0> ? 3
Bad cylinder number (0 - 976) <0> ? 49
Bad head number (0 - 4) <0> ? 3
Bad cylinder number (0 - 976) <0> ? 392
Bad head number (0 - 4) <0> ? 2
Bad cylinder number (0 - 976) <0> ?
Bad head number (0 - 4) <0> ?
Alternate track table
  # bad track alt track      # bad track alt track      # bad track alt track
      cyl  hd   cyl  hd          cyl  hd   cyl  hd          cyl  hd   cyl  hd
  0    34   1   972   0      3    39   3   972   3      6    42   3   973   1
  1    35   1   972   1      4    40   3   972   4      7    49   3   973   2
  2    38   3   972   2      5    41   3   973   0      8   392   2   973   3
Do you want to add an alternate track (Y/N) <N> ?
Do you want to delete an alternate track (Y/N) <N> ?


Make the UNIX filesystem
Reboot from disk 079 and load makfs

DDOS version 01.04
Co-processor test OK

Preparing to boot Std 31 - type ESC for DDOS prompt
;lua
Do you wish to specify program name (y/n) <n>? y

Enter program name: makfs
Loading file: makfs
File loaded


Standalone makfs Version V.2.1

device:  std(0,0)
bytes per logical block = 1024
total logical blocks = 25000
total inodes = 6240
gap (physical blocks) = 1
cylinder size (physical blocks) = 100


Use fsck to check the empty / filesystem
As a paranoia step, run fsck to check that the filesystem is good

DDOS version 01.04
Co-processor test OK

Preparing to boot Std 31 - type ESC for DDOS prompt
;lua
Do you wish to specify program name (y/n) <n>? y

Enter program name: fsck
Loading file: fsck
File loaded


Standalone fsck Version V.2.2.1

-s? (unconditionally rebuild free list)
-S? (rebuild free list, but only if no discrepancies)
-n? (do not open for writing)
-y?
-D?
-f?
-b?

filesystem:  std(0,0)

  std(0,0)
  File System:  Volume:

  ** Phase 1 - Check Blocks and Sizes
  ** Phase 2 - Check Pathnames
  ** Phase 3 - Check Connectivity
  ** Phase 4 - Check Reference Counts
  ** Phase 5 - Check Free List

  2 files 2 blocks 49214 free



Restore UNIX from tape 669
From the lifesaving tape I conveniently made earlier:

DDOS version 01.04
Co-processor test OK

Preparing to boot Std 31 - type ESC for DDOS prompt
;lua
Do you wish to specify program name (y/n) <n>? y

Enter program name: ftar
Loading file: ftar
File loaded
Standalone ftar, Version V.2.5

:  -xv qic(0,0)
Enter destination directory : std(0,0)/
Enter destination directory : std(0,0)/
Starting time:  Fri Mar 18 17:22:09 1994

Extracting "/"
Extracting "/bin"
Extracting "/bin/man"
Extracting "/bin/killall"
Extracting "/bin/size"
Extracting "/bin/time"
Extracting "/bin/mesg"
Extracting "/bin/arcv"
Extracting "/bin/greek"
Extracting "/bin/vax"
Extracting "/bin/u3b"
Extracting "/bin/touch"
Extracting "/bin/osdd"
Extracting "/bin/pdp11"
Extracting "/bin/ls"
Extracting "/bin/expr"
Extracting "/bin/diskformat"


...

30 minutes later

Extracting "/tt"
Extracting "/tt/cat"
Extracting "/tt/diskinfo"
Extracting "/tt/fsck"
Extracting "/tt/ftar"
Extracting "/tt/inithard"
Extracting "/tt/ls"
Extracting "/tt/makfs"
Extracting "/tt/newboot"
Extracting "/tt/od"
Extracting "/tt/patch"
Extracting "/tt/readall"
Extracting "/tt/xdos"

Ending time:  Fri Mar 18 20:23:08 2014


Check integrity of restored filesystem
Run fsck a second time to see that all is well.

DDOS version 01.04
Co-processor test OK

Preparing to boot Std 31 - type ESC for DDOS prompt
;lua
Do you wish to specify program name (y/n) <n>? y

Enter program name: fsck
Loading file: fsck
File loaded


Standalone fsck Version V.2.2.1

-s? (unconditionally rebuild free list)
-S? (rebuild free list, but only if no discrepancies)
-n? (do not open for writing)
-y?
-D?
-f?
-b?

filesystem:  std(0,0)

  std(0,0)
  File System:  Volume:

  ** Phase 1 - Check Blocks and Sizes
  ** Phase 2 - Check Pathnames
  ** Phase 3 - Check Connectivity
  ** Phase 4 - Check Reference Counts
  ** Phase 5 - Check Free List
  3556 files 51362 blocks 7698 free



Boot to std(0,0)/unix using newboot
At the moment the bootstrap program used to find, load and run /unix is not installed and there is no standalone program to install it.

So get to real UNIX and we will then write out the correct program


DDOS version 01.04
Co-processor test OK

Preparing to boot Std 31 - type ESC for DDOS prompt
;lua
Do you wish to specify program name (y/n) <n>? y

Enter program name: newboot
Loading file: newboot
File loaded

Newboot Version V.2.1.2

Preparing to boot esd( 0,0)unix - Type ESC to abort
ESDC0 0 unit 0 block 0 hd 0 cyl 0 sect 0 stat 0x80000000


The Distribution system is pre programmed to boot from an ESDI disk which does not exist and so the boot fails.  Now enter the ST506 disk name instead

: std(0,0)/unix
Booting std(0,0)/unix - Standby
Size:  165176+15100+444460

rootdev = 0x0100:

pipedev = 0x0100:

dumpdev = 0x0101:

swapdev = 0x0101:
(C) Copyright 1984 - UniSoft Corporation
    68020 Unix Paging System V.2 - March 1985

Created Wed May  3 16:08:23 PDT 1989

Cromemco, Inc. distribution system
MC68881 Floating Point Coprocessor

UNIX/5.2: unix0212
total memory size: 4194304 bytes
available memory: 3260416 bytes


So boot UNIX (wahoo) and then install it

# wboot std/0s31 /etc/ustdboot
Write /etc/ustdboot to /dev/std/0s31. (y/n): y
14+1 blocks in
14+1 blocks out

# cd /
# shutdown

SHUTDOWN PROGRAM

Fri Mar 18 20:31:27 PST 1994

Busy out (push down) the appropriate phone lines for this system.

Do you want to continue? (y or n):   y
Process accounting stopped.
No demon active
Error logging stopped.

All currently running processes will now be killed.

Wait for 'INIT: SINGLE USER MODE' before halting.


So that is all completed.  Whole process should take less than 120 minutes depending on your coffee breaks.