Tuesday, July 28, 2020

mounting tar files in v7

How to mount a tar file in v7 running in SimH

This was difficult to figure out, but perseverance, tuhs, and simh mailing lists helped.

Modern tar files are easy to mount as tapes in SimH (theoretically):

In SimH:
ATTACH TM0 -V -F TAR whatever.tar

 In guest (v7):
tar xv0

But, some tar files (back in the day stuff), don't work this way. In order to get them to work requires some work.

1. Get Wolfgang Helbig's enblock program - http://doc.cat-v.org/unix/v6/operating-systems-lecture-notes/v6/enblock.c
aria2c http://doc.cat-v.org/unix/v6/operating-systems-lecture-notes/v6/enblock.c

2. compile it and put it somewhere useful - ~/bin or somesuch
cc -o enblock enblock.c
cp enblock ~/bin/

3. Get a useful old tarball - https://www.tuhs.org/Archive/Distributions/UCB/2bsd.tar.gz
aria2c https://www.tuhs.org/Archive/Distributions/UCB/2bsd.tar.gz

4. Unzip the tarball and enblock it
gunzip 2bsd.tar.gz
cat 2bsd.tar | enblock > 2bsd.tap

5. Do the simh/v7 dance
in SimH:
att tm0 2bsd.tap

in v7:
tar xv0

tar: bin/ - cannot create
x bin/csh, 40412 bytes, 79 tape blocks
tar: bin/etc/ - cannot create
x bin/etc/htmp, 0 bytes, 0 tape blocks
x bin/etc/install, 81 bytes, 1 tape blocks
Don't worry too much about the cannot create messages - the dirs get created.

No comments:

Post a Comment

All comments are moderated. Use discretion.