4.1c BSD

It’s been a long while since I’ve posted anything VAX BSD related.  So I found this ISO image a while back that had all these old versions of BSD on them, but sadly many of them are incomplete, missing parts, and give really no clue on how to use them.  There is even some duplication thrown in there just to complicate things further.  So I figured I’d try one of them, an interim release of 4 BSD and see if I could just overlay a newer release version and see what I get…

VAX780 simulator V3.8-1
Listening on port 23 (socket 156)
loading ra(0,0)boot
Boot
: ra(0,0)vmunix
215688+63964+69764 start 0xf98
4.1c BSD UNIX #2: Tue Aug 28 09:39:12 PDT 1984
real mem  = 8384512
avail mem = 7036928
using 148 buffers containing 838656 bytes of memory
mcr0 at tr1
mcr1 at tr2
uba0 at tr3
hk0 at uba0 csr 177440 vec 210, ipl 15
rk0 at hk0 slave 0
rk1 at hk0 slave 1
uda0 at uba0 csr 172150 vec 774, ipl 15
ra0 at uda0 slave 0
ra1 at uda0 slave 1
zs0 at uba0 csr 172520 vec 224, ipl 15
ts0 at zs0 slave 0
dz0 at uba0 csr 160100 vec 300, ipl 15
mba0 at tr8
root on ra0
WARNING: should run interleaved swap with >= 2Mb
Automatic reboot in progress...
Tue Aug 28 09:54:53 PDT 1984
/dev/rra0a: 836 files, 6010 used, 1419 free (35 frags, 173 blocks)
/dev/rra0h: 6598 files, 41780 used, 320080 free (160 frags, 79980 blocks)
Tue Aug 28 09:54:58 PDT 1984
local daemons: telnetd ftpd tftpd syslog sendmail.
preserving editor files
clearing /tmp
standard daemons: update cron accounting berknet mail printer.
starting network: rshd rexecd rlogind rwhod routed.
Tue Aug 28 09:55:00 PDT 1984

ucbmonet login: root
Last login: Tue Aug 28 09:44:44 on tty00
4.1c BSD UNIX #2: Tue Aug 28 09:39:12 PDT 1984
Master source now lives here; freeze your 4.1c stuff now.
As far as the laws of mathematics refer to reality, they are not
certain; and as far as they are certain, they do not refer to reality.
                -- Albert Einstein
monet#

Pretty cool.  And oddly enough googling around doesn’t seem to find much about people running 4.1c BSD, but it is significant with the first version of sendmail being bundled, and rogue.

The release also includes TCP/IP support but I haven’t the slightest idea how to use it.  I suppose reading the instructions is key.  But I thought I’d share this little fossil first.

For those who want to try it, you can download it here.  It’s using SIMH, so if you aren’t running Windows, bring your own VAX 11/780 and you’ll be good to go.

24 thoughts on “4.1c BSD

    • From what I can gather, 4.1a included the BBN stack which is why it isn’t on there…

      This pretty much sums it up:

      # ls
      .MAP TAPE doc games ingres lib src
      # ls src
      .MAP cmd games
      # ls src/cmd
      .MAP berknet fed learn oldcsh vpr
      # ls src/games
      .MAP banner.c compat hangman.c rain wump.c
      aard bcd.c cribbage mille rain.c zork.c
      adventure boggle ddl monop snake
      arithmetic.c canfield.c doctor mpu worm.c
      backgammon chess.c fish.c number.c worms
      backgammon.c ching fortune quiz.c worms.c

      I’d assume the BBN stuff isn’t BSD licensed.. I suppose this was another reason behind BSD Sockets … It’d be cool to get tapes from the era, or even SYSVr2 or something but that seems … so unlikely.

  1. First I was trying to see if it is possible to back-port SunOS 3.4 to VAX since there is a lot of abandoned-in-place VAX code. I’m still working on it from time to time. So I started in a world with “wow, look at all the VAX code in SunOS” and then discovered the other side of the mirror, 4.1cBSD is full of Sun code that was removed in 4.2BSD. Analysis of BSD SCCS shows that Bill Joy had two different account names, “bill” and wnj. If you add up the count of the BSD SCCS commits from both accounts, you get 1536 (wnj) + 911 (bill) = 2447 compared to bostic’s 18203 and mckusick’s 11687 commits. This can be explained if Joy’s SCCS commits with Sun code were expunged. I’m guessing the code was expunged because it was deemed proprietary to SMI. That leads me to wonder if 4.1c can run on a Sun-2.

    • Wow now that is interesting!

      There is also that 4.3BSD UWisc that I think incorporated some SUN stuff but I think it was all public by then?

      It would be interesting to see how far you could go with 4.1c as well!

      • Now I found out that 4.1c source code is full of #ifdef sun and there is mc68010 code inside those ifdefs. The SCCS files show “merge sun” and “purge sun #ifdef’s” in the delta commentary (“log messages”). There is also DECNET source code in a directory named “sys/netdecnet”. There are two USENET posts that you can see on Google Groups where the writer is asking “where’s my decnet in 4.2 BSD like it was in 4.1c?” The VAX was used to bootstrap early SunOS by cross compiling 4.1c BSD into mc68010 code.

      • Unlike most version numbers that increment as time passes, 4.1c.2 has newer contents than 4.1c.1.

        Since the rootfs is so small it is very likely that /a is a mountpoint for a second disk, see /etc/passwd for /a/guest/* “home” directories.

        I transfered the 4.1c.1 source code into the disk image in ‘4.1c BSD.7z’. While compiling (cd /usr/src; make) there were a lot of strange crashes. As it might be kernel bugs, I decided to try the newer kernel from 4.1c.1 but the partition sizes in uda.c had changed, apparently for two reasons. First the swap space and /usr were enlarged. Second the partitions are no longer aligned on block boundaries, instead they are aligned on cylinder boundaries. I think that causes a gap between A and B (possibly other gaps too). There is no sample fstab in 4.1c.1 but 4.2/etc/fstab.ra81 and 4.2/usr/src/sys/dist/fstab.ra81 both still have /usr on H.

        I think the most sensible thing to do is to migrate by creating a RP06 disk and copy everything to that then boot from the new kernel as the partition sizes did not change, even in 4.2 they are the same.

      • Oops, I should have wrote:

        I transfered the 4.1c.2 source code into the disk image in ‘4.1c BSD.7z’. While compiling (cd /usr/src; make) there were a lot of strange crashes. As it might be kernel bugs, I decided to try the newer kernel from 4.1c.2

        Darn those backward version numbers. 🙂

    • Every time I think I got it all figured out, another idea…

      I think they deliberately left the A partition (root file system) the same size (even though that causes a gap between the A and B partitions) so you can backup /usr to tape with tar, move the new kernel into place and boot from it, mkfs the H partition (/usr) wiping it while setting the correct file system size, and then restore the tar of /usr.

  2. Three things:

    1. I goofed about which came first. 4.1c.1 is older than 4.1c.2

    2. The only “tape” on the CSRG ISO with DECNET is 4.1c.1 but it might not be the best version as newer DECNET could be in SCCS, I haven’t checked yet.

    3. The “#if sun” (proto-SunOS) code is really in SCCS except for the stray “files.sun” and one header file.

  3. The “SunOS in BSD” “smoking gun” commit message:

    subr_prf.c

    D 4.23 82/10/31 00:26:35 root 29 28 00016/00001/00239
    MRs:
    COMMENTS:
    first version with 68k stuff

  4. Although I never found a working copy of SunOS in BSD, here are my findings:

    1. Sun Microsystems supposedly had a VAX-11/750. Monet was a VAX-11/750. Was Monet really Sun’s VAX? A VAX-11/750 is sizeable chunk of change, especially one that you would only use for a short while to bootstrap SunOS on.

    2. It’s clear from the residue that BSD had Sun code. Some breadcrumbs are that SCCS like RCS operates on individual files, unlike Concurrent Version System (CVS), Subversion (SVN), git and so on which can operate on groups of files. This makes it possible to expunge files and directories. If there was a hypothetical /sys/sundev directory on a VAX at UCB it would be possible to “rm -r” it along with the SCCS version control for all the files in that directory. Code like “#if sun” and “#include ” in files that contain code that cannot be expunged will still be visible in the SCCS and backup tapes, etc. The `files.sun` file is probably due to an oversight causing it to not be removed along with other files until it was discovered later. The sun code was removed by the time of 4.2BSD release. Some traces of it still exist in SCCS and old backup tapes, but that code is effectively stubbed out due to parts that it refers to not being recovered as of yet.

    3. The missing 4.1b BSD could be missing because it was full of SunOS code.

  5. 4.1c.1 has kernel source under sys/ while 4.1c.2 under a/ for instance
    with CSRG ISO #1 mounted on /a/1 you get:

    $ cd /a/1
    $ ls -dl 4.1c.1/a
    ls: cannot access ‘4.1c.1/a’: No such file or directory
    $ ls -ld 4.1c.1/sys
    drwxrwxr-x 21 root root 4096 Aug 11 1992 4.1c.1/sys
    $ ls -dl 4.1c.2/a
    drwxrwxrwx 3 root root 2048 Feb 27 1993 4.1c.2/a

    4.1c.1 has kernel source is more recent than 4.1c.2, for instance

    $ head -n 1 4.1c.1/sys/sys/init_main.c
    /* init_main.c 4.49 83/04/04 */
    $ head -n 1 4.1c.2/a/sys/sys/init_main.c
    /* init_main.c 4.47 83/03/01 */

    User programs (“userland”) version are the other way around, for instance
    4.1c.2 usr/bin/date.c is newer than 4.1c.1 bin/date.c

    $ head -n 2 4.1c.1/bin/date.c | tail -n +2
    static char *sccsid = “@(#)date.c 4.2 (Berkeley) 2/26/83”;

    $ head -n 2 4.1c.2/usr/src/bin/date.c | tail -n +2
    static char *sccsid = “@(#)date.c 4.3 (Berkeley) 2/28/83”;

Leave a Reply to anonickey mouse Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.