After a heroic effort, the oldest machine-readable copy of Unix version 2 is running again.
The recovered code runs on a PDP-11 simulator and contains a version of Unix that's later than V1 from 1972, but doesn't contain V2 API calls; a sort of Unix V2 beta.
For such a famous bit of code, the early history of the Unix project is surprisingly obscure, and copies of most versions of the actual software itself were lost half a century or so ago. Now, via some remarkable salvage work, the oldest known machine-readable copy of Unix, from Dennis Ritchie's own backup tapes, over half a century old, has been coaxed back into life.
Code archaeologist Yufeng Gao reports:
I've managed to get a working system out of them.
[…]
The s1 kernel is, to date, the earliest machine-readable UNIX kernel, sitting between V1 and V2.
[…]
Since it aligns with V1 in terms of syscalls, has the V2 core size and can run V2 binaries, I consider it a "V2 beta".
What we're talking about here is something intermediate between Unix First Edition and Unix Second Edition. These were the first versions to run on the DEC PDP-11. That's the second machine that Unix ran on – a 16-bit DEC minicomputer, similar to the one Dave Plummer rebuilt last year.
Unix was originally written in 1969 for a very different minicomputer, the DEC PDP-7, an older, slower, much more limited machine from DEC's 18-bit range [PDF]. Unix didn't even have a version number yet, so it's known as version zero. PDP-7 Unix was thought to be lost forever. In 2015, some printouts were found. You can see a page in The Reg's news story from the time. In 2019, some more was rediscovered. These yellowed old paper documents were then scanned, the scans put through optical character recognition, and from the result, volunteers reconstructed the assembly language code and built it. Today, you can peruse the source code of Unix version zero on GitHub too.
Running PDP-7 Unix
Back in 2019, the Living Computer Museum helped get a PDP-7 working and boot the reconstructed Unix version 0 on it. Sadly, by then, founder Paul Allen had already passed away. The link above is to a copy on the Internet Archive because Allen's executor, his sister Jody, closed the museum down and sold off the collection.
Programmer-archaeologist par excellence Warren Toomey founded the Unix Heritage Society to document – and, where possible, reconstruct – the history of Unix. For instance, thanks to TUHS, you can read about the history of the creation of PDP-7 Unix.
- Agent P waxes lyrical about 14 years of systemd
- Absolute Linux has reached the end – where to next?
- Haiku Beta 5 / In tests it's (Fire)foxier / It pleases us well
- How the OS/2 flop went on to shape modern software
These very early versions of Unix predate the development of the C programming language. They were hand-coded in assembly language. The late great Dennis Ritchie, co-creator of Unix and C, referred to these early versions found on some of his oldest backup tapes as Primeval C. Back in 2001, The Reg wrote about the recovery of the first C compiler, and 12 years later that it could be found on GitHub. TUHS grew out of the PDP Unix Preservation Society, which The Reg mentioned when discussing that first C compiler.
Back in 2009, Toomey wrote about the efforts to decipher four of Ritchie's backup tapes [PDF]. Ritchie noted that reconstructing much from these ancient, fragmentary, and undocumented backups was hard; Toomey goes into more detail. Well, it turns out that there were binaries on them too – and enough of those binaries could be found to reassemble a bootable OS.
At first, Gao could only get the restored OS to boot on one specific PDP-11 emulator, built by Angelo "aap" Papenhoff, who commented: "This is very exciting news! I have to say I'm a bit surprised my emulator of all things can run it. It's not terribly flexible and doesn't have a lot of features."
Subsequently, he got it working on the more feature-complete SimH simulator. The software and disk images are available on GitHub. ®