[TUHS] 1972 UNIX V2 "Beta" Resurrected
Yufeng Gao via TUHS
tuhs at tuhs.org
Sat May 31 20:41:25 AEST 2025
> Do you have more details on the format of the s1 tape? I want to reproduce your
> work.
Hi Thalia, I documented the format in the readme for the Dennis Tapes (https://www.tuhs.org/Archive/Applications/Dennis_Tapes/README):
The 's1' tape is a 'UNIX INIT DECtape' used for cold booting UNIX, from a
version of UNIX between V1 and V2. It was created by the rather poorly
documented maki command, and therefore not readable by most tools. The format
consists of a boot block, a dump of the last 32 KiB of the RF disk /dev/rf0
and a small set of important programs. The boot block is the vcboot program
described in bproc(7). The 32-KiB dump consists of the bos, Warm UNIX, Cold
UNIX and an unassigned program, with the bos occupying 2 KiB, Warm and Cold
UNIX occupying 12 KiB each and the unassigned program occupying 3 KiB. The
remaining 3 KiB is slack space from the RF disk. The files on the tape are
stored in a way similar to tar(1), albeit in a more primitive way. All files
are stored consecutively with a directory block followed by file data. A
directory block consists of a 16-bit file size field, an 8-bit mode field, an
8-bit user ID field and a null-terminated path field. End of directory is
marked by setting the file size field to 0. Given the limitation of this
format and the fact that group IDs did not exist back then, timestamps and
group IDs are all set to 0 in the converted tar(1) archive.
Here is a block map of the tape I made last year:
578 blocks, 98 (16.96%) used, 480 (83.04%) free.
B = boot; D = directroy;
. = free; X = file data;
O = bos; W = wunix;
C = cunix; S = rf slack;
U = unassigned program;
|0123456789ABCDEF
--+----------------
00|BOOOOWWWWWWWWWWW
01|WWWWWWWWWWWWWCCC
02|CCCCCCCCCCCCCCCC
03|CCCCCUUUUUUSSSSS
04|SDXDXDXDXXDXXXDX
05|DXXDXXXXXXXXDXXX
06|XD..............
07|................
The actual decoding of the filesystem is done by the Cold UNIX kernel, the boot code simply restores the bootloader and kernel to the last few tracks of the RF, if I recall correctly.
> 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.
The text files are actually leftovers from a previous backup of UNIX V3-ish source code, which used the tap(1) format. The header got overwritten by the s1 UNIX INIT DECtape, so there's no metadata left.
Sincerely,
Yufeng
More information about the TUHS
mailing list