[TUHS] 1bsd compatible ar utility
Clem Cole via TUHS
tuhs at tuhs.org
Thu Jul 23 14:00:29 AEST 2026
2BSD was released during the V7 transition - in fact V7 was just coming up
on the Cory Hall 11/70 (which was the home system for Bill before Ernie).
If you look at many of the user space code on the 2BSD tape, such as Pascal
and cshell to take two, they are not using Dennis standard I/O nor many of
the new features of the updated C compiler. In fact, Pascal is especially
dirty (I’ve never tried but I wouldn’t be surprised is the Pascal on the
1BSD tape can build on Fifth Edition).
By the time of the 2BSD tape, UCB had not fully transitioned to V7 across
the campus. I suspect this was a large part of why Bill tried to make it
all work on V6 as well as V7. His one concession to V7 was using Ken’s
replacement for tp, tar to write the tape since it didn’t gave a fixed size
directory like tp. But as a acknowledgement to V6 users, if you look he
puts a binary of the a V7m tar on the front of the tape that was linked so
it would work in Sixth Edition to read the tape (a.k.a. v6tar). But to do
that he does assume the updated magnetic tape drivers work on your V6
system - which by that point was very wide spread, since they improved the
functionality from Dennis’s original version - fully supporting the idea of
“files” on the tape with proper file marks and dual file marks for EOT as
was standard throughout the rest of the computer industry (there is an ASA
spec - X3.4 and X3.22 if I remember correctly defined the physical
recording and the original Unix research tape drivers didn’t fully follow
it. As I said the Harvard tape has the updated versions, which Dennis took
back in V7). Note this should not be confused with the much later ANSI
X3.27 logical format that was the basis for many DEC tape formats, which
you can think of as analogous to tar. But under covers a program that
writes/reads a X3.27 logical format tape needs/assumes that the driver and
tape transport supports the physical formatting scheme which ASA had
defined years earlier.
Sent from a handheld expect more typos than usual
On Wed, Jul 22, 2026 at 11:05 PM Will Senn <will.senn at gmail.com> wrote:
> Clem,
>
> That sure explains a lot of the pain. I shoulda known better than to think
> it'd be straightforward :)....
>
> V6->50 fixes->Harvard tape->typsetter C->BSD1->... BSD2?
>
> Where does V7 fit - post BSD2?
>
> Wow. On paper it all sounded reasonable, unfortunately the paper's a
> little thin. I'm going to try 50 fixes as my next V6 project.
>
> Thanks,
>
> Will
> On 7/22/26 8:16 PM, Clem Cole wrote:
>
> Will,
>
> The issue is you are skipping a few steps as it turns out. BSD (a.k.a.
> What we call 1BSD) probably cannt be installed on virgin V6 distribution.
> By the time it was released there were two important V6 updates in the wild
> that most likely of us (like Joy at UCB did) had already installed. The
> most important is the 50 fixes from Ken. That is likely to get the
> kernel itself closer to what Bill was running (remember Jen had already
> done is sabbatical at UCB so all of those were there). The second is the
> first USENIX tape, often called the Harvard tape. That will have a number
> of utilities such as the updated ar and two new versions of tp (the C
> rewrite from assembled and super tp - stp - which already started to become
> the standard as it had some more graceful error support such as a second
> copy of it directory at the end of tape). Note to use tp (or v6tar which
> Bill gives you a binary) you’ll need an updated tape driver. All of that
> in on the Harvard tape - but I’ve forgotten exactly where.
>
> The other issue is the compiler. Dennis has updated C and released his
> replacement for Lesk’s portable C library with his new I/O library libS.a.
> This compiler was bundled with the troff kit, as is often referred to as
> “Typesetter C.” It is also compiler Dennis and Brian are discussing in
> K&R1. Sadly we can’t seem to find a copy of that distribution but we have
> mostly reconstructed much of it from other systems.
>
> That compiler plus some other additions, ended up in V7 and libS.a was
> folded into libc.a.
>
> We had that compiler at CMU by 1976/77 timeframe, and I’m fairly sure UCB
> had it also. As I said it’s the compiler from K&R1 and a lot of sites (I
> would suspect that most of the core USENIX sites outside of the Bell
> System were using it, so Bill expecting it he there was really not
> surprising.
>
>
> Talk to me offline and I can try help you with much of your stumbles. I
> have gotten much of the original BSD tape to work. FWIW Noel Chiappa’s
> MIT V6++ system is probably the most comfortable V6 I’ve seen, as it has
> most things you might expect. It has pretty much all the major upgrades
> the we all tried to add to our V6 system. Im not 100% sure, but I would be
> surprised if he don’t have Dennis compiler. If might also want to you look
> at
> https://www.tuhs.org/Archive/Distributions/Research/Tim_Shoppa_v6/README Tim
> Shoppa V6 system from UBC is also fairly complete.
>
> Clem
>
>
> Sent from a handheld expect more typos than usual
>
> On Wed, Jul 22, 2026 at 7:17 PM Will Senn via TUHS <tuhs at tuhs.org> wrote:
>
>>
>> On 7/22/26 3:34 PM, Will Senn wrote:
>> >
>> > On 7/22/26 2:56 PM, segaloco via TUHS wrote:
>> >> On Wednesday, July 22nd, 2026 at 12:20, Will Senn via TUHS<
>> tuhs at tuhs.org> wrote:
>> >>
>> >>> Hi All,
>> >>>
>> >>> I am working through a 1BSD installation on Research Unix V6.
>> >>> The||cont.a archives use magic |0177545|, which stock V6 ar does not
>> >>> understand. V7 appears to be able to, but on V6 it immediately dies
>> with
>> >>> |Bad system call|. Inspection shows references to later calls
>> including
>> >>> |access|and |ioctl|, so it appears to have been linked against a
>> post-V6
>> >>> libc. I came across some old emails talking about this and an nar
>> >>> utility... Does anyone know where the source for this |nar|utility
>> >>> lives, or of a V6-native |ar|that supports |0177545|archives?
>> >>>
>> >>> newoldar on the host works fine, too, but I'd rather not extract on
>> the
>> >>> host. I'm hoping to do this native. I'm working with a pristine v6
>> >>> installed from tape on pdp 11/70 with split I/D and FPP (opensimh).
>> >>>
>> >>> 1BSD doesn't include an ar utility in the tarball on TUHS. Did folks
>> not
>> >>> do this from pure v6? or what?
>> >>>
>> >>> Thanks,
>> >>>
>> >>> Will
>> >>>
>> >> Both USG PG3 and PWB1 have copies of ar(I) featuring the NARMAG value
>> of 0177545, they may prove useful.
>> >>
>> >>
>> https://www.tuhs.org/cgi-bin/utree.pl?file=USG_PG3/usr/source/cmd1/ar.c
>> >> https://www.tuhs.org/cgi-bin/utree.pl?file=PWB1/sys/source/s1/ar.c
>> >>
>> >> - Matt G.
>> >
>> > Thanks, Matt,
>> >
>> > I pulled the PWB1 |ar.c|, made a few small changes for stock V6
>> > compatibility (just enough for t and x support), and compiled it
>> > natively under V6. The resulting binary successfully lists and
>> > extracts the |0177545|1BSD archives.
>> >
>> > So the archive problem is "solved". Much appreciated.
>> >
>> > Will
>> >
>>
>> The archive problem got solved, but I don't think 1bsd is truly meant
>> for a pristine v6 from tape. ex, apparently requires a v7 cc, and ashell
>> core dumps on syscalls that don't exist in v6:
>> ./ashell
>> Bad system call -- Core dumped
>>
>> READ_ME (for ashell):
>>
>> cat READ_ME
>> Wed Oct 19, 1977
>>
>> This directory contains the source for a shell.
>> It requires floating point to do the time command which is built-in
>> so you will have to cc it -f on machines without floating point.
>> It also requires a version 7 C compiler.
>>
>> Accurate documentation is in the file "sh.6" to be nroffed with
>> /usr/man/man0/naa and a new "version 7" nroff.
>>
>> This shell requires the "htmp" data base also used by the editor "ex".
>> If you do not set it up so that the "sethome" command is done by "login"
>> then you should use the old "osethome" routine in ../s6 rather than
>> "sethome"
>> and reenable the execl of this sethome in the file "sh.c" (with the
>> correct
>> pathname).
>>
>> Bill Joy
>> CS Division
>> Department of EE and CS
>> UC Berkeley
>> Berkeley, California 94704
>>
>> (415) 524-4510 [HOME]
>> (415) 642-4948 [SCHOOL]
>>
>> Some of the utilities work fine:
>>
>> # ./version
>> char version[] "October 10, 1975";
>> # ./version | ./wc
>> 1 5 35
>>
>> but as I'm really just trying (again, but with more knowledge than
>> before and an AI assist to boot) to recreate the experience of doing
>> this the hard way, I want to get ashell working, pascal, ex, trek, etc.
>> Any hints or tips on getting the correct starting evirons set up
>> appreciated.
>>
>> Will
>>
>
More information about the TUHS
mailing list