Ancient Unix File Systems on Mac OS X

© Amit Singh. All Rights Reserved. Written in November 2008
UNIX® is a registered trademark of The Open Group.


Update

Besides Mac OS X, AncientFS also works on Linux and FreeBSD.

Introduction

As I was planning the MacFUSE 2.0 release, I wanted to have a "really cool" file system example to go along with the major version bump. Besides being cool, one of the goals of such file systems (See [1], [2], [3], [4], [5], [6], [7] for previous examples) is to show the breadth and depth of what can be done using MacFUSE, and also how easily and rapidly some results can be achieved.

MacFUSE is software that allows you to create and run arbitrary Mac OS X file systems as user-space programs. To get MacFUSE or to learn more about it, visit the project's web site.

I've often turned to ancient operating systems for inspiration. Besides retrocomputing being interesting in itself, it's always useful to know and remember how little of what we do today is really new. In my book, usually at the beginning of a chapter, I've talked about how some things in today's Unix-like systems are similar or identical to ancient Unix. A few years ago, I released gbaunix, a "game" ROM for the Nintendo Game Boy Advance that lets you run Fifth Edition UNIX and PDP-11 BSD on the Game Boy. The reason I chose Fifth Edition UNIX was because that was the oldest [*] version for which a machine-readable bootable file system image existed. There also exists the source for the kernel. (In fact, I recompiled the Fifth Edition kernel for gbaunix.) gbaunix proved to be academically significant.

[*] The unix-jun 72 project has scanned in a printout of First Edition Unix from June 1972 and restored it to an incomplete but running system.

The Fifth Edition file system, which is identical to the Sixth Edition file system, which in turn is described in the famous Lions' Commentary and other operating system texts, seemed like a good candidate for a modern reimplementation through MacFUSE. After all, it is the original Unix file system—the spiritual ancestor of modern file systems. Numerous concepts (and even implementation specifics, such as the mode bits) from ancient Unix file systems continue to be in use in today's systems.

I decided to create a MacFUSE-based version of the Fifth Edition file system. I wanted the example to be reasonably small and simple, so I decided to make it a read-only subset. However, as you will see, one thing led to another, and soon, the "unixv5fs" example turned into "ancientfs".

AncientFS

AncientFS is an open-source MacFUSE file system that will mount ancient Unix data containers in read-only mode, making their contents available as regular volumes on Mac OS X. Examples of "data containers" include file system disk images, tape images, incremental file system dumps, tape archives, and library archives. Once mounted, you can browse the volume in the Finder, of course, but the true flavor of ancient Unix data can only be had through the command line.

When you use AncientFS, even though you are mounting an ancient disk image on a modern day operating system, the mounted volume will preserve aspects of the original file system as far as possible. You will see the original inode numbers, file permissions, timestamps, block and character device numbers, and so on. Information on used/available inodes and disk blocks will also be correct when possible.

Getting Started

It is quite straightforward to compile AncientFS. You need to have MacFUSE installed, of course, to both compile and run it. You will also need Apple's Developer Tools installed. (Mac OS X does not come with a compiler installed by default.) Then, simply check out the source code using svn and run make.

$ svn co http://macfuse.googlecode.com/svn/trunk/filesystems/unixfs/common \ http://macfuse.googlecode.com/svn/trunk/filesystems/unixfs/ancientfs \ ancientfs $ cd ancientfs/ancientfs $ make ... $

If you are absolutely against the idea of having a compiler installed on your system, you could try this precompiled AncientFS executable instead.

Supported Formats

AncientFS supports many ancient (and in some cases, current) data container formats. It's easiest to let the program itself list them.

AncientFS (1.0): a MacFUSE file system to mount ancient Unix disks and tapes Amit Singh <http://osxbook.com> usage: ancientfs [--force] [--fsendian pdp|big|little] --dmg DMG --type TYPE MOUNTPOINT [MacFUSE args...] where: . DMG is an ancient Unix disk or tape image of a valid type . TYPE is one of the following: v1tap DECtape 'tap' tape archive; UNIX V1 v2tap DECtape 'tap' tape archive; UNIX V2 v3tap DECtape 'tap' tape archive; UNIX V3 ntap DECtape/magtape 'tap' tape archive; 1970 epoch tp DECtape/magtape 'tp' tape archive itp UNIX 'itp' tape archive dtp UNIX 'dtp' tape archive dump Incremental file system dump (512-byte blocks, V7/bsd) dump1k Incremental file system dump (1024-byte blocks, V7/bsd) dump-vn Incremental file system dump (512-byte blocks, bsd-vn) dump1k-vn Incremental file system dump (1024-byte blocks, bsd-vn) v1ar Very old (0177555) archive (.a) from First Edition UNIX v2ar Very old (0177555) archive (.a) from Second Edition UNIX v3ar Very old (0177555) archive (.a) from Third Edition UNIX ar Current (!<arch>\n), old (0177545), or very old (0177555) archive (.a); use (v1|v2|v3)ar for UNIX V1/V2/V3 archives bcpio Binary cpio archive (old); may be byte-swapped cpio_odc ASCII (odc) cpio archive cpio_newc New ASCII (newc) cpio archive cpio_newcrc New ASCII (newc) cpio archive with checksum tar ustar, pre-POSIX ustar, or V7 tar archive v1 First Edition UNIX file system v2 Second Edition UNIX file system v3 Third Edition UNIX file system v4 Fourth Edition UNIX file system v5 Fifth Edition UNIX file system v6 Sixth Edition UNIX file system v7 Seventh Edition UNIX file system v10 Tenth Edition UNIX file system 32v UNIX/32V file system bsd BSD file system (V7-style with fixed-length file names; e.g. 2.9BSD or 4.0BSD) bsd-vn BSD file system (pre 'fast-file-system' "UFS" with variable-length file names; e.g. 2.11BSD for PDP-11) . --force attempts mounting even if there are warnings or errors

If you tell AncientFS to mount an image containing a format that it can't handle, AncientFS should complain and exit in most cases. In some other cases, you could just get an empty mount. Ancient data container formats didn't always have "magic numbers", so it is not always possible to determine if the given image actually contains what one thinks it contains. Sometimes, an invalid image may mount as an empty volume because it passes whatever sanity checks that AncientFS can perform. You can always unmount the volume or kill the ancientfs process. If you have an image from a "close enough" system to one that AncientFS explicitly supports, you might be able to make it work through minor source code changes.

Where to Get Ancient Data?

You can obtain ancient Unix data container images and source from the Unix Heritage Society, and more specifically, the PDP UNIX Preservation Society. A list of mirrors is also available.

To use disk images and source from 16-bit UNIX versions 1 through 7 and 32-bit 32V UNIX, you must read and agree to the terms and conditions of http://www.tuhs.org/Archive/Caldera-license.pdf.

Examples

Let us look at some examples of how you could use AncientFS. In most cases, we will use an image from the aforementioned Unix archive. Details of several PDP-11 images can be found on the Archive Details page.

v[1—3]tap

The tap(1) command in ancient Unix (Editions First through Third) was used to save and restore selected portions of the file system hierarchy on DECtape. Even though the on-tape format was the same across these editions, you need to specify a Unix edition because the epoch changed. (The epoch was not 00:00 GMT Jan 1 1970 until Fourth Edition Unix.)

http://www.tuhs.org/Archive/PDP-11/Distributions/research/1972_stuff/s2-bits.gz

s2-bits contains a partial tap dump of several system directories. It was extracted from old DECtapes by Dennis Ritchie.

$ mkdir /Volumes/s2-bits $ ancientfs --type v3tap --dmg s2-bits /Volumes/s2-bits $ mount ... UNIX V3 tap File System on /Volumes/s2-bits... $ ls /Volumes/s2-bits bin core etc tmp usr $ ls -las /Volumes/s2-bits/bin ... 2 -rwx---rwx 1 root staff 698 Dec 31 1971 maki 1 -rwx---r-x 1 3 staff 154 Jan 17 1972 mesg 1 -rws---r-x 1 root staff 232 Nov 5 1972 mkdir 2 -rws---r-x 1 root staff 784 Jan 17 1972 mv ... 1 -rwx---rwx 1 3 staff 214 Jul 13 1972 sum 8 -rws---r-x 1 root staff 3678 Dec 29 1972 tap ... $ file /Volumes/s2-bits/bin/tap /Volumes/s2-bits/bin/tap: setuid PDP-11 old overlay $

ntap

This is a "newer" tap with a 1970 epoch and mode bits that are different from the older tap.

http://www.tuhs.org/Archive/PDP-11/Distributions/research/Dennis_v3/nsys-bits.gz

nsys-bits contains the earliest version of Unix that currently exists in machine-readable form.

$ mkdir /Volumes/nsys-bits $ ancientfs --type ntap --dmg nsys-bits /Volumes/nsys-bits $ mount ... UNIX ntap File System on /Volumes/nsys-bits... $ ls -las /Volumes/nsys-bits ... 2 -rw----rw- 1 6 staff 897 Aug 30 1973 param.h 1 -rw----rw- 1 6 staff 387 Aug 30 1973 proc.h 1 -rw----rw- 1 6 staff 142 Aug 30 1973 reg.h 1 -rw----rw- 1 6 staff 327 Aug 30 1973 systm.h 2 -rw----rw- 1 182 staff 690 Aug 30 1973 tables.c 1 -rw----rw- 1 6 staff 115 Aug 30 1973 text.h 2 -rw----rw- 1 6 staff 769 Aug 30 1973 tty.h 53 -rw----rw- 1 7 staff 26820 Sep 23 1973 u ...

tp

Beginning with Fourth Edition Unix, the tp(1) command was used to save and restore selected portions of the file system hierarchy on DECtape or mag tape.

http://www.tuhs.org/Archive/PDP-11/Distributions/unsw/4/record2.gz

record2 is a tp format archive of binaries and man pages for PWB-UNIX.

$ mkdir /Volumes/pwb-unix $ ancientfs --type tp --dmg record2 /Volumes/pwb-unix $ mount ... UNIX tp File System on /Volumes/pwb-unix... $ ls -las /Volumes/pwb-unix total 336 1 drwxr-xr-x 0 singh staff 12 Dec 2 21:51 . 0 drwxrwxrwt 5 root admin 170 Dec 2 21:51 .. 1 drwxr-xr-x 1 singh staff 87 Sep 7 1978 bin 1 drwxr-xr-x 1 singh staff 58 Sep 7 1978 etc 1 drwxr-xr-x 1 singh staff 20 Sep 7 1978 lib 5 -rw-r--r-- 1 3 wheel 2508 Sep 7 1978 rootnames 66 -rwxr--r-- 1 2 wheel 33536 Sep 7 1978 unix 66 -rwxr--r-- 1 2 wheel 33536 Sep 7 1978 unixhpht 65 -rwxr--r-- 1 2 wheel 33172 Sep 7 1978 unixhptm 65 -rwxr--r-- 1 2 wheel 32776 Sep 7 1978 unixrpht 64 -rwxr--r-- 1 2 wheel 32412 Sep 7 1978 unixrptm 1 drwxr-xr-x 1 singh staff 18 Sep 7 1978 usr $ nroff -mm /Volumes/pwb-unix/usr/man/man0/documents | less ... Documents for the PWB/UNIX Time-Sharing System Edition 1.0 T. A. Dolotta R. C. Haight E. M. Piskorik Editors August 1977 The enclosed PWB/UNIX documentation is supplied in accordance with the Software Agreement you have with the Western Electric Company. ...

itp

itp is similar to tp, but it supports longer pathnames (48 bytes vs 32).

http://www.tuhs.org/Archive/PDP-11/Distributions/unsw/1/record0.gz

record0 is an itp format tape that contains several BASIC programs and ASCII lineprinter pictures. The tape's original label was "UNIX Fun & Games & Pics".

$ mkdir /Volumes/fun $ ancientfs --type itp --dmg record0 /Volumes/fun $ ls -las /Volumes/fun ... 6 -rw-rw-rw- 1 daemon daemon 3072 Jan 21 1978 love.pic 14 -rw-rw-rw- 1 daemon daemon 7168 Jan 21 1978 lunar.bas ... 27 -rw-rw-rw- 1 daemon daemon 13824 Jan 21 1978 strtrk.bas 8 -rw-rw-rw- 1 daemon daemon 4096 Jan 21 1978 super1.bas 8 -rw-rw-rw- 1 daemon daemon 4096 Jan 21 1978 super2.bas 81 -rw-rw-rw- 1 daemon daemon 41472 Jan 21 1978 sylvet.pi1 4 -rw-rw-rw- 1 daemon daemon 2048 Jan 21 1978 synonm.bas 1 -rw-rw-rw- 1 daemon daemon 512 Jan 21 1978 talk.bas 5 -rw-rw-rw- 1 daemon daemon 2560 Jan 21 1978 target.bas 9 -rw-rw-rw- 1 daemon daemon 4608 Jan 21 1978 tennis.bas 5 -rw-rw-rw- 1 daemon daemon 2560 Jan 21 1978 tictac.bas 1 -rw-rw-rw- 1 daemon daemon 512 Jan 21 1978 time00.bas 5 -rw-rw-rw- 1 daemon daemon 2560 Jan 21 1978 titles.bas 8 -rw-rw-rw- 1 daemon daemon 4096 Jan 21 1978 tower.bas 2 -rw-rw-rw- 1 daemon daemon 1024 Jan 21 1978 train.bas ... $ cat /Volumes/fun/love.pic ... LOVELOVELOVELOVELOVELOVELOVELOVELOVELOVELOVELOVELOVELOVELOVE L OVELOVELOVELOVELOVELOVELOV LOVELOVELOVE LOV ELOVELOVELOVELOVELOVELOV LOVELOVE LOVE VELOVELOVELOVELOVELOVEL VELOVE LOVE VELOVELOVELOVELOVELOVE LOVEL ELOVE LOVE VELOVELOVELOVELOVELOV VELOVELO LOVE LOVE VELOVELOVELOVELOVELOV OVELOVELOV LOVE LOVE VELOVELOVELOVELOVELOV LOVELOVELOV LOVE LOVE VELOVELOVELOVELOVELOV ELOVELOVELO LOVE LOVE VELOVELOVELOVELOVELOV VELOVELOVEL LOVE LOVE VELOVELOVELOVELOVELOV OVELOVELOVE LOVE LOVE VELOVELOVELOVELOVEL V LOVELOVELOV LOVE LOVE VELOVELOVELOVELOVEL V LOVELOVELO LOVE LOVE VELOVELOVELOVELOVE V OVELOVEL LOVE LOVE VELOVELOVELOVELOV V VELOV LOVE LOVE VELOVELOVELOVEL VE ELOVE L VELOV LOVELOVE L VELOVELOV LOVELOVELOVE L VELOV E L VELOV E LOVE VELOVELOVELOV VELOVELOVE VELOVELOVELO E LOVEL ELOVELOVELO OVELOVELOVE VELOVELOVELOVE E LOVEL ELOVELOVELO OVELOVELOVE VELOVELOVELOVEL E LOVELO LOVELOVEL LOVELOVELOVE VELOVELOVELOVELO E LOVELO LOVELOVEL LOVELOVELOVE VELOVEL VELOVELOVE LOVELOV OVELOVE ELOVELOVELOVE VELOVE VELOVELOVE LOVELOV OVELOVE ELOVELOVELOVE VELOVELOVE LOVELOVE VELOV VELOVELOVELOVE VELOVE VELOVELOVE LOVELOVE VELOV VELOVELOVELOVE VELOVEL VELOVELOVE LOVELOVEL ELO OVELOVELOVELOVE VELOVELOVELOVELO E LOVELOVEL ELO OVELOVELOVELOVE VELOVELOVELOVEL E LOVELOVELO L LOVELOVELOVELOVE VELOVELOVELOVE E LOVELOVELO LOVELOVELOVELOVE VELOVELOVELO E LOVELOVELOV ELOVELOVELOVE E LOVELOVELOV ELOVELOVELOVE E LOVELOVELOVELOVELOVELOVELOVELOVELOVELOVELOVELOVELOVELOVELOVE ...

dtp

dtp allows for even longer (114-byte) pathnames than itp.

http://www.tuhs.org/Archive/PDP-11/Distributions/unsw/82/record0.gz

record0 is a dtp archive of Berkeley Pascal. It also contains Pascal-VU from Vrije University, the Netherlands.

$ mkdir /Volumes/pascal $ ancientfs --type dtp --dmg record0 /Volumes/pascal $ ls -las /Volumes/pascal total 3 1 drwxr-xr-x 0 singh staff 4 Dec 2 23:03 . 0 drwxrwxrwt 88 root wheel 2992 Dec 2 20:42 .. 1 drwx------ 1 root wheel 17 Apr 14 1981 pascal 1 drwx------ 1 root wheel 11 Apr 14 1981 pc $ ls -las /Volumes/pascal/pascal total 102 1 drwx------ 1 root wheel 17 Apr 14 1981 . 1 drwxr-xr-x 0 singh staff 4 Dec 2 23:03 .. 1 -rw------- 1 9 wheel 351 Jul 12 1979 READ_ME 1 drwx------ 1 root wheel 9 Apr 14 1981 bin 2 -rw------- 1 9 wheel 794 Jul 12 1979 create 1 drwx------ 1 root wheel 11 Apr 14 1981 doc 30 -rw------- 1 9 wheel 15216 Jul 12 1979 install.ms 1 drwx------ 1 root wheel 78 Apr 14 1981 man 1 drwx------ 1 root wheel 16 Apr 14 1981 misc 1 -rwx------ 1 9 wheel 116 Jul 18 1979 obj 1 -rw------- 1 9 wheel 195 Jul 12 1979 setup 1 drwx------ 1 root wheel 69 Apr 14 1981 src 49 -rwx------ 1 9 wheel 24688 Jul 12 1979 tar 8 -rw------- 1 9 wheel 3687 Jul 12 1979 tar.1 1 -rw------- 1 9 wheel 456 Jul 12 1979 tar.ms 1 -rwx------ 1 9 wheel 115 Jul 12 1979 tarit 1 drwx------ 1 root wheel 8 Apr 14 1981 upgrade $ nroff -ms /Volumes/pascal/pascal/install.ms | less ... Second Distribution of Berkeley Software for UNIX† Installation Instructions By following the directions here you should be able to bring up the software on the tape in a very short period of time, ranging from an hour (if you have a standard version 6 system and can use the pre- compiled binaries), to about 6 hours (if you have a version 6 or 7 system which requires recompilation.) ...

dump

The dump(1M) command copied to magnetic tape all files changed after a certain date in the file system. That is, it did an incremental file system dump. The restor(1M) command did the converse: an incremental file system restore. A dump(1M) followed by a mkfs(1M) and a restor(1M) was used to change the size of a file system.

http://www.tuhs.org/Archive/PDP-11/Distributions/research/Keith_Bostic_v7/f5.gz

$ mkdir /Volumes/dump $ ancientfs --type dump --dmg f5 /Volumes/dump $ mount ... UNIX dump/restor File System on /Volumes/dump ... $ ls -las /Volumes/dump total 437 1 drwxr-xr-x 8 root wheel 288 May 20 1956 . 0 drwxrwxrwt 88 root wheel 2992 Dec 2 20:42 .. 5 drwxrwxr-x 2 3 sys 2480 May 5 1979 bin 14 -rwxrwxr-x 1 3 sys 6900 May 15 1979 boot 1 drwxr-xr-x 2 root sys 304 May 16 1979 dev 1 drwxr-xr-x 2 root sys 336 Mar 29 1979 etc 105 -rwxrwxr-x 1 2 kmem 53302 Jun 8 1979 hphtunix 104 -rwxrwxr-x 1 2 kmem 52850 Jun 8 1979 hptmunix 1 drwxrwxr-x 2 3 sys 336 Jan 22 1979 lib 102 -rwxrwxr-x 1 2 kmem 51790 Jun 8 1979 rphtunix 101 -rwxrwxr-x 1 2 kmem 51274 Jun 8 1979 rptmunix 1 drwxrwxrwx 2 3 sys 304 Jun 8 1979 tmp 1 drwxr-xr-x 2 root daemon 32 Jan 10 1979 usr $ file /Volumes/dump/hphtunix /Volumes/dump/hphtunix: PDP-11 separate I&D executable not stripped $ cat /Volumes/dump/etc/passwd root:VwL97VCAx1Qhs:0:1::/: daemon:x:1:1::/: sys::2:2::/usr/sys: bin::3:3::/bin: uucp::4:4::/usr/lib/uucp:/usr/lib/uucico dmr::7:3::/usr/dmr: $

dump1k

If you have an incremental file system dump with a file system block size of 1024 bytes, use dump1k instead of dump.

http://www.tuhs.org/Archive/PDP-11/Distributions/ucb/2.9BSD/file7.gz

$ mkdir /Volumes/dump1k $ ancientfs --type dump1k --dmg file7 /Volumes/dump1k $ ls -las /Volumes/dump1k total 1090 2 drwxr-xr-x 11 root daemon 512 Mar 12 1933 . 0 drwxrwxrwt 79 root wheel 2686 Dec 3 13:24 .. 2 -rw-rw-r-- 1 root daemon 164 Sep 29 1982 .cshrc 2 -rw-rw-r-- 1 root daemon 266 Mar 7 1984 .login 2 -rw-rw-r-- 1 root wheel 2 Jul 26 1983 .msgsrc 2 -rw-rw-r-- 1 root daemon 116 Mar 30 1983 .profile 2 -rw-r--r-- 1 root wheel 56 Nov 20 1983 2.9stamp ... 206 -rwxr-xr-x 2 root kmem 104798 Nov 20 1983 unix 2 drwxrwxrwx 2 root wheel 48 Feb 18 1982 usr 206 -rwxr-xr-x 2 root kmem 104798 Nov 20 1983 xpunix $ ls -las /Volumes/dump1k/dev total 16 4 drwxrwxr-x 2 root wheel 1424 Nov 20 1983 . 2 drwxr-xr-x 11 root daemon 512 Mar 12 1933 .. 10 -rwxrwxr-x 1 root daemon 4375 Sep 19 1983 MAKE 0 crw--w--w- 1 root wheel 0, 0 Mar 7 1984 console ... 0 brw------- 1 root wheel 6, 7 Mar 29 1983 xp0h

dump1k-vn

Use dump1k-vn for an incremental dump from a V7-derived file system with variable-length long pathnames. The 2.11BSD file system falls in this category. Note that the 2.11BSD file system also supports symbolic links.

http://www.tuhs.org/Archive/PDP-11/Distributions/ucb/2.11BSD/root.dump

$ mkdir /Volumes/2.11bsd $ ancientfs --type dump1k-vn --dmg root.dump /Volumes/2.11bsd $ ls -als /Volumes/2.11bsd total 892 2 drwxr-xr-x 14 root wheel 512 Feb 4 1934 . 0 drwxrwxrwt 88 root wheel 2992 Dec 2 20:42 .. 2 -rw-r--r-- 1 root wheel 349 Oct 29 1996 .cshrc 0 -rw-r--r-- 1 root wheel 0 May 17 1995 .hushlogin 2 -rw-r--r-- 1 root wheel 153 May 2 1997 .kermrc 2 -rw-r--r-- 1 root wheel 335 Oct 29 1996 .login 2 -rw-r--r-- 1 root wheel 8 Jan 17 1988 .mailrc 2 -rw-r--r-- 1 root wheel 152 Oct 29 1996 .profile 0 -rw------- 1 root wheel 0 Apr 22 2000 .rhosts 2 -rw-r--r-- 1 root wheel 12 May 2 1997 .tiprc 38 -r--r--r-- 1 root wheel 18648 Aug 28 1992 README 8 -rw-r--r-- 1 root wheel 3368 Apr 21 2000 VERSION 2 drwxr-xr-x 3 root wheel 512 Apr 23 2000 a 2 drwxr-xr-x 2 root owner 1024 Apr 23 2000 bin 70 -rwxr-x--- 1 root owner 35236 Jan 31 1998 boot 10 drwxr-xr-x 3 root owner 4608 Apr 23 2000 dev 2 drwxr-xr-x 3 root owner 1024 Apr 23 2000 etc 334 -rwxr--r-- 1 root wheel 170258 Apr 22 2000 genunix 2 drwxr-xr-x 2 root owner 512 Apr 23 2000 lib 2 drwxr-xr-x 2 root wheel 1024 Aug 17 1990 lost+found 2 drwxr-xr-x 2 root owner 512 Apr 23 2000 mdec 2 drwxr-xr-x 2 root wheel 512 Dec 31 1991 mnt 2 drwxr-xr-x 2 root wheel 512 Apr 23 2000 sbin 2 lrwxrwxrwx 1 root wheel 11 Apr 23 2000 sys -> usr/src/sys 2 drwxrwxrwt 2 root wheel 512 Apr 22 2000 tmp 58 -rwxr-xr-x 1 root wheel 29623 Apr 9 2000 toyset 334 -rwxr--r-- 1 root wheel 170258 Apr 22 2000 unix 2 drwxr-xr-x 2 root wheel 512 Apr 23 2000 usr 2 drwxr-xr-x 6 root wheel 512 Apr 23 2000 var 2 lrwxrwxrwx 1 root wheel 4 Apr 23 2000 vmunix -> unix $ file /Volumes/2.11bsd/vmunix /Volumes/2.11bsd//vmunix: PDP-11 overlaid separate executable not stripped $

ar

Since First Edition Unix, ar has been used to maintain groups of files combined into a single "archive" file. Even though its main use was to create and update library files as used by the loader, it can, and indeed has been used for general purpose archival, especially in older systems where clubbing many files together meant saving on inodes. The ar format has changed over the years though. AncientFS supports all ar formats and, since all ar formats have magic numbers, AncientFS will attempt to determine the type on its own. However, if a "very old archive" (magic number 0177555) is from Third Edition or earlier Unix, use v1ar, v2ar, or v3ar as appropriate to make AncientFS parse the mode bits correctly and get the epoch right.

http://www.tuhs.org/Archive/PDP-11/Trees/V6/lib/libc.a (Very Old ar)

$ mkdir /Volumes/voar $ ancientfs --type ar --dmg libc.a /Volumes/voar $ mount ... UNIX Very Old ar File System on /Volumes/voar... $ ls -als /Volumes/voar total 97 1 drwxr-xr-x 0 singh staff 76 Dec 3 01:47 . 0 drwxrwxrwt 88 root wheel 2992 Dec 2 20:42 .. 1 --wxrwxrwx 1 root staff 60 May 5 1975 abort.o 1 --wxrwxrwx 1 root staff 76 May 5 1975 abs.o 2 --w-rw-rw- 1 root staff 656 May 5 1975 alloc.o 2 --w-rw-rw- 1 root staff 588 May 5 1975 atof.o 1 --w-rw-rw- 1 root staff 380 May 5 1975 atoi.o ... 1 --w-rw-rw- 1 root staff 116 May 5 1975 wait.o 1 --w-rw-rw- 1 root staff 120 May 5 1975 write.o $

http://www.tuhs.org/Archive/PDP-11/Trees/V7/lib/libplot.a (Old ar)

Another example of old ar format archives would be one of the cont.a files, say, from the 1BSD distribution.

$ mkdir /Volumes/oar $ ancientfs --type ar --dmg libplot.a /Volumes/oar $ mount ... UNIX Old ar File System on /Volumes/voar... $ ls -als /Volumes/oar total 16 1 drwxr-xr-x 0 singh staff 17 Dec 3 03:54 . 0 drwxrwxrwt 78 root wheel 2652 Dec 3 03:15 .. 1 -rw-rw-r-- 1 3 sys 372 Jan 22 1979 arc.o 1 -rw-rw-r-- 1 3 sys 320 Jan 22 1979 box.o 1 -rw-rw-r-- 1 3 sys 288 Jan 22 1979 circle.o 1 -rw-rw-r-- 1 3 sys 176 Jan 22 1979 close.o 1 -rw-rw-r-- 1 3 sys 260 Jan 22 1979 cont.o 1 -rw-rw-r-- 1 3 sys 436 Jan 22 1979 dot.o 1 -rw-rw-r-- 1 3 sys 192 Jan 22 1979 erase.o 1 -rw-rw-r-- 1 3 sys 508 Jan 22 1979 label.o 1 -rw-rw-r-- 1 3 sys 316 Jan 22 1979 line.o 1 -rw-rw-r-- 1 3 sys 508 Jan 22 1979 linmod.o 1 -rw-rw-r-- 1 3 sys 260 Jan 22 1979 move.o 1 -rw-rw-r-- 1 3 sys 120 Jan 22 1979 open.o 1 -rw-rw-r-- 1 3 sys 260 Jan 22 1979 point.o 1 -rw-rw-r-- 1 3 sys 328 Jan 22 1979 putsi.o 1 -rw-rw-r-- 1 3 sys 316 Jan 22 1979 space.o $

We can even mount a "current" archive as a file system. The current format can be either the older flavor (introduced in 4.0BSD) or the newer flavor (introduced in 4.4BSD) that supports long names and names with embedded spaces. Let us mount a Mac OS X archive, say, /usr/lib/libSystemStubs.a.

$ sw_vers -productVersion 10.5.5 $ mkdir /Volumes/ar $ lipo -thin i386 -output /tmp/libSystemStubs.a /usr/lib/libSystemStubs.a $ mount ... UNIX ar File System on /Volumes/ar... $ ls -als /Volumes/ar total 48 1 drwxr-xr-x 0 singh staff 49 Dec 3 03:57 . 0 drwxrwxrwt 79 root wheel 2686 Dec 3 03:57 .. 1 -rw-r--r-- 1 root wheel 40 Feb 19 2008 __.SYMDEF SORTED 1 -rw-r--r-- 1 root wheel 368 Feb 19 2008 dummy.o 1 -rw-r--r-- 1 root wheel 152 Feb 19 2008 getrealaddr.o 1 -rw-r--r-- 1 root wheel 152 Feb 19 2008 s_asprintf.o 1 -rw-r--r-- 1 root wheel 152 Feb 19 2008 s_err.o 1 -rw-r--r-- 1 root wheel 152 Feb 19 2008 s_errc.o ... 1 -rw-r--r-- 1 root wheel 152 Feb 19 2008 s_warnx.o 1 -rw-r--r-- 1 root wheel 152 Feb 19 2008 s_wcstold.o 1 -rw-r--r-- 1 root wheel 152 Feb 19 2008 s_wprintf.o 1 -rw-r--r-- 1 root wheel 152 Feb 19 2008 s_wscanf.o $

tar

tar, the ubiquitous "tape" archiver (even now that tapes are not commonplace in mainstream computing) made its appearance in Seventh Edition Unix, where it was used to save and restore files on magtape. There have been several tar formats over the years. AncientFS should be able to mount all formats up to and including the POSIX.1 ustar format.

http://www.tuhs.org/Archive/PDP-11/Distributions/other/Venix/venix.tar is an example of an old tar format file.

$ mkdir /Volumes/venix $ ancientfs --type tar --dmg venix.tar /Volumes/venix $ mount ... UNIX V7 tar File System on /Volumes/venix... $ ls -F /Volumes/venix dist/ $ ls -als /Volumes/venix/dist total 63 1 drwxrwxr-x 1 101 wheel 21 Feb 11 1996 . 1 drwxr-xr-x 0 singh staff 3 Dec 3 04:01 .. 0 -rw-r--r-- 1 101 wheel 0 Jan 1 1985 .news_time 1 -rwxrwxr-x 1 101 wheel 154 Sep 6 1985 .profile 1 -rw-rw-r-- 1 101 wheel 154 Sep 6 1985 MENU 1 -rwxr-xr-x 1 101 wheel 383 Sep 11 1986 copy 1 -rwxr-xr-x 1 101 wheel 369 Jan 16 1985 copy.bak 3 -rw-rw-r-- 1 101 wheel 1123 Oct 12 1984 customers 1 drwxrwxr-x 1 101 wheel 5 Feb 11 1996 dist 3 -rw-rw-r-- 1 root wheel 1037 Apr 16 1987 lex.yy.c 8 -rwxrwxr-x 1 101 wheel 3786 Nov 29 1984 proacc.o 1 -rwxrwxr-x 1 101 wheel 467 Sep 9 1985 serial 6 -r--r--r-- 1 101 wheel 2675 Sep 6 1985 serial.c 2 -rwxrwxr-x 1 101 wheel 768 Sep 6 1985 serial.m11 0 -rwxrwxr-x 1 101 wheel 0 Sep 6 1985 serial.pro 11 -rwxrwxr-x 1 101 wheel 5596 Sep 6 1985 serial.v5.2 2 -rwxr-xr-x 1 101 wheel 607 Jan 16 1985 setflop.m 2 -rwxr-xr-x 1 101 wheel 603 Jan 16 1985 setflop.m.bak 8 -rwxrwxr-x 1 101 wheel 3702 Jan 16 1985 setflop.p 8 -rwxrwxr-x 1 101 wheel 3702 Jan 16 1985 setflop.p.bak 2 -r--r--r-- 1 101 wheel 993 Sep 6 1985 sn.h $ cat /Volumes/venix/MENU CLEAR=`tput clear` while : do echo $CLEAR echo "VENTURCOM PRO DISTRIBUTION SYSTEM" echo "Choices are:\n" echo "1. Copy any RX50 diskette." echo "2. $

Fifth Edition Unix File System

http://www.tuhs.org/Archive/PDP-11/Distributions/research/Dennis_v5/v5root.gz

$ mkdir /Volumes/v5unix $ ancientfs --type v5 --dmg v5root /Volumes/v5unix $ ls -als /Volumes/v5unix total 60 1 drwxr-xr-x 9 3 daemon 160 Jan 29 1975 . 0 drwxrwxrwt 79 root wheel 2686 Dec 3 03:57 .. 2 drwxr-xr-x 2 3 daemon 944 Nov 26 1974 bin 1 drwxr-xr-x 2 3 daemon 80 Nov 26 1974 dev 1 drwxr-xr-x 2 3 daemon 224 Nov 26 1974 etc 1 drwxr-xr-x 2 3 daemon 224 Nov 26 1974 lib 1 drwxr-xr-x 2 3 daemon 32 Nov 26 1974 mnt 1 drwxrwxrwx 2 3 daemon 32 Nov 26 1974 tmp 51 -rwxrwxrwx 1 3 daemon 25802 Mar 21 1975 unix 1 drwxr-xr-x 14 3 daemon 224 Nov 26 1974 usr $ ls -las /Volumes/v5unix/dev total 2 1 drwxr-xr-x 2 3 daemon 80 Nov 26 1974 . 1 drwxr-xr-x 9 3 daemon 160 Jan 29 1975 .. 0 cr--r--r-- 1 3 daemon 1, 0 Nov 26 1974 mem 0 crw-rw-rw- 1 3 daemon 1, 2 Nov 26 1974 null 0 crw-rw-rw- 1 3 daemon 0, 0 Nov 26 1974 tty8 $

Sixth Edition Unix File System

Here are several Sixth Edition images. You can also find disk images from Fifth, Sixth, and Seventh Edition Unix systems at http://simh.trailing-edge.com/software.html.

$ mkdir /Volumes/v6doc $ ancientfs --type v6 --dmg v6doc /Volumes/v6doc $ ls -als /Volumes/v6doc total 16 1 drwxr-xr-x 17 3 sys 384 Jun 26 1975 . 0 drwxrwxrwt 79 root wheel 2686 Dec 3 13:24 .. 1 drwxrwxr-x 2 3 sys 48 Jun 26 1975 as 1 drwxrwxr-x 2 3 sys 80 Jun 26 1975 bc 1 drwxrwxr-x 2 3 sys 176 Jun 26 1975 beg 1 drwxrwxr-x 2 3 sys 240 Jun 26 1975 c 1 drwxrwxr-x 2 3 sys 464 Jun 26 1975 ctut 1 drwxrwxr-x 2 3 sys 176 Jun 26 1975 ed 1 drwxrwxr-x 2 3 sys 144 Jun 26 1975 hel 1 drwxrwxr-x 2 3 sys 48 Jun 26 1975 iolib 1 drwxrwxr-x 2 3 sys 48 Jun 26 1975 iosys 1 drwxrwxr-x 11 3 sys 192 Jun 26 1975 man 1 drwxrwxr-x 2 3 sys 48 Jun 26 1975 rat 1 drwxrwxr-x 2 3 sys 64 Jun 26 1975 secur 1 drwxrwxr-x 2 3 sys 96 Jul 17 1975 start 1 drwxrwxr-x 2 3 sys 192 Jun 26 1975 unix 1 drwxrwxr-x 2 3 sys 288 Jun 26 1975 yacc $

Seventh Edition Unix File System

$ mkdir /Volumes/v7unix $ ancientfs --type v7 --dmg v7_rk05_1145 /Volumes/v7unix $ ls -las /Volumes/v7unix total 642 1 drwxrwxrwx 7 root wheel 224 Sep 22 1988 . 0 drwxrwxrwt 79 root wheel 2686 Dec 3 13:24 .. 5 drwxrwxr-x 2 3 sys 2512 Sep 22 1988 bin 18 -rwxr-xr-x 1 3 sys 8986 Jun 8 1979 boot 1 drwxrwxr-x 2 3 sys 160 Sep 22 1988 dev 1 drwxrwxr-x 2 3 sys 336 Sep 22 1988 etc 105 -rwxr-xr-x 1 2 kmem 53302 Jun 8 1979 hphtunix 104 -rwxr-xr-x 1 2 kmem 52850 Jun 8 1979 hptmunix 1 drwxrwxr-x 2 3 sys 192 Sep 22 1988 lib 1 drwxrwxr-x 2 root bin 96 Sep 22 1988 mdec 100 -rwxr-xr-x 1 root kmem 50990 Jun 8 1979 rkunix 102 -rwxr-xr-x 1 root kmem 51982 Jun 8 1979 rl2unix 102 -rwxr-xr-x 1 2 kmem 51790 Jun 8 1979 rphtunix 101 -rwxr-xr-x 1 2 kmem 51274 Jun 8 1979 rptmunix $

32V Unix File Systems

32V Unix was a 32-bit port to the DEC VAX of Seventh Edition 16-bit Unix for PDP-11.

http://www.tuhs.org/Archive/VAX/Distributions/32V/file2.gz

$ mkdir /Volumes/32v $ ancientfs --type 32v --dmg file2 /Volumes/32v $ ls -las /Volumes/32v total 135 1 drwxr-xr-x 10 root wheel 352 Mar 26 1979 . 0 drwxrwxrwt 79 root wheel 2686 Dec 3 13:24 .. 2 drwxr-xr-x 2 root daemon 1008 Mar 21 1979 bin 1 drwxr-xr-x 2 root daemon 464 Mar 12 1979 dev 1 drwxr-xr-x 2 root daemon 272 Mar 26 1979 etc 8 -rwxr-xr-x 1 root daemon 3664 Mar 26 1979 fboot 1 drwxr-xr-x 2 root daemon 160 Apr 30 1979 lib 1 drwxrwxrwx 2 root daemon 32 Mar 12 1979 mnt 1 drwxr-xr-x 2 root daemon 160 Mar 26 1979 sys 1 drwxrwxrwx 2 root daemon 32 Mar 12 1979 tmp 117 -rwxr-xr-x 2 root daemon 59528 Mar 22 1979 unix 1 drwxrwxrwx 2 root daemon 32 Mar 12 1979 usr $

2.9BSD File System

$ mkdir /Volumes/29bsd $ ancientfs --type bsd --dmg rl02_2.9BSDroot /Volumes/29bsd $ ls -las /Volumes/29bsd total 1090 2 drwxr-xr-x 11 root daemon 512 Mar 7 1984 . 0 drwxrwxrwt 79 root wheel 2686 Dec 3 13:24 .. 2 -rw-rw-r-- 1 root daemon 164 Sep 29 1982 .cshrc 2 -rw-rw-r-- 1 root daemon 266 Mar 7 1984 .login 2 -rw-rw-r-- 1 root wheel 2 Jul 26 1983 .msgsrc ... 206 -rwxr-xr-x 2 root kmem 104798 Nov 20 1983 unix 2 drwxrwxrwx 2 root wheel 48 Feb 18 1982 usr 206 -rwxr-xr-x 2 root kmem 104798 Nov 20 1983 xpunix $

2.11BSD File System

2.11BSD incorporated all fixes and changes made since the release of 2.10.1BSD as well as several missing pieces of 4.3BSD. Its file system supported long (up to 63 characters) file names and symbolic links.

http://www.tuhs.org/Archive/PDP-11/Boot_Images/2.11_rp_unknown.gz

$ mkdir /Volumes/211bsd $ ancientfs --type bsd-vn --dmg 2.11_rp_unknown /Volumes/211bsd $ ls -las /Volumes/211bsd total 2332 2 drwxr-xr-x 14 root wheel 1024 Jan 8 1998 . 0 drwxrwxrwt 79 root wheel 2686 Dec 3 13:24 .. 2 -rw-r----- 1 root wheel 365 Jul 25 1997 .cshrc 2 -rw-r----- 1 root wheel 151 Aug 30 1992 .kermrc 2 -rw-r--r-- 1 root wheel 335 Jul 25 1997 .login 2 -rw-r----- 1 root wheel 8 Jan 17 1988 .mailrc 2 -rw-r--r-- 1 root wheel 152 Jul 28 1997 .profile 2 -rw-r----- 1 root wheel 145 May 19 1995 .rhosts 38 -r--r--r-- 1 root wheel 18648 Aug 28 1992 README 6 -rw-r--r-- 1 root owner 2715 Jan 8 1998 VERSION 2 drwxr-xr-x 2 root owner 1024 Jan 8 1998 bin 46 -rwx------ 1 root wheel 22996 Jan 6 1998 boot 4 drwxr-x--x 3 root wheel 2048 Jan 8 1998 dev 52 -rwx------ 1 root wheel 25812 Jan 6 1998 disklabel 2 drwxr-xr-x 3 root owner 1024 Jan 8 1998 etc 336 -rwxr-x--x 1 root wheel 171571 Jan 6 1998 genunix 2 drwxr-xr-x 2 root owner 512 Jan 7 1998 lib 2 drwxr-xr-x 2 root wheel 1024 Aug 17 1990 lost+found 2 drwxr-xr-x 2 root owner 512 Jun 16 1997 mdec 2 drwxr-xr-x 2 root wheel 512 Dec 31 1991 mnt 2 drwxr-x--x 2 root wheel 512 Jun 18 1992 mnt1 156 -rwxr-x--x 1 root wheel 79058 Jan 6 1998 netnix 334 -rwxr-x--x 1 root wheel 170321 Dec 21 1997 ogenunix 156 -rwxr--r-- 1 root kmem 79058 Jan 6 1998 onetnix 286 -rwxr--r-- 1 root kmem 146311 Jan 6 1998 ounix 270 -rwxr-x--x 1 root kmem 138068 Dec 21 1997 ounix.ok 2 drwxr-xr-x 2 root wheel 512 Jan 6 1998 sbin 2 lrwxr-x--x 1 root wheel 11 Dec 21 1997 sys -> usr/src/sys 2 drwxrwxrwt 2 root owner 512 Jan 8 1998 tmp 38 -rwxr-xr-x 1 root wheel 19052 Aug 4 1997 toyset 2 lrwxr-x--x 1 root wheel 5 Jul 28 1997 u -> /user 288 -rwxr-x--x 1 root wheel 146620 Jan 6 1998 unix 272 -rwxr-x--x 1 root wheel 138535 Jan 6 1998 unix.ok 2 lrwxr-x--x 1 root wheel 9 Jul 28 1997 user -> /usr/user 2 drwxr-xr-x 2 root wheel 512 Sep 7 1987 usr 2 drwxr-xr-x 5 root wheel 512 Jul 7 1997 var 2 lrwxr-x--x 1 root wheel 4 Jul 28 1997 vmunix -> unix 2 -rw-r----- 1 root wheel 623 Jul 28 1997 xp0_disklabel 2 -rw-r----- 1 root wheel 623 Jan 8 1998 xp1_disklabel 2 -rw-r----- 1 root wheel 623 Jan 8 1998 xp2_disklabel