在这里你可以找到Unix v4磁带的内容,准备用于引导。
Here you can find the contents of the Unix v4 tape ready for bootstrapping

原始链接: http://squoze.net/UNIX/v4/README

本文详细介绍了使用SimH PDP-11模拟器从磁带镜像(`unix_v4.tap`)引导UNIX V4的过程。磁带包含一个文件系统归档文件(`unix_v4.tar`)和一个磁盘镜像(`disk.rk`)。初始提取将引导代码与磁盘镜像分离。 安装过程包括将RK05磁盘镜像从磁带转储到SimH中的虚拟磁盘,然后使用`uboot`从该磁盘启动。启动后,系统需要重新构建内核。这可以通过导航到`/usr/sys/run`并执行一系列`cc`和`as`命令来编译和链接必要的内核组件,从而创建一个新的内核镜像(`a.out`)。 最后,将新内核移动到`/nunix`,同步,并启动,从而获得一个可用的UNIX V4系统。未来的工作包括自动化安装、配置内核、添加设备文件和手册页,以及解决V4之前内核恢复和缓冲区处理的问题。

黑客新闻 新 | 过去 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 这里可以找到Unix v4磁带的内容,准备用于引导 (squoze.net) 32点 由 zdw 1天前 | 隐藏 | 过去 | 收藏 | 2评论 qingcharles 1天前 | 下一个 [–] 磁带首次读取:https://discuss.systems/@ricci/115747843169814700 磁带在PDP11模拟器上运行:https://oldbytes.space/@flexion/115752573933914452 回复 ChrisArchitect 1天前 | 上一个 [–] 之前:https://news.ycombinator.com/item?id=46331706 回复 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请YC | 联系 搜索:
相关文章

原文

Here you can find the contents of the UNIX v4 tape ready for bootstrapping, including a tar file of the filesystem.

  • unix_v4.tap is the original tape file in simh format
  • bootstrap are the first 38400 bytes of the tape
  • disk.rk is the rest of the tape, an RK05 image
  • unix_v4.tar is the filesystem extracted
  • install.ini is an ini file for simh to install the system
  • boot.ini is an ini file for simh to boot the system

At first I extracted the disk image manually from the tape, which resulted in bootstrap and disk.rk. These are really nothing more than the first 38400 bytes of the raw tape content and the rest. Because unix_v4.tap is block based, one first has to strip it of its block sizes to get the raw content.

Actually it's easier to just use the tape as it is and install a new system from it.

To install the system we just dump an RK05 disk image from tape to disk:

% pdp11 install.ini

[...]
        ; boot from TM0, now in mboot
=list
dldr
dtf
list
mboot
mcopy
rkf
tboot
uboot
=mcopy
'p' for rp; 'k' for rk
k
disk offset
0
tape offset
75
count
4000
=

Afterwards, we can just load uboot from tape to start UNIX:

=uboot
k
unix
mem = 64530

login: root
# ls
bin
dev
etc
lib
mnt
tmp
unix
usr
# sync
# sync
# sync
# ^E        ; end emulation

To boot the system we don't need the tape. Instead, we load uboot directly from the boot sector. We specify k for RK05, then the filename unix.

% pdp11 boot.ini

[...]
        ; boot from RK0, now in uboot
k
unix
mem = 64530

login: root
#

Put the following into /usr/sys/run:

rm -f low.o mch.o conf.o lib1 lib2

chdir ken
cc -c *.c
sh mklib
rm *.o

chdir ../dmr
cc -c *.c
sh mklib
rm *.o

chdir ..
cc -c conf/conf.c
mv conf/conf.o conf.o
as conf/low.s
mv a.out low.o
as conf/mch.s
mv a.out mch.o
ld -x low.o mch.o conf.o lib1 lib2

/usr/sys/ken/mklib:

ar r ../lib1 main.o
ar r ../lib1 alloc.o
ar r ../lib1 iget.o
ar r ../lib1 prf.o
ar r ../lib1 rdwri.o
ar r ../lib1 slp.o
ar r ../lib1 subr.o
ar r ../lib1 text.o
ar r ../lib1 trap.o
ar r ../lib1 sig.o
ar r ../lib1 sysent.o
ar r ../lib1 sys1.o
ar r ../lib1 sys2.o
ar r ../lib1 sys3.o
ar r ../lib1 sys4.o
ar r ../lib1 nami.o
ar r ../lib1 fio.o
ar r ../lib1 clock.o

/usr/sys/dmr/mklib:

ar r ../lib2 bio.o
ar r ../lib2 tty.o
ar r ../lib2 malloc.o
ar r ../lib2 pipe.o
ar r ../lib2 cat.o
ar r ../lib2 dc.o
ar r ../lib2 dn.o
ar r ../lib2 dc.o
ar r ../lib2 dn.o
ar r ../lib2 dp.o
ar r ../lib2 kl.o
ar r ../lib2 mem.o
ar r ../lib2 pc.o
ar r ../lib2 rf.o
ar r ../lib2 rk.o
ar r ../lib2 tc.o
ar r ../lib2 tm.o
ar r ../lib2 vs.o
ar r ../lib2 vt.o
ar r ../lib2 partab.o
ar r ../lib2 rp.o
ar r ../lib2 lp.o
ar r ../lib2 dhdm.o
ar r ../lib2 dh.o
ar r ../lib2 dhfdm.o

Then in /usr/sys:

# sh run
alloc.c:
clock.c:
fio.c:
iget.c:
main.c:
nami.c:
prf.c:
rdwri.c:
sig.c:
60: Warning: assignment understood
61: Warning: assignment understood
slp.c:
subr.c:
sys1.c:
sys2.c:
sys3.c:
sys4.c:
sysent.c:
text.c:
trap.c:
bio.c:
cat.c:
dc.c:
dh.c:
dhdm.c:
dhfdm.c:
dn.c:
dp.c:
dv.c:
kl.c:
lp.c:
malloc.c:
mem.c:
partab.c:
pc.c:
pipe.c:
rf.c:
rk.c:
rp.c:
tc.c:
tm.c:
tty.c:
vs.c:
vt.c:
#

Now install and boot the new kernel:

# mv a.out /nunix
# sync
# sync
# sync
# ^E
Simulation stopped, PC: 002040 (MOV (SP)+,177776)
sim> b rk
k
nunix
mem = 64529

login: root
#

There are a bunch of other things I would like to document (or do in the first place):

  • automatic installation (expect)
  • configure kernel (/dev/mem missing)
  • add device files
  • add man pages
  • try rp disk
  • try rf swap (ps assumes rf0)

Reconstruction:

  • get pre-v4 nsys kernel to work (buffer handling seems broken, i suspect synchronization bugs)
  • get B restoration to work
联系我们 contact @ memedata.com