1972 Unix V2 \“ beta \”复活
1972 Unix V2 \"Beta\" Resurrected

原始链接: https://www.tuhs.org/pipermail/tuhs/2025-February/031420.html

Yufeng Gao从DMR磁带(S1/S2)中复活了UNIX的“ V2 Beta”版本,并将其按时间顺序放置在V1和V2之间。 S1胶带包含内核,而S2保存分发文件。此“ V2 Beta”内核支持V1和V2 A.Out二进制文件,并且比原始的Unix-Jun72内核具有更大的16KB核心尺寸,但其SYSCALL表与V1相匹配。 由于AAP的PDP-11/20仿真器是唯一可以引导内核的环境,因此S1/S2磁带的安装具有挑战性,但不支持TC11。 Yufeng的解决方法是在SIMH中暂时安装UNIX-JUN72内核,然后使用十六进制编辑器将其替换为S1内核。现在可下载的可产生的可启动RF磁盘图像,该图像包含仅来自S1/S2的文件。

该线程讨论了适合集中,离网开发的编程项目,从Unix和Git等项目背后的清洁愿景中汲取灵感。嵌入式系统开发,游戏编程/改装和低级项目被认为是潜在的途径。 对话涉及Unix的历史背景,强调了其创作者的经验和隐性知识。讨论进入编译器和口译员之间的重叠,突出了编译器如何执行解释和解释者的编译。探索了编程语言实施理论的各个方面,包括AOT/JIT编译,对象内部和内存管理。 最后,讨论了对SMTP等协议设计的历史影响主题,并指出了Tops-20和早期Arpanet等系统的遗产。终端仿真的复杂性(例如VT240)得到了认可。

原文
[TUHS] 1972 UNIX V2 "Beta" Resurrected Yufeng Gao via TUHS tuhs at tuhs.org
Tue Feb 18 19:31:55 AEST 2025
Hi everyone,

First-time poster here. Near the end of last year, I did some forensic analysis on the DMR tapes (https://www.tuhs.org/Archive/Applications/Dennis_Tapes) and had some fun playing around with them. Warren forwarded a few of my emails to this list at the end of last year and the beginning of this year, but it was never my intention for him to be my messenger, so I'm posting here myself now.

Here's an update on my work with the s1/s2 tapes - I've managed to get a working system out of them. The s1 tape is a UNIX INIT DECtape containing the kernel, while s2 includes most of the distribution files.

The s1 kernel is, to date, the earliest machine-readable UNIX kernel, sitting between V1 and V2. It differs from the unix-jun72 kernel in the following ways:

- It supports both V1 and V2 a.outs out of the box, whereas the unmodified unix-jun72 kernel supports only V1.
- The core size has been increased to 16 KiB (8K words), while the unmodified unix-jun72 kernel has an 8 KiB (4K word) user core.

On the other hand, its syscall table matches that of V1 and the unix-jun72 kernel, lacking all V2 syscalls. 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".

login: root
root
# ls -la
total   42
 41 sdrwrw  7 root     80 Jan  1 00:02:02 .
 41 sdrwrw  7 root     80 Jan  1 00:02:02 ..
 43 sdrwrw  2 root    620 Jan  1 00:01:30 bin
147 l-rwrw  1 root  16448 Jan  1 00:33:51 core
 42 sdrwrw  2 root    250 Jan  1 00:01:51 dev
 49 sdrwrw  2 root    110 Jan  1 00:01:55 etc
 54 sdrwrw  2 root     50 Jan  1 00:00:52 tmp
 55 sdrwrw  7 root     80 Jan  1 00:00:52 usr
# ls -la usr
total    8
 55 sdrwrw  7 root     80 Jan  1 00:00:52 .
 41 sdrwrw  7 root     80 Jan  1 00:02:02 ..
 56 sdrwrw  2  28      60 Jan  1 00:02:22 fort
 57 sdrwrw  2 jack     50 Jan  1 00:02:39 jack
 58 sdrwrw  2   6      30 Jan  1 00:02:36 ken
 59 sdrwrw  2 root    120 Jan  1 00:00:52 lib
 60 sdrwrw  2 sys      50 Jan  1 00:02:45 sys
142 s-rwrw  1 jack     54 Jan  1 00:52:29 x
# ed
a
main() printf("hello world!\n");
.
w hello.c
33
q
# cc hello.c
I
II
# ls -l a.out
total    3
153 sxrwrw  1 root   1328 Jan  1 00:02:12 a.out
# a.out
hello world!
#

It's somewhat picky about the environment. So far, aap's PDP-11/20 emulator (https://github.com/aap/pdp11) is the only one capable of booting the kernel. SIMH and Ersatz-11 both hang before reaching the login prompt. This makes installation from the s1/s2 tapes difficult, as aap's emulator does not support the TC11. The intended installation process involves booting from s1 and restoring files from s2.

What I did was I extracted the files from the s1 tape and placed them on an empty RF disk, then installed the unix-jun72 kernel. After booting from the RF under SIMH, I extracted the remaining files from s2. Finally, I replaced the unix-jun72 kernel with the s1 kernel using a hex editor, resulting in an RF disk image containing only files from s1/s2. This RF image is bootable under aap's emulator but not SIMH.

The RF disk image can be downloaded from here (https://github.com/TheBrokenPipe/Research-UNIX-V2-Beta):
Direct link - https://github.com/TheBrokenPipe/Research-UNIX-V2-Beta/raw/refs/heads/main/s1s2unix_rf.img

Interestingly, its init(7) program does not mount the RK to /usr, suggesting that /usr was stored on the RF.

Sincerely,
Yufeng


More information about the TUHS mailing list
联系我们 contact @ memedata.com