Installing 2.9 BSD on SIMH

From Computer History Wiki
Jump to: navigation, search

This is my quick guide to installing 2.9 BSD on SIMH.

(The details of what is actually happening are almost identical to the standard installation of Unix Seventh Edition; see Installing Unix Seventh Edition for an explanation of how that works.)

first my ini file:

set cpu 11/70
set cpu 2M
set cpu fpp
set cpu nocis
show cpu
;set cpu idle
set tti 7b
set tto 7b
set rl0 rl02
set rl1 rl02
set rl2 dis
set rl3 dis
att rl0 2.9BSD-root.rl02
att rl1 swap.rl02
set rk dis
set hk dis
set rq dis
set tq dis
set xq dis
set rx dis
set cr dis
set rha dis
set ptp dis
set ptr dis
set pclk ena
set rp0 rm05
att rp0 test.disk
att tm0 2.9BSD.tap
set dz lines=8
set dz 7b
att dz -m 4429

This is probably a little extreme, but it does work.

You'll also need a tape image, with the files found on the TUHS archive. Alternatively I have a pre-made tape on sourceforge.


First thing boot off the magnetic tape with a 'boot tm0' from inside SIMH. I ran the 'cat' program to verify the tape is working.

CPU, 11/44, FPP, NOCIS, idle disabled, autoconfiguration enabled, 1024KB

70Boot
: tm(0,1)
cat
File: tm(0,2)
Contents of this tape:

File 0:
        2 copies of magtape bootstrap (2 blocks total)
        The standalone bootstrap
File 1:
        A file to console copy program
File 2:
        This file
File 3:
        The program mkfs
File 4:
        The program restor
File 5:
        The program icheck
File 6:
        A dump of the root file system
File 7:
        A tar format dump of the /usr filesystem
        (extract with: "cd /usr; tar xpf /dev/rmtX", where X is 0 or 1)
Exit called

Next we make the root filesystem

70Boot
: tm(0,3)
Mkfs
file system: rl(0,0)
file sys size: 8500
interleaving factor (m; 5 default): 5
interleaving modulus (n; 10 default): 10
isize = 5440
m/n = 5 10
Exit called


Now to restore the root dump onto the root disk

70Boot
: tm(0,4)
Restor
Tape? tm(0,6)
Disk? rl(0,0)
Last chance before scribbling on disk.
End of tape

As per the instructions suggestion, check the root disk's integrity.

70Boot
: tm(0,5)
Icheck
File: rl(0,0)
rl(0,0):
files 238 (r=145,d=10,b=27,c=56,q=0,l=0)
used 1917 (i=94,ii=0,iii=0,d=1823)
free 6241
missing 0

Now we can boot 2.9BSD

70Boot
: rl(0,0)rlunix

Berkeley UNIX (Rev. 2.9.1) Sun Nov 20 14:55:50 PST 1983
mem = 930496

CONFIGURE SYSTEM:
xp 0 csr 176700 vector 254 attached
rk 0 csr 177400 vector 220 attached
hk 0 csr 177440 vector 210 attached
rl 0 csr 174400 vector 160 attached
rp ? csr 176700 vector 254 interrupt vector already in use
ht 0 csr 172440 vector 224 skipped:  No CSR
tm 0 csr 172520 vector 224 attached
ts 0 csr 172520 vector 224 interrupt vector already in use
dh ? csr 160020 vector 370 skipped:  No CSR
dm ? csr 170500 vector 360 skipped:  No autoconfig routines
dz ? csr 160110 vector 320 interrupt vector wrong
dz ? csr 160110 vector 320 interrupt vector wrong
dn 0 csr 175200 vector 300 skipped:  No autoconfig routines
vp ? csr 177500 vector 174 skipped:  No autoconfig routines
lp 0 csr 177514 vector 200 attached
Erase=^?, kill=^U, intr=^C
# 
# cd /mdec
# dd if=rluboot of=/dev/rl0 count=1
0+1 records in
0+1 records out


# fsck /dev/rl0

/dev/rl0
File System: /

** Checking /dev/rl0
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Free List
238 files 1916 blocks 6242 free
#


# cat > /etc/fstab
/dev/rl0:/:rw:7:1
^D


cd /dev
sh MAKE mt0


# df
Filesystem  Mounted on  kbytes    used    free  % used
/dev/rl0    /             8158    1916    6242     23%

Format our xp disk

mkfs /dev/xp0h 248000

mount and restore the usr part of the tape. This takes a LONG LONG time.

mount /dev/xp0h /usr
cd /usr
mt -t /dev/nrmt0 fsf 7
tar xpfv /dev/rmt0
cd /dev
mknod swap b 8 1

cat > /etc/fstab
/dev/rl0:/:rw:7:1
/dev/xp0h:/usr:rw:7:2
/dev/rl1:swap:sw:0::0


By default the auto-configuration listens to the wrong port for the DZ serial interface, and I decided to turn off devices I'm not using. This is important if you want to use the tty's

cat > /etc/dtab
#               Device Configuration Table
#       Clock and console are pre-configured and should not be listed here
#
# Dev#  Addr    Vector  Br      Handler(s)      ; Comment
xp ?    176700  254     5       xpio            ; SMD disk (RP04/5/6, RM)
#rk ?    177400  220     5       rkio            ; RK05
#hk ?    177440  210     5       hkio            ; RK06/7
rl ?    174400  160     5       rlio            ; RL01/02
#rp ?    176700  254     5       rpio            ; RP03

#ht 0    172440  224     5       htio            ; TM03/TE16, etc.
tm 0    172520  224     5       tmio            ; TM-11
#ts 0    172520  224     5       tsio            ; TS-11

#dh ?    160020  370     5       dhin    dhou    ; DH11 terminal mux
#dm ?    170500  360     4       dmin            ; DM-11 BB DH Modem Control
dz ?    160100  300     5       dzin    dzdma   ; DZ11 terminal mux
#dz ?    160110  320     5       dzin    dzou    ; DZ11 if pseudo-DMA not enabled


#dn 0    175200  300     5       dnou            ; DN-11 dialer
# kl 1  176500  300     5       klin    klou    ; DL-11

#vp ?    177500  174     4       vpio            ; Versatec; should be before lp
lp ?    177514  200     4       lpio            ; LP-11 line printer

By default it detected my putty as a CP/M adm3a terminal which wasn't even close to correct. 2.9BSD doesn't have definitions for the vt220 (it probably didn't exist yet).

cat > /etc/ttytype
ansi tty00
ansi tty01
ansi tty02
ansi tty03
ansi tty04
ansi tty05
ansi tty06
ansi tty07