Installing 2.11BSD: Kernel setup

Parent Category: How-to's Category: 2.11BSD Unix on PDP-11/44 Written by Administrator

Now the complete filesystem and a generic kernel is on the bad-sector perforated RM03 drive (meaning: Fujitsu MK2312 under Emulex SC31).

Next is to compile the kernel to get driver support for all PDP-11/44 device. This is done on the real PDP-11/44. It would be much faster and much less energy consuming if still done under SimH, but it is time to remember why we do all this!

While the previous steps only have to be executed once (until the disk crashes), rebuilding the kernel will be necessary everytime a new hardware is plugged int to the 11/44’s card cage.


  • Copy necessary files
    If you’ve installed the whole /usr file system, everything is fine. On the tiny RL02 disk, only the minimal file set can be read in from tape, this has been done here.
  • Have the documentation file “2.11bsd_setup.pdf” at hands.
  • Use kermit95 as terminal emulator, set it to
    set terminal width 132
    set terminal output-pacing 10
    This prevents Kermit from “typing too fast”. The console terminal on the 11/44 is managed by an console processor, an 8085. Apparently it is not constructed for receiving data with max transmission speed ... they only had manual typing in mind when they designed it.
  • Boot up the preliminary 2.11BSD installation on your PDP-11

Step 1: Generate a kernel configuration file „SYSTEM“

In the kernel configuration file, you set up devices and options for your kernel. It is one of the files in /usr/src/sys/conf. Most important setting will be the lines

INET    YES     # TCP/IP
NETHER1        # ether pseudo-device

but you will also make sure you have device drivers for all of your hardware.

I found also this to be important:


You can have many configurations, here it is called “SYSTEM”.

First you will transfer the file GENERIC to your PC for later editing:

# cd /usr/src/sys/conf

Fetch the text from your terminal emulator's screen buffer, save it as “SYSTEM”. Be sure to convert Spaces to TABs to separate the name/value pairs!

Edit the text file SYSTEM, transfer it over terminal emulator back to SimH.

# cd /usr/src/sys/conf
# cat >SYSTEM

(send file with terminal emulator, hit ^D)

Step 2: generate the configuration directory

The new kernel is build in its own directory. To generate it, type:

# mv /sys/SYSTEM /sys/SYSTEM.old
# cd /usr/src/sys/conf
# ./config SYSTEM
# cd /sys/SYSTEM

Make sure “/sys/SYSTEM” is cleared before making the config!

Step 3: Adjusting kernel overlays sizes and “make”

Execute “make” the first time, to generate all *.o files:

# make

This will compile the whole kernel from C-source files and is quite impressive. But it will fail!

Remember: PDP-11 is a 16-bit machine with an address space of 64 kBytes. To let bigger programs run (as the 2.11BSD kernel ...), the memory managment unit is used: the lower 48kb are static and contain often used code. The upper 8k of the address space are variable: On demand one of several 8kb “overlay” pages is paged in. The standard linker generates switching code and code to set the MMU registers if a procedure from an overlay is called.

The overlays are defined in “Makefile”, you must re-arrange them. Packing a set of variable-sized object files (*.o) into fixed sized overlay pages is non-trivial: it is a “packing problem”. Luckily, we don’t need an optimal solution. This excellent document explains overlays and what to do.

I wrote an application that automatically corrects the 2.11BSD Makefile: BSD211MakeFileSizer.exe, see attachement below.


It is very easy too use:

  1. Copy&Paste the output of “cat Makefile” into memo #1.
  2. Copy&Paste the output from “size *.o” into memo #2
  3. A new Makefile with prefixed “cat >Makefile” appears in memo #3.
    Copy&Paste it into your Kermit terminal emulator.

You now have a better packed Makefile. “make” again and lean back.

Step 4: Installing the new kernel

The kernel must sit at / and should be called “unix”.

# cp /unix /oldunix
# make install
install -c -o root -g kmem -m 744 unix /unix
install -c -o root -g kmem -m 744 netnix /netnix
# sync
# halt
: xp(0,0,0)unix
Boot: bootdev=05000 bootcsr=0176700

2.11 BSD UNIX #3: Fri Jun 9 04:13:24 PDT 1995
This email address is being protected from spambots. You need JavaScript enabled to view it.:/usr/src/sys/SYSTEM


You can verify from the boot up message that you really booted the new “SYSTEM” kernel.

If booting the new kernel fails, you can always boot from the good old kernel by giving its backup name “oldunix” at the boot loader prompt:

This email address is being protected from spambots. You need JavaScript enabled to view it.:/usr/src/sys/GENERIC

Step 5: device nodes

We need device nodes for the current kernel.

cd /dev
./MAKEDEV std local hk0 hk1 ra0 ra1 ra2 ra3 mt0 mt1 nmt0 nmt1 xp0 xp1 rl0 rl1 pty0 dz0 lp0

A node for the network card is not needed. “dz0” is for a DZ11 serial multiplexer, tty00. .tty07 are generated for the 8 channels.

Step 6: watch “/etc/dtab”

For all devices, check ”/etc/dtab” for correct address/vector/bus request level settings.

Step 7: “coremap: overflow” ?

If messages like

vmunix: coremap: overflow, lost nn  clicks at yyyyyy 

appear, “coremap” is too small. This an internal map for MALLOC allocation. Look into param.c and enhance it somehow. There’s little room to try, as memory is almost exhausted. I trimmed MAXUSER to 8 and enlarged corempa this way.

Expect other memory areas also to overflow, trim and recompile the kernel ...

Download this file ([ ]380 kB