[TUHS] 1bsd compatible ar utility

Will Senn via TUHS tuhs at tuhs.org
Thu Jul 23 09:17:36 AEST 2026


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