below
On Fri, Dec 4, 2015 at 12:02 AM, Will Senn <will.senn(a)gmail.com> wrote:
> 1. a utility on the host that is capable of copying a directory and its
> contents, recursively, onto a blank magtape/dectape/rk image that is then
> readable in the v6 environment
>
Right - you want a common archive format between the two systems that talk
to the tape device.
You can either create your own or better take on the old ones that exist.
> 2. a tar and unzip binary for v6 that is capable of dealing with the
> tarball (but isn't the tarball going to exceed the max file size anyway, if
> so this won't work)
>
I think you have a many to chose from off the top of my head I can think of
each with different advantages (more in a minute):
- tar
- cpio
- tp/stp
- ar (new format)
You seem to also want a compression tool, but you might try compressing on
the modern system - but there are solution here also.
- pack/unpack was the old v5/v6 compression tool - I've forgotten where
it was sourced check the first USENIX tape in 77
- porting a modern zip/gzip/bzip
> 3. an alternative archiver that runs on FreeBSD or Mac OS X, that can
> create a single file archive from a subdirectory's contents on the host
> (the resultant file would need to be extractable on v6, and if file size is
> too limited, won't work either).
>
That is a lot of work and unless this is going to be a very long term
thing, I'm not so sure it's worth it. Basically you want a virtual FS on
the v6 system and the simulator. If you are going to do this alot, then
its worth it. Think the VFS that vmware and like offer.
> 4. some kind of directory transfer utility that works over telnet that can
> be executed from a FreeBSD or Mac OS X host and that can be executed on the
> v6 system as well.
>
the original unix kermit will compile using the v6 compiler (maybe the
v5) compiler. You have to dig in the archives, but you want a version
from Columbia circa 1977 and you be fine. The latest version will use
things in the language first described in the white book - aka Typersetter
C (Dennis was wrote the book starting with v6, but's not published until
v7). If you a later compiler running on v6 you'll be fine.
> 5. a utility capable of creating an empty magtape/dectape/rk image and
> another capable of making a filesystem on the image and another of
> populating the image (analogous to fdisk rkimage; mkfs rkimage; rkcopy dir
> rkimage)
>
You could move the file system creation tools and set of a virtual v6 FS.
It's a lot of work and unless this is going to be a very long term thing,
I'm not so sure it's worth it.
As for the archivers which in the short term is likely to be your best bet:
1. tar - there a couple of versions of tar for v6 including binaries.
I personally would start there.
2. cpio was written for PWB 1.0 which is v6 kernel based. That binary
should run. But IIRC correctly the original cpio was only binary headers
(the -c/ascii headers was added later). So you'll need to be careful on
the modern computer and make sure you set the switches so that he created
the proper endian/byte swapping -- ness in the header
3. tp/stp - on the original USENIX tape is a "super tp" that replaced
the original one. The binary should run as is. The code for it is
pre-K&R so compiling it with a modern compiler will be a little bit of
work. Also, IIRC the "directory" which is on the front of the tape is
binary, so you'll need to make sure you write everything in PDP-11 format.
4. ar - was updated by the community. Eventually, V7 took the "new ar"
from original USENIX tape. Again that binary should just run fine.
Although I don't think its directory is recursive so it may fail that
requirement for you
Clem
All,
I am trying to figure out how to get parts of 1BSD added into a pristine
v6 install, but the question I have relates to moving more than a
handful of files from a host system into v6, which lacks several
capabilities that are taken for granted from v7 onward (tar, unzip, and
so on).
For background, in looking at the 1bsd tarball, exploded out, I saw that
ex was available on the tape in a binary form that is suitable for a
PDP-11/40 and I thought it would make life easier in v6 to have ex. So,
I used dd to move the a.outNOID file onto a file, which can be used as
a raw RK image and then off the RK image loaded in the PDP-11 into the
v6 system as the executable file ex, and that worked. I was able to run
ex (well, sort of, I get the colon prompt anyway... I haven't figured
out how it actually works yet). Yeeha! Having had success of a sort with
a single executable from the 1BSD tape, I would like to see if other
parts of 1BSD will work in the environment and if I can properly install
those parts.
Individually moving files using dd is tedious in the extreme (there are
many files in the tarball). I know there has to be a better way. Since
v6 doesn't have tar, or unzip, it doesn't seem likely that using dd to
move the tarball into v6 will be help matters. But, if there was a way
to dd a subdirectory and its contents onto an RK image and get them off
again into a useable v6 file system, that would work.
My question for the group is based on the preceding discussion and the
following assumption:
1. given a tarball such as 1bsd.tar.gz from the TUHS archive located at:
/PDP-11/Distributions/ucb
2. with a running SimH PDP-11/40 instance
with a virtual TU10 magtape
with a virtual TU56 dectape
with a virtual RK05 hard drive
3. running v6 as the operating system
What is an efficient method of moving the files of the 1bsd
distribution, or any other set of files and directories, into the v6
operating environment?
Here are some approaches that seem reasonable, but that I haven't been
able to figure out, if you know better, please do tell:
1. a utility on the host that is capable of copying a directory and its
contents, recursively, onto a blank magtape/dectape/rk image that is
then readable in the v6 environment
2. a tar and unzip binary for v6 that is capable of dealing with the
tarball (but isn't the tarball going to exceed the max file size anyway,
if so this won't work)
3. an alternative archiver that runs on FreeBSD or Mac OS X, that can
create a single file archive from a subdirectory's contents on the host
(the resultant file would need to be extractable on v6, and if file size
is too limited, won't work either).
4. some kind of directory transfer utility that works over telnet that
can be executed from a FreeBSD or Mac OS X host and that can be executed
on the v6 system as well.
5. a utility capable of creating an empty magtape/dectape/rk image and
another capable of making a filesystem on the image and another of
populating the image (analogous to fdisk rkimage; mkfs rkimage; rkcopy
dir rkimage)
If I am asking the wrong questions, or thinking badly, I would
appreciate a steer in the right direction.
Regards,
Will
> From: Will Senn <will.senn(a)gmail.com>
> I am studying Unix v6 using SimH and I am documenting the process
I did a very similar exercise using the Ersatz11 simulator; I have a lot
of stuff about the process here:
http://www.chiappa.net/~jnc/tech/V6Unix.html
It contains a number of items that you might find useful, e.g.: "V6 as
distributed is strictly a 20th Century operating system. Literally. You can't
set the date to anytime in the 21st century, for two reasons. First, the
'date' command only take a 2-digit year number. Second, even if you fix that,
the ctime() library routine has a bug in it that makes it stop working in the
closing months of 1999."
> the PDP architecture
Technically, a PDP-11 - there were a number of different PDP architectures:
https://en.wikipedia.org/wiki/Programmed_Data_Processor
is a decent listing of them; several (PDP-8, PDP-10, etc) were very popular
and successful.
A few things I noted in your first post:
> I am using the Ken Wellsch tape because it boots and is stated to be
> identical to Dennis Ritchie's tape other than being bootable and having
> a different timestamp on root.
The only differences I could discover between the two are that in the Wellsch
versions i) a Western Electric rights notice (which prints on booting) has
been added to ken/main.c, and the Unix bootable images; and ii) the RK pack
images do have, as you noted, the bootstrap in block 0.
> Note: sh is critically important, don't muck it up :). The issue is
> that if you do, there really isn't an easy way to recover.
One should _never_ install a new shell version as '/bin/sh' until it has been
run and tested for a while (for the exact reason you mention). Happily, in
Unix, as far as the OS is concerned, the command interpreter is just another
program, so it's trivial to name a new binary of the shell 'nsh' or
something, and run that for a while to make sure it's working OK, before
installing it as '/bin/sh'.
> a special file (whatever that is)
Special files are UNIXisms for 'devices'. _All_ devices in Unix appear as
'special files' in the file system, usually (but not necessarily) in /dev -
that location is a convention, not a requirment of the OS.
Noel
On Sun, Nov 29, 2015 at 08:55:23PM -0800, Paul McJones wrote:
> Thanks very much for making the original and the OCR-enhanced versions
> of Doug’s scan of the “UnixEditionZero” document available
> on tuhs.org. I notice that even with Nelson’s enhanced version,
> the file size is still large for a scanned text document, apparently
> because it was originally scanned in RGB mode, 24 bits/pixel. The
> attached version is 2.5MB, and to my eye is identical looks identical
> to UnixEditionZero-OCR.pdf.
Paul, I've added your version into the same directory. Thanks!
Warren
Hi all,
In v2 no5 AUUGN Jun-Jul 1980, Andy Tanenbaum announced the availability of a Portable Pascal Compiler for the then proposed ISO standard. A tape was made for v6, v7, and non-unix platforms. Does anyone know if there is a tape image around that has the distro?
On a related note, has anyone successfully installed 1BSD on a v6 install running in SImH? 1BSD has the Berkeley Pascal Instructional system on it.
Regards,
Will
Sent from my iPhone
I'm too tired to dig for the exact words in the ISO standard,
but I had the impression that the official C rule these days
is that the effect of writing on a string literal is undefined.
So it's legal for an implementation to make strings read-only,
or to point several references to "What's the recipe today, Jim"
to one copy of the stripng in memory, and even to point uses of
"Jim" to the tail of the same string. Or both.
It is also legal for every string literal to reside in its own
memory and to be writable, but since the effect is undefined,
code that relies on that is on thin ice, especially if meant to
be portable code.
I have used, and even fixed (unrelated) bugs in, a compiler
that merged identical strings. I forget whether it also looked
for suffix matches. Whether the strings went in read-only
memory was up to the code generator (of course); in the new
back-end I wrote for it, I made them so. This turned up quite a
few fumbles in very-old UNIX code that assumed unique, writable
string literals, especially those that called mktemp(3). To my
mind that just meant the programs needed to be fixed to match
current standards (just as many old programs needed fixes to
compile without error in ISO C), so I fixed them.
I didn't (and still don't) like Joy's heavy-handed hack, but I
see his point, and think it's just fine for the language rules
to allow the compiler to do it hacklessly.
Norman Wilson
Toronto ON
I've gotten sucked into an embedded system project and they are running out of
memory. I have a vague memory of some sort of tool that I think Bill Joy
wrote (or maybe he told me about it) that would do some magic processing of
all the string constants and somehow it de-dupped the space.
Though now that I'm typing this that doesn't seem possible. Does this ring
a bell with anyone? I'm sure it was for the PDP 11 port.
Thanks,
--lm
Thanks, Doug and Warren, for the new files at
http://www.tuhs.org/Archive/PDP-11/Distributions/research/McIlroy_v0/
At the TUHS mirror at my site, you can find an additional file
http://www.math.utah.edu/pub/mirrors/minnie.tuhs.org/PDP-11/Distributions/r…ftp://ftp.math.utah.edu/pub/mirrors/minnie.tuhs.org/PDP-11/Distributions/re…
that is less than half the size, and is (somewhat) searchable, thanks
to Adobe Acrobat Pro 11 OCR conversion. Please include that in the
TUHS master archive, even renaming it to the original file, if you
wish.
I like the beginning of "Section 2. Hardware", where Dennis wrote:
>> ...
>> The PDP-11 on which UNIX is implemented is a 16-bit 12K computer,
>> and UNIX occupies 8K words. More than half of this space, however, is
>> utilized for a variable number of disk buffers; with some loss of
>> speed the number of buffers could be cut significantly.
>> ...
How much more powerful early Unix was compared to CP/M and MS-DOS, in
a small fraction of their memory space!
-------------------------------------------------------------------------------
- Nelson H. F. Beebe Tel: +1 801 581 5254 -
- University of Utah FAX: +1 801 581 4148 -
- Department of Mathematics, 110 LCB Internet e-mail: beebe(a)math.utah.edu -
- 155 S 1400 E RM 233 beebe(a)acm.org beebe(a)computer.org -
- Salt Lake City, UT 84112-0090, USA URL: http://www.math.utah.edu/~beebe/ -
-------------------------------------------------------------------------------
> Woe betide the user if any string was changed at run time...
That was then. Now it would be OK to do so for const data.
(Unless the tool chain has discarded const indications.)
Doug