UNIX Sixth Edition on RL01

This is a guide to migrating an existing v6 installation on RK05 to an RL01 drive.

Since v6 comes without an RL driver, we have to get it elsewhere. Luckily there is one available from this page. Get the bootable image, it has an rl.c, a patched mkconf.c and an rluboot binary.

Our plan is as follows:

We'll use the following SIMH configuration:

set cpu 11/45
att rk0 disk.rk
set rl0 rl02
att rl0 v6rl02.dsk
set rl1 rl01
att rl1 disk.rl01
att tm0 dump.tap
d sr 1
b rl0

Boot the kernel rlunix.

First we have to create the necessary device files:

# /etc/mknod /dev/rl0 b 8 0
# /etc/mknod /dev/rl1 b 8 1

The file system will be 9000 blocks large, the RL01 apparently has 10240 512-byte blocks, we'll use some of that for swap:

# /etc/mkfs /dev/rl1 9000
isize = 173

Mount the RK disk and copy the RL-related files:

# /etc/mount /dev/rk0 /mnt
# chdir /usr/sys
# cp conf/mkconf.c /mnt/usr/sys/conf
# cp dmr/rl.c /mnt/usr/sys/dmr
# cp /usr/mdec/rluboot /mnt/usr/mdec

Now build the new kernel (the minimum is rl, but more drivers are nice):

# chdir /mnt/usr/sys/conf
# cc mkconf.c
# mv a.out mkconf
# mkconf

Now we have to edit the generated c.c since it assumes a (larger) RL02 (you can also edit mkconf.c to generate a configuration for RL01, I won't bother). Since our file system is 9000 blocks large, swap will begin thereafter:

# ed c.c
int     swplo   19000;  /* cannot be zero */

Now compile the whole thing:

# cc -c c.c
# as l.s
# mv a.out l.o
# as m40.s
# mv a.out m40.o
# chdir ../dmr
# cc -c -O rl.c
# ar uv ../lib2 rl.o
# ld -x l.o m40.o c.o ../lib1 ../lib2
# mv a.out /mnt/rlunix

Now dump the RK disk to tape and restore to the RL01 disk:

# dump 0u /dev/rk0
incremental dump from
the epoch
387 files
3598 blocks
0.1 tapes
0 phase errors
date updated
Fri Oct 10 13:08:06 1975
# restor r /dev/rl1
last chance before scribbling on /dev/rl1


Write the boot sector:

# dd if=/usr/mdec/rluboot of=/dev/rl1 count=1
0+1 records in
0+1 records out

Stop the emulator and reboot with this configuration:

set cpu 11/34
set rl0 rl01
att rl0 disk.rl01
d sr 1
b rl0

Boot the newly created rlunix kernel. If it works you can rename it to unix.

And that's all.