* [TUHS] Re: 1972 UNIX V2 "Beta" Resurrected
@ 2025-05-27 17:17 Thalia Archibald via TUHS
0 siblings, 0 replies; 6+ messages in thread
From: Thalia Archibald via TUHS @ 2025-05-27 17:17 UTC (permalink / raw)
To: tuhs
Yufeng Gao wrote:
> The s1 tape is a UNIX INIT DECtape containing the kernel, while s2 includes
> most of the distribution files.
[https://www.tuhs.org/pipermail/tuhs/2025-February/031420.html]
Hello Yufeng,
Do you have more details on the format of the s1 tape? I want to reproduce your
work.
The s2 tape is in the tap format, which was easy to decode, and I assumed that
s1 was similar, just with its file headers on an earlier tape. I’ve been able to
fairly accurately segment s1 into files by observing that blocks duplicate the
tail of the previous block when they are not a full 512 bytes. I’ve written a
tool for this and have segmented all the text files and some of the binaries,
but I’m floundering on the rest. What you say seems to suggest that s1 actually
does have file metadata.
Thalia
^ permalink raw reply [flat|nested] 6+ messages in thread
* [TUHS] Re: 1972 UNIX V2 "Beta" Resurrected
2025-02-18 17:06 ` segaloco via TUHS
@ 2025-02-20 4:58 ` Yufeng Gao via TUHS
0 siblings, 0 replies; 6+ messages in thread
From: Yufeng Gao via TUHS @ 2025-02-20 4:58 UTC (permalink / raw)
To: tuhs
Hi,
So I've tested SIMH again with my reconstructed RF disk image, and this time it worked. I must have used the s1 kernel and the unix-june72 init(7) when I previously tested it, my bad.
sim> dep system sr 173700
sim> go 173700
: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
#
It's great that it works under SIMH... However, this still does not help with installing this version of UNIX the intended way. The intended way is to boot from the s1 tape, which would load the cold kernel, initialise the RF, and provide you with a minimal set of tools so that you could use tap(1) to restore the distribution from the s2 tape. The showstopper here is the s1 tape - it is missing /etc/passwd, so you will not be able to login when booted from s1.
sim> dep system sr 1
sim> boot tc0
HALT instruction, PC: 000414 (JSR R0,10762)
sim> c
:login: root
root
Can't open password file
:login:
Since you can't login, there's not much you can do :(. For now, my hand-rolled RF disk image is the only way to get a working copy. My SIMH config file:
set cr disabled
set xq disabled
set rk disabled
set hk disabled
set rha disabled
set tm disabled
set rx disabled
set rl disabled
set tq disabled
set dci disabled
set cpu 11/20
set cpu 32K
set ke enabled
set rf 2p
set rf enabled
att rf s1s2unix_rf.img <-- RF disk image
set tc enabled
set tc locked
att tc s1.itp <-- s1 tape
load m792low.load <-- Modified UNIX ROM from unix-june72 project
dep system sr 173700
go 73700 <-- Low address used by the modded ROM
P.S. This kernel is unmodded, which means it supports only LF, not CR, so use ^J for ENTER.
Sincerely,
Yufeng
^ permalink raw reply [flat|nested] 6+ messages in thread
* [TUHS] Re: 1972 UNIX V2 "Beta" Resurrected
2025-02-18 16:36 ` Yufeng Gao via TUHS
@ 2025-02-18 17:06 ` segaloco via TUHS
2025-02-20 4:58 ` Yufeng Gao via TUHS
0 siblings, 1 reply; 6+ messages in thread
From: segaloco via TUHS @ 2025-02-18 17:06 UTC (permalink / raw)
To: The Eunuchs Hysterical Society
Sent with Proton Mail secure email.
On Tuesday, February 18th, 2025 at 8:36 AM, Yufeng Gao via TUHS <tuhs@tuhs.org> wrote:
> > From: Angelo Papenhoff
>
> > So the next step would be to restore the assembly source? :)
>
>
> It would be a fun project restoring the source code (there's a warm and a cold kernel, so they can be diffed to work out the ifdefs). In fact, I did disassemble vcboot and bos, as well as half the warm UNIX kernel, but in my infinite wisdom, I decided to name the IDA databases f1/f2/f3 and accidentally deleted them while cleaning up my desktop :((.
>
>
> > From: Noel Chiappa
>
>
> > It will be interesting to see what it reveals, as it's in the UNIX 'dark age'
>
> > between V1 and V4. Working from hints and clues in the extant 'UNIX
>
> > Programmer's Manual: Second Edition', I had tried to figure out how V2
>
> > differed from V1:
>
>
> I have some UNIX V2, V3 and V4 binaries (no kernels) recovered from DMR's DECtapes, plus a kernel driver or two from slightly earlier than nsys. Also, I have a few V4 distribution documents. I'm still slowly recovering stuff from those tapes, but most of what I've recovered is here (https://www.tuhs.org/Archive/Applications/Dennis_Tapes/Gao_Analysis/) (thank you Warren for hosting them!) if they interest you.
>
> > I was mostly just trying to work out how the mysterious KS11
>
> > worked.
>
>
> Sadly, this kernel does not have the KS11 stuff. The last1120c tape has binaries from a (or the, since there was only one?) machine with the KS11, as well as an earlier C compiler still called "nc". Of course, they're effectively V3+ binaries that use the EAE, so they won't really help with knowing how the KS11 worked.
>
> > It would be very interesting to know what fails. By 'hang', do you mean
>
> > 'ceases making progress', or 'halts'?
>
>
> Don't quote me on this, but I think under E11, it hangs in a loop before getting to init(7), and under SIMH, it bus errors while running init(7). Though I'll need to double-check SIMH because I may have used unix-jun72's /etc/init instead of the one from s2.
>
> Sincerely,
> Yufeng
For the record, I've done a bit of disassembly/restoration work on bits from these tapes, the following two Git repos have some of this work (along with Angelo's V2 B application restorations):
https://gitlab.com/segaloco/v2src
https://gitlab.com/segaloco/v1man
https://gitlab.com/segaloco/v2man
Above are source code restorations of some commands and a roff restoration of the V1/V2 manuals. I'm happy to hand these repos over to some larger effort as seed stuff for further V2 restoration efforts.
- Matt G.
P.S. While my own work on this stuff has stalled out as I work on some other projects, I am happy to contribute further if someone else is interested in taking over, I just don't see myself able to lead this effort in the near term.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [TUHS] Re: 1972 UNIX V2 "Beta" Resurrected
2025-02-18 15:34 Noel Chiappa
@ 2025-02-18 16:36 ` Yufeng Gao via TUHS
2025-02-18 17:06 ` segaloco via TUHS
0 siblings, 1 reply; 6+ messages in thread
From: Yufeng Gao via TUHS @ 2025-02-18 16:36 UTC (permalink / raw)
To: tuhs, jnc, aap
> From: Angelo Papenhoff
> So the next step would be to restore the assembly source? :)
It would be a fun project restoring the source code (there's a warm and a cold kernel, so they can be diffed to work out the ifdefs). In fact, I did disassemble vcboot and bos, as well as half the warm UNIX kernel, but in my infinite wisdom, I decided to name the IDA databases f1/f2/f3 and accidentally deleted them while cleaning up my desktop :((.
> From: Noel Chiappa
> It will be interesting to see what it reveals, as it's in the UNIX 'dark age'
> between V1 and V4. Working from hints and clues in the extant 'UNIX
> Programmer's Manual: Second Edition', I had tried to figure out how V2
> differed from V1:
I have some UNIX V2, V3 and V4 binaries (no kernels) recovered from DMR's DECtapes, plus a kernel driver or two from slightly earlier than nsys. Also, I have a few V4 distribution documents. I'm still slowly recovering stuff from those tapes, but most of what I've recovered is here (https://www.tuhs.org/Archive/Applications/Dennis_Tapes/Gao_Analysis/) (thank you Warren for hosting them!) if they interest you.
> I was mostly just trying to work out how the mysterious KS11
> worked.
Sadly, this kernel does not have the KS11 stuff. The last1120c tape has binaries from a (or the, since there was only one?) machine with the KS11, as well as an earlier C compiler still called "nc". Of course, they're effectively V3+ binaries that use the EAE, so they won't really help with knowing how the KS11 worked.
> It would be very interesting to know what fails. By 'hang', do you mean
> 'ceases making progress', or 'halts'?
Don't quote me on this, but I think under E11, it hangs in a loop before getting to init(7), and under SIMH, it bus errors while running init(7). Though I'll need to double-check SIMH because I may have used unix-jun72's /etc/init instead of the one from s2.
Sincerely,
Yufeng
^ permalink raw reply [flat|nested] 6+ messages in thread
* [TUHS] Re: 1972 UNIX V2 "Beta" Resurrected
@ 2025-02-18 15:34 Noel Chiappa
2025-02-18 16:36 ` Yufeng Gao via TUHS
0 siblings, 1 reply; 6+ messages in thread
From: Noel Chiappa @ 2025-02-18 15:34 UTC (permalink / raw)
To: tuhs, yufeng.gao; +Cc: jnc
> From: Yufeng Gao
> The s1 kernel is, to date, the earliest machine-readable UNIX kernel,
> sitting between V1 and V2.
It will be interesting to see what it reveals, as it's in the UNIX 'dark age'
between V1 and V4. Working from hints and clues in the extant 'UNIX
Programmer's Manual: Second Edition', I had tried to figure out how V2
differed from V1:
https://gunkies.org/wiki/UNIX_Second_Edition
but I was mostly interested in 'big picture' issues (like how a process'es
address space was laid out), not details like 'the foo() call was added', or
'how exec() differs'. (If someone _does_ create lists of the calls in V1 and
V2, and their details, and compares them, that _will_ be of value, don't get
me wrong; I was mostly just trying to work out how the mysterious KS11
worked.)
> It's somewhat picky about the environment. So far, aap's PDP-11/20
> emulator .. is the only one capable of booting the kernel. SIMH and
> Ersatz-11 both hang before reaching the login prompt.
It would be very interesting to know what fails. By 'hang', do you mean
'ceases making progress', or 'halts'?
If the former, since I've almost always had good experiences with Ersatz-11,
my _guess_ would be a problem with the RF11 emulation. (The RF11 was a very
early, and smalll, disk, so I wouldn't be surprised if there hasn't been a
lot of software run on those emulators that uses it, to flush out bugs. It's
also kind of an odd duck; it's word-oriented, not block-orientd.) So, for
instance, a 'lost' disk interrupt would produce this symptom. Are there any
RF11 diagnostics online? That would be the thing I would start with.
And I guess this system doesn't include the KS11; a pity, code that uses it
would allow re-creation of the programming manual (the way the:
https://gunkies.org/wiki/ANTS/ISI_IMP_Interface
programming instructions were re-created).
> From: Angelo Papenhoff
> So the next step would be to restore the assembly source? :)
Having only the binary to work from (to start with) is not optimal; those
early versions of UNIX ran on a number of very different hardware
configurations (e.g. with or without the KS11), with conditional assembly to
handle different configurations. Having only the dis-assembled code for _this_
configuration would obviously leave the code for the others missing.
Still, having _this_ source _would_ be useful; e.g. the 'hang-up' problem
above; the easiest way to debug that would to put 'print' statements in the
code, where a disk operation was started, and completes. If it's 'losing' a
disk interrupt completion, that will show right up. (Been there, done that, on
the RK11 hardware emulator Bridgham and I built, when UNIX wouldn't boot, just
hung.) Although I suppose one could put break-points there. Trying to debug it
any other way would be painfu beyond belief.
Noel
^ permalink raw reply [flat|nested] 6+ messages in thread
* [TUHS] Re: 1972 UNIX V2 "Beta" Resurrected
2025-02-18 9:31 [TUHS] " Yufeng Gao via TUHS
@ 2025-02-18 9:52 ` Angelo Papenhoff
0 siblings, 0 replies; 6+ messages in thread
From: Angelo Papenhoff @ 2025-02-18 9:52 UTC (permalink / raw)
To: tuhs
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. So the
next step would be to restore the assembly source? :)
cheers,
aap
On 18/02/25, Yufeng Gao via TUHS wrote:
> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-05-27 17:18 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-27 17:17 [TUHS] Re: 1972 UNIX V2 "Beta" Resurrected Thalia Archibald via TUHS
-- strict thread matches above, loose matches on Subject: below --
2025-02-18 15:34 Noel Chiappa
2025-02-18 16:36 ` Yufeng Gao via TUHS
2025-02-18 17:06 ` segaloco via TUHS
2025-02-20 4:58 ` Yufeng Gao via TUHS
2025-02-18 9:31 [TUHS] " Yufeng Gao via TUHS
2025-02-18 9:52 ` [TUHS] " Angelo Papenhoff
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).