Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wip #1

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 60 additions & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,63 @@ Warning!!!
Running this script may result in data lost.
Backup everything, read carefully and ammend when needed.

Tested on PIDP11 2.11BSD released image on top of Simh
Last updates tested on PIDP11 2.11BSD released image on top of Simh

Early updates tested on top of 2.11BSD-pl195.tar

This tourist install notes may help to create the 195 disk image:

* Create tape

./mksimtape bootstrap:512 disklabel.bin:1024 mkfs.bin:1024 \
restor.bin:1024 icheck.bin:1024 root.dmp:10240 usr.tar:10240 \
sys.tar:10240 src.tar:10240 > 195.tape


* Configure simh

;;; simh.ini
SET CPU 11/93, 4M
SET CPU IDLE

SET RP ENABLE
SET RP0 ENABLE, RP06, WRITEENABLED
ATTACH RP0 ./2.11BSD

SET TS ENABLE
SET TS0 CAPAC=0,LOCKED
ATTACH TS0 ./195.tape

SET DLI ENABLE
SET DLI LINES=2
ATTACH DLI 10001
SET DLO0 NODATASET,7B
SHOW DLO0

BOOT TS0
;;; end simh.ini

* Use disklabel ts(0,1) to create partitions
Tool introduced at Patch Level 250 (TODO: more info)
* Use mkfs ts(0,2) to create filesystems
Newer versions of mkfs will not work
* Use restor ts(0,3) to root.dmp ts(0,5) to disk xp(0,0)
* Write sector code (/mdec/dvhpuboot). I've used a recent version due to dd
problems (TODO: more info)
* Boot unix from disk. Setup /etc/fstab
* Restore /usr files
cd /usr
mt rew ; mt fsf 6 ; tar xvpbf 20 /dev/rmt12
mkdir /usr/src ; cd /usr/src
mt rew ; mt fsf 7 ; tar xvpbf 20 /dev/rmt12
mt rew ; mt fsf 8 ; tar xvpbf 20 /dev/rmt12
* Backup your disk image
Mine is here (until: 2020-03-16):
https://ufile.io/f48cagcn
* Setup the Updater:
Download patches (or setup network on 2.11 for FTP usage)
Use maketape.sh to generate a new tape. Setup simh and reboot
cd /home/user
mt rew ; tar xvpbf 20 /dev/rmt12
* Destroy your system: sh updater.sh
* Submit your updates/ scripts!
29 changes: 28 additions & 1 deletion getNslice.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,34 @@ EOF
fi

## Slice
sed -e '1,/.*---cut here---.*/ d' < ./patches/$PATCH > /tmp/$PATCH.artifact

case "$PATCH" in
1|2|3)
cat ./patches/$PATCH > /tmp/$PATCH.artifact
;;
100)
sed -e '1,/another issue/ d' < ./patches/$PATCH > /tmp/$PATCH.artifact
;;
184)
sed -e '1,/====snip/ d' < ./patches/$PATCH > /tmp/$PATCH.artifact
;;
448)
sed -e '1,/pdp is alive.*/ d' < ./patches/$PATCH > /tmp/$PATCH.artifact
;;
*)
sed -e '1,/.*[-|=].*[c|C]ut\ *here/ d' < ./patches/$PATCH > /tmp/$PATCH.artifact
grep -c '' /tmp/$PATCH.artifact > /dev/null
if [ "$?" != "0" ]
then
sed -e '1,/^======/ d' < ./patches/$PATCH > /tmp/$PATCH.artifact
fi
grep -c '' /tmp/$PATCH.artifact > /dev/null
if [ "$?" != "0" ]
then
sed -e '1,/\*\*\*/ d' < ./patches/$PATCH > /tmp/$PATCH.artifact
fi
;;
esac

## Clean
#rm ./patches/$PATCH
4 changes: 4 additions & 0 deletions maketape.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
cd ..
rm -fv 211BSDupdater.tar
tar cf 211BSDupdater.tar 211BSDupdater/*
211BSDupdater/mksimtape 211BSDupdater.tar > 211BSDupdater.tar.tape
6 changes: 5 additions & 1 deletion updater.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
#!/bin/sh

CURRENT=`grep "Current Patch Level:" /VERSION | head -1 | awk '{print $4}'`
echo Current 2.11 Patch Level: $CURRENT

PATCH=`echo $CURRENT+1|bc`
export PATCH

while (test -e ./updates/$PATCH)
while (test -r ./updates/$PATCH)
do
echo Updating to 2.11 Patch Level: $PATCH
sh ./getNslice.sh $PATCH
sh ./updates/$PATCH
CURRENT=`grep "Current Patch Level:" /VERSION | head -1 | awk '{print $4}'`
PATCH=`echo $CURRENT+1|bc`
done

sh ./updates/kernel.sh NOW-OR-NEVER
30 changes: 30 additions & 0 deletions updates/196
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/sh

PATCH=196
ARTIFACT_LINES=430
ARTIFACT_NAME=$PATCH

## Verify artifact
wc -l /tmp/$PATCH.artifact | \
grep -c "\ $ARTIFACT_LINES\ /tmp/" || \
exit 1

## Rename artifact
mv /tmp/$PATCH.artifact /tmp/$ARTIFACT_NAME

## Fix
cd / ; patch -p0 < /tmp/$ARTIFACT_NAME ; rm /tmp/$ARTIFACT_NAME

cd /usr/src/lib/ccom
make
make install
make clean

cd /usr/src/games/trek
make
make install
make clean

cd /usr/src/ucb
make sccs
install -s -m 755 sccs /usr/ucb/sccs
17 changes: 17 additions & 0 deletions updates/197
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh

PATCH=197
ARTIFACT_LINES=0
ARTIFACT_NAME=$PATCH

## Verify artifact
wc -l /tmp/$PATCH.artifact | \
grep -c "\ $ARTIFACT_LINES\ /tmp/" || \
exit 1

## Rename artifact
mv /tmp/$PATCH.artifact /tmp/$ARTIFACT_NAME

## Fix
mv /VERSION /VERSION.old && cat /VERSION.old | sed 's@Current Patch Level: '`echo $PATCH-1|bc`'@Current Patch Level: '$PATCH'@' > /VERSION
rm /tmp/$ARTIFACT_NAME
17 changes: 17 additions & 0 deletions updates/198
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh

PATCH=198
ARTIFACT_LINES=21
ARTIFACT_NAME=$PATCH

## Verify artifact
wc -l /tmp/$PATCH.artifact | \
grep -c "\ $ARTIFACT_LINES\ /tmp/" || \
exit 1

## Rename artifact
mv /tmp/$PATCH.artifact /tmp/$ARTIFACT_NAME

## Fix
mv /VERSION /VERSION.old && cat /VERSION.old | sed 's@Current Patch Level: '`echo $PATCH-1|bc`'@Current Patch Level: '$PATCH'@' > /VERSION
cd / ; sh /tmp/$ARTIFACT_NAME ; rm /tmp/$ARTIFACT_NAME
17 changes: 17 additions & 0 deletions updates/199
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh

PATCH=199
ARTIFACT_LINES=907
ARTIFACT_NAME=$PATCH

## Verify artifact
wc -l /tmp/$PATCH.artifact | \
grep -c "\ $ARTIFACT_LINES\ /tmp/" || \
exit 1

## Rename artifact
mv /tmp/$PATCH.artifact /tmp/$ARTIFACT_NAME

## Fix
mv /VERSION /VERSION.old && cat /VERSION.old | sed 's@Current Patch Level: '`echo $PATCH-1|bc`'@Current Patch Level: '$PATCH'@' > /VERSION
cd / ; sh /tmp/$ARTIFACT_NAME ; rm /tmp/$ARTIFACT_NAME
17 changes: 17 additions & 0 deletions updates/200
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh

PATCH=200
ARTIFACT_LINES=2481
ARTIFACT_NAME=$PATCH

## Verify artifact
wc -l /tmp/$PATCH.artifact | \
grep -c "\ $ARTIFACT_LINES\ /tmp/" || \
exit 1

## Rename artifact
mv /tmp/$PATCH.artifact /tmp/$ARTIFACT_NAME

## Fix
mv /VERSION /VERSION.old && cat /VERSION.old | sed 's@Current Patch Level: '`echo $PATCH-1|bc`'@Current Patch Level: '$PATCH'@' > /VERSION
cd / ; patch -p0 < /tmp/$ARTIFACT_NAME ; rm /tmp/$ARTIFACT_NAME
17 changes: 17 additions & 0 deletions updates/201
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh

PATCH=201
ARTIFACT_LINES=2902
ARTIFACT_NAME=$PATCH

## Verify artifact
wc -l /tmp/$PATCH.artifact | \
grep -c "\ $ARTIFACT_LINES\ /tmp/" || \
exit 1

## Rename artifact
mv /tmp/$PATCH.artifact /tmp/$ARTIFACT_NAME

## Fix
mv /VERSION /VERSION.old && cat /VERSION.old | sed 's@Current Patch Level: '`echo $PATCH-1|bc`'@Current Patch Level: '$PATCH'@' > /VERSION
cd / ; patch -p0 < /tmp/$ARTIFACT_NAME ; rm /tmp/$ARTIFACT_NAME
17 changes: 17 additions & 0 deletions updates/202
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh

PATCH=202
ARTIFACT_LINES=1007
ARTIFACT_NAME=$PATCH

## Verify artifact
wc -l /tmp/$PATCH.artifact | \
grep -c "\ $ARTIFACT_LINES\ /tmp/" || \
exit 1

## Rename artifact
mv /tmp/$PATCH.artifact /tmp/$ARTIFACT_NAME

## Fix
mv /VERSION /VERSION.old && cat /VERSION.old | sed 's@Current Patch Level: '`echo $PATCH-1|bc`'@Current Patch Level: '$PATCH'@' > /VERSION
cd / ; patch -p0 < /tmp/$ARTIFACT_NAME ; rm /tmp/$ARTIFACT_NAME
17 changes: 17 additions & 0 deletions updates/203
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh

PATCH=203
ARTIFACT_LINES=486
ARTIFACT_NAME=$PATCH

## Verify artifact
wc -l /tmp/$PATCH.artifact | \
grep -c "\ $ARTIFACT_LINES\ /tmp/" || \
exit 1

## Rename artifact
mv /tmp/$PATCH.artifact /tmp/$ARTIFACT_NAME

## Fix
mv /VERSION /VERSION.old && cat /VERSION.old | sed 's@Current Patch Level: '`echo $PATCH-1|bc`'@Current Patch Level: '$PATCH'@' > /VERSION
cd / ; patch -p0 < /tmp/$ARTIFACT_NAME ; rm /tmp/$ARTIFACT_NAME
17 changes: 17 additions & 0 deletions updates/204
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh

PATCH=204
ARTIFACT_LINES=948
ARTIFACT_NAME=$PATCH

## Verify artifact
wc -l /tmp/$PATCH.artifact | \
grep -c "\ $ARTIFACT_LINES\ /tmp/" || \
exit 1

## Rename artifact
mv /tmp/$PATCH.artifact /tmp/$ARTIFACT_NAME

## Fix
mv /VERSION /VERSION.old && cat /VERSION.old | sed 's@Current Patch Level: '`echo $PATCH-1|bc`'@Current Patch Level: '$PATCH'@' > /VERSION
cd / ; patch -p0 < /tmp/$ARTIFACT_NAME ; rm /tmp/$ARTIFACT_NAME
17 changes: 17 additions & 0 deletions updates/205
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh

PATCH=205
ARTIFACT_LINES=310
ARTIFACT_NAME=$PATCH

## Verify artifact
wc -l /tmp/$PATCH.artifact | \
grep -c "\ $ARTIFACT_LINES\ /tmp/" || \
exit 1

## Rename artifact
mv /tmp/$PATCH.artifact /tmp/$ARTIFACT_NAME

## Fix
mv /VERSION /VERSION.old && cat /VERSION.old | sed 's@Current Patch Level: '`echo $PATCH-1|bc`'@Current Patch Level: '$PATCH'@' > /VERSION
cd / ; patch -p0 < /tmp/$ARTIFACT_NAME ; rm /tmp/$ARTIFACT_NAME
17 changes: 17 additions & 0 deletions updates/206
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh

PATCH=206
ARTIFACT_LINES=708
ARTIFACT_NAME=$PATCH

## Verify artifact
wc -l /tmp/$PATCH.artifact | \
grep -c "\ $ARTIFACT_LINES\ /tmp/" || \
exit 1

## Rename artifact
mv /tmp/$PATCH.artifact /tmp/$ARTIFACT_NAME

## Fix
mv /VERSION /VERSION.old && cat /VERSION.old | sed 's@Current Patch Level: '`echo $PATCH-1|bc`'@Current Patch Level: '$PATCH'@' > /VERSION
cd / ; patch -p0 < /tmp/$ARTIFACT_NAME ; rm /tmp/$ARTIFACT_NAME
17 changes: 17 additions & 0 deletions updates/207
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh

PATCH=207
ARTIFACT_LINES=585
ARTIFACT_NAME=$PATCH

## Verify artifact
wc -l /tmp/$PATCH.artifact | \
grep -c "\ $ARTIFACT_LINES\ /tmp/" || \
exit 1

## Rename artifact
mv /tmp/$PATCH.artifact /tmp/$ARTIFACT_NAME

## Fix
mv /VERSION /VERSION.old && cat /VERSION.old | sed 's@Current Patch Level: '`echo $PATCH-1|bc`'@Current Patch Level: '$PATCH'@' > /VERSION
cd / ; patch -p0 < /tmp/$ARTIFACT_NAME ; rm /tmp/$ARTIFACT_NAME
17 changes: 17 additions & 0 deletions updates/208
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh

PATCH=208
ARTIFACT_LINES=1459
ARTIFACT_NAME=$PATCH

## Verify artifact
wc -l /tmp/$PATCH.artifact | \
grep -c "\ $ARTIFACT_LINES\ /tmp/" || \
exit 1

## Rename artifact
mv /tmp/$PATCH.artifact /tmp/$ARTIFACT_NAME

## Fix
mv /VERSION /VERSION.old && cat /VERSION.old | sed 's@Current Patch Level: '`echo $PATCH-1|bc`'@Current Patch Level: '$PATCH'@' > /VERSION
cd / ; patch -p0 < /tmp/$ARTIFACT_NAME ; rm /tmp/$ARTIFACT_NAME
17 changes: 17 additions & 0 deletions updates/209
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh

PATCH=209
ARTIFACT_LINES=492
ARTIFACT_NAME=$PATCH

## Verify artifact
wc -l /tmp/$PATCH.artifact | \
grep -c "\ $ARTIFACT_LINES\ /tmp/" || \
exit 1

## Rename artifact
mv /tmp/$PATCH.artifact /tmp/$ARTIFACT_NAME

## Fix
mv /VERSION /VERSION.old && cat /VERSION.old | sed 's@Current Patch Level: '`echo $PATCH-1|bc`'@Current Patch Level: '$PATCH'@' > /VERSION
cd / ; patch -p0 < /tmp/$ARTIFACT_NAME ; rm /tmp/$ARTIFACT_NAME
Loading