5

Mini-unix link here: https://www.tavi.co.uk/unixhistory/mini-unix.html

According to the setup docs (first real file in the documentation zip file) the tape image contains 3 disk images, the system itself, its source code and the doc files (man pages I assume)

Running on simh as suggested in the web page above.

The doc discusses two way of extracting the source disk, I cannot get either to work.

How can I access the source and doc disks?


What I tried:

Run tmrk with bigger skip values. I changed the setup.ini to attach source.dsk to rk0 since thats what this simple utility seems to do.
Then booted up as per normal with source disk image as rk1.

Now I have to mount the disk, I dont know how to do that. I tried /etc/mount /dev/rk1 /usr/source but it didnt work, hangs when doing as ls of the source dir.

22
  • 3
    What are you running on, hardware or emulator? Either way, what model of -11? Are you having trouble reconfiguring the emulator or mini-unix? What model of tape drive? All these seem like pertinent facts. Commented Jan 30 at 0:20
  • 1
    OK, I guessed the answers from looking at the init files. 11/20, simh, tm11/tu10. One thing that concerns me is 'set cpu 64k' - I'm not that familiar with simh, but if that truly means 64k core, then an unmapped 11 can't address more than 56k; 8k of address space is needed for the I/O page. Commented Jan 30 at 0:30
  • 3
    Your question is lacking in details and is attracting close votes! Please can you edit your question and add information about your setup, any output from mini-unix if any, etc etc.? I would be very interested in reading an edited question and any answers Commented Jan 30 at 8:48
  • 2
    As this seems to be simh related, there is an active simh forum at groups.io/g/simh/topics Commented Jan 30 at 9:37
  • 1
    I think there's still a sporting chance that this is a question about "how to configure a magtape controller and drive in Mini Unix", so I am not VTC'ing just yet, Commented Jan 31 at 2:51

1 Answer 1

4

Method one: Distributed ready-to-run images

This one works out of the box: Download the zip file with three images from the link given in the mini-unix page, namely munixrks.zip.

Extract images, make a configuration file distrib.ini that contains

set cpu 11/20
set cpu 64k
attach rk0 mxrk05a.img             
attach rk1 mxrk05b.img             
attach rk2 mxrk05c.img             
boot rk

Start the system, and you can mount them:

$ simh-pdp11 distrib.ini 

PDP-11 simulator V3.9-0
Disabling CR
Disabling XQ
@rkmx

RESTRICTED RIGHTS

USE, DUPLICATION OR DISCLOSURE IS SUBJECT TO
RESTRICTIONS STATED IN YOUR CONTRACT WITH
WESTERN ELECTRIC COMPANY, INC.


;login: root
# /etc/mknod /dev/rk2 b 0 2
# mkdir /usr/source
# /etc/mount /dev/rk1 /usr/source
# /etc/mount /dev/rk2 /mnt
# ls -l /usr/source
total 36
drwxrwxr-x  2 bin       368 Jan 26  1976 as
drwxrwxr-x  2 bin       928 Aug 31 02:34 c
drwxrwxr-x  5 bin       128 May 13  1975 cref
drwxrwxr-x 11 bin       368 Sep  4 01:45 fort
drwxrwxr-x  2 bin      1248 Jan 27  1976 iolib
drwxrwxr-x  2 bin       320 Jan 27  1976 m6
drwxrwxr-x  2 bin       464 Sep  4 01:46 mdec
drwxrwxr-x  2 bin       288 Sep  3 23:35 rat
-rw-rw-r--  1 bin       753 May 18  1975 run
drwxrwxr-x  2 bin      1696 Sep  4 04:41 s1
drwxrwxr-x  2 bin      1280 Sep  4 01:47 s2
drwxrwxr-x  2 bin       816 Jan 26  1976 s3
drwxrwxr-x  2 bin      2544 Jan 26  1976 s4
drwxrwxr-x  2 bin      1264 Jan 26  1976 s5
drwxrwxr-x  2 bin       800 Aug 31 00:28 s7
drwxrwxr-x  2 bin       384 Sep  4 03:38 salloc
drwxrwxr-x  2 bin       224 Aug 30 22:44 sno
drwxrwxrwx  3 hl        192 Sep  4 03:47 tmg
drwxrwxr-x  4 bin        80 May 13  1975 yacc
# ls -l /mnt
total 16
drwxrwxr-x  2 bin        48 Jun 26  1975 as
drwxrwxr-x  2 bin        80 Jun 26  1975 bc
drwxrwxr-x  2 bin       176 Jun 26  1975 beg
drwxrwxr-x  2 bin       240 Jun 26  1975 c
drwxrwxr-x  2 bin       464 Jun 26  1975 ctut
drwxrwxr-x  2 bin       176 Jun 26  1975 ed
drwxrwxr-x  2 bin       144 Jun 26  1975 hel
drwxrwxr-x  2 bin        48 Jun 26  1975 iolib
drwxrwxr-x  2 bin        48 Jun 26  1975 iosys
drwxrwxr-x 11 bin       192 Jun 26  1975 man
drwxrwxrwx  2 root      416 Dec 21 17:21 new
drwxrwxr-x  2 bin        48 Jun 26  1975 rat
drwxrwxr-x  2 bin        64 Jun 26  1975 secur
drwxrwxr-x  2 bin        96 Jul 17  1975 start
drwxrwxr-x  2 bin       192 Jun 26  1975 unix
drwxrwxr-x  2 bin       288 Jun 26  1975 yacc

However, as the mini-unix page remarks

The disk images may not be quite perfect.

the second method may give results closer to the original distribution.

Method two: Installing from tape

Follow the steps for stage1 and stage2.

After that, you'll have a system image and two empty images.

The next step requires rebuilding the OS. Since you have to use ed, and there's no backspace (at least I haven't figured out how to make backspace work), this is a bit uncomfortable, but here are the commands ready for copy-and-paste after logging in.

Remove additional kernel images we won't need:

rm /rpmx
rm /hpmx

Edit low.s and conf.c to enable tape driver:

chdir /usr/sys/mxsys
e low.s
/tm =/s/0/1/p
w
q
e conf.c
/tm/s/\/\*//
s/\*\///
w
q

Unfortunately this is not enough, if you just rebuild the system like this, it won't boot, and goes into an infinite loop. I didn't dive into the boot process deep enough to figure out why exactly, but the memo linked from the mini-unix page says in passing

A minimum system has room for 6 or 7 system buffers. As new drivers are added to the system, the number of system buffers must be decreased if the system size is maintained at 12K words.

Reducing the number of buffers by one fixed the problem with the booting, so I assume it's some memory layout problem, where loading into some buffer overwrites kernel code or something similar.

A bit of sleuthing finds that the number of buffers is set in param.h, so let's reduce it from 6 to 5:

chdir /usr/sys/mxsys
e param.h
/NBUF/
s/6/5/
w
q

Then param.h looks like

# cat param.h
/*
 * tunable variables
 */

#define NBUF    5       /* size of buffer cache */
#define NINODE  50      /* number of in core inodes */
#define NFILE   50      /* number of in core file structures */
#define NMOUNT  2       /* number of mountable file systems */
#define SSIZE   20      /* initial stack size (*64 bytes) */
#define NOFILE  15      /* max open files per process */
#define CANBSIZ 256     /* max size of typewriter line */
#define NCALL   4       /* max simultaneous time callouts */
#define NPROC   13      /* max number of processes */
#define NCLIST  100     /* max total clist size */
#define HZ  60          /* Ticks/second of the clock */
...

Now we rebuild the kernel as newmx:

rm /newmx
chdir /usr/sys/mxsys
sh shs
chdir ../dev
sh shs
chdir ..
sh shld
mv a.out /newmx
ls -l /*mx
sync

The major number of the tape driver is the index in conf.c, so RK is 0, and TM is 1.

If everything worked, use Ctrl E to get back to SIMH, quit, and restart and reboot:

$ simh-pdp11 pdp11.ini 

PDP-11 simulator V3.9-0
Disabling CR
Disabling XQ
@newmx

RESTRICTED RIGHTS

USE, DUPLICATION OR DISCLOSURE IS SUBJECT TO
RESTRICTIONS STATED IN YOUR CONTRACT WITH
WESTERN ELECTRIC COMPANY, INC.


;login: root
# /etc/mknod /dev/mt0 b 1 0
# dd if=/dev/mt0 of=/dev/rk1 count=4000 skip=4100
# dd if=/dev/mt0 of=/dev/rk2 count=4000 skip=8100

The count for the second disk (documentation) is a guess, I haven't verified that everything is actually readable, potentially one needs to increase this if needed.

Then you can mount the disks as in Method one.

1
  • 1
    In Mini-Unix, the total kernel size, including the buffer cache, must remain below TOPSYS, which is set to 12*2048 by default. Memory above this limit is effectively user space. Adding the tape driver likely pushed the kernel size beyond this limit, causing erratic behavior. Somewhat tangentially, I ran into this problem recently when adding a new syscall to the Mini-Unix kernel for a hobby project. To make room for my code I developed a scheme to move kernel init code above TOPSYS as a way to eliminate effectively dead code in the running kernel. Commented Feb 3 at 20:27

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.