This toot on the Fediverse describes a fun and historically significant discovery: a magnetic tape containing what may be an installation image of Unix V4 has been found at the University of Utah. The label on the tape says “UNIX Original from Bell Labs V4 (See Manual for format)”.
This is particularly exciting because there is no known complete V4 image, although some artifacts (including the complete manual sources) are known to exist. V4 was the first version of Unix with a C kernel (for which partial sources are known).
This tape has reportedly been connected with the Computer History Museum and will hopefully yield fruit.
The tape has been read! There’s an image of it, and a disk image which apparently contains a swap file with interesting debris, and a tar file of the installation including source for the C compiler.
Raw dumps here, explanation instructions and unpacked data here:
You can pick up the story from here (it’s part of the original thread)
One commenter on discord reckons
the last booted time? from the tape 1974-06-13 09:50:44
It seems the image lacks drivers for /dev/mem and /dev/null so a kernel rebuild or similar is needed. How very authentic. From zoot on discord:
HOWTO: UNIX V4 Kernel Configuration
Back up everything lol.
As root:
# chdir /usr/sys/conf
Create your desired configuration as a text file containing a list of device drivers.
See mkconf.c for the possibilities. It will automatically make block and/or char devices.
The following example recreates the distribution config (the first six lines in that order) and adds 'mem' the /dev/mem, /dev/kmem, and /dev/null(!) driver.
# ed
a
console
rk
tc
tm
dh
pc
mem
.
w myconfig
q
# ./mkconf < myconfig
Should now have l.s and c.c generated by mkconf.
We are now ready to build a new kernel, BUT the rc script will silently fail to overwrite
existing files, so we need to remove them first (manually here, but feel free to improve)
# rm ../low.o
# rm ../mch.o
# rm ../conf.o
# rm /unix
# rm low.s
# rm conf.c
Respond 'y' to mode? confirmation prompts for each if asked.
Build your new Kernel!
# sh rc
"rm mkconf.c and rc when done" (don't do that lol, that's literally what rc displays)
You can double check that each of the files you rm'ed above now exist again.
And especially that you have a /unix again.
If you use my example config above, it should look like:
# ls -l /unix
-rw-r--r-- 1 root 27962 Jun 12 22:34 /unix
Now we reboot.
# sync
Power off and restart (for SIMH CTRL-E exit)
After booting up, once again as root:
Let's make our new special files...
# chdir /dev
There's a bogus null here because some program tried to write to /dev/null and created it.
# rm null
# /etc/mknod /dev/mem c 5 0
# /etc/mknod /dev/kmem c 5 1
# /etc/mknod /dev/null c 5 2
# ls -l
total 0
crw-rw-rw- 1 root 5, 1 Jun 12 22:35 kmem
crw-rw-rw- 1 root 5, 0 Jun 12 22:35 mem
crw-rw-rw- 1 root 5, 2 Jun 12 22:36 null
crw--w--w- 1 root 0, 0 Jun 12 22:36 tty8
# ps a
0 0 ???e?????a??\am?DZ? ????? m? ?
0 1 /etc/init
8 7 -
8 31 ps a
0 6 /etc/update
#
If ps now works like this then congratulations, it worked!
Left as an exercise for the user: Create the missing /dev special files required for df and check.
Hey - if anybody is keen to play around with this newly discovered system I’ve created a site where you can get a live (emulated) terminal of it in your browser - https://unixv4.dev
Check out all the history (including the janky lack of backspace and cd command), have a go at some of the demo programs I’ve uploaded to it (otherwise the disk is stock), see if you can port Doom over to it. Let me know of any feedback.
Thanks.
My first Unix experience was v6 on a PDP11/40 in 1980, so running v4 isn’t that much different - just lacking commands and features.
Todays bloat gives us the ls command with a million options, but then:
ls /bin | sort | pr -4 -l25
was the thing… the compiled ‘ls’ command being 4880 bytes there. It’s 151344 bytes on my desktop Linux system plus all the shared libraries needed. But when you just have 64KB of memory to play with you keep things tight!
this thing is fantastic to play with! I’m really enjoying messing around in it. Thanks so much for making it. I’ve really been enjoying messing around in it (as I always enjoy fiddling with random unix systems).
I think what made Unix simple and clean was hardware was easy to program and understand.
No USB 1,2,3 , No bit mapped displays. No mice. No thousands of data types and flavors of C.
No x86,Arm or VAX.
No backspace or bell.
Other than not having source for the C compiler it looks really complete. In what version did you have the source for the C compiler?
Ben.