Installation of 2.11BSD on SIMH

http://vak.ru/doku.php/proj/pdp11/211bsd#create_disk_image

I assume you have SIMH binary “pdp11” available. You can download a binary version for Linux from here.

For impatient: you can get the resulting root disk image from here: "211bsd.dsk.gz" (gzipped 29 Mbytes, unpacked 170 Mbytes). To boot, ungzip the disk image and use the following SIMH commands:

sim> set cpu 11/44 1M
sim> attach rp0 211bsd.dsk
sim> boot rp0

On boot prompt ‘:’, just hit Enter. On single user prompt, type ^D. Login as root, password is empty.

Download files

To install 2.11BSD you need a file "211bsd.tap.gz" (gzipped 28 Mbytes), which contains an image of distribution tape. Ungzip it before installation.

The original 2.11BSD distribution files could be found at The Unix History archive, but you will not need them.

The tape contains following files:

File Size Contents
0 512*1 primary tape boot block

512*1 boot block (some tape boot ROMs go for this copy)

512*69 standalone boot program
1 1024*37 standalone disklabel
2 1024*33 standalone mkfs(8)
3 1024*35 standalone restor(8)
4 1024*32 standalone icheck(8)
5 10240*285 dump of ..root.. file system
6 10240*3368 tar dump of /usr, excepting /usr/src
7 10240*519 tar dump of /usr/src/include and /usr/src/sys
8 10240*4092 tar dump of /usr/src, excepting include and sys

Create disk image

Create an RP06 disk image file “root.dsk”. Device RP06 has C/H/S geometry 815/19/22, total 815*19*22/2 = 170335 kbytes.

$ dd bs=1k count=170335 < /dev/zero > root.dsk

Another choice is RP05 with geometry 411/19/22, total 85899 kbytes.

Create script for simulator

Create file “install.simh”:

set cpu 11/44 1M
show cpu
attach tm0 211bsd.tap
attach rp0 root.dsk
boot tm0

Run simulator

Run SIMH:

$ pdp11 install.simh

You will see:

PDP-11 simulator V3.6-1
Disabling XQ
CPU, 11/44, FPP, NOCIS, autoconfiguration on, 1024KB

44Boot from tm(0,0,0) at 0172522
:

Disklabel

To start disklabel, enter “tm(0,1)” :

: tm(0,1)
Boot: bootdev=0401 bootcsr=0172522
disklabel
Disk?

Enter “xp(0,0)”.

Modify disklabel, create:

  1. partition ‘c’ on a whole disk - size 340670, offset 0, type unused
  2. partition ‘b’ for swap - size 8360, offset 332310, type swap
  3. partition ‘a’ for root - size 332310, offset 0, type 2.11BSD

The manual on using standalone disklabel is available at page 50 of 2.11BSD installation guide.

You must see:

3 partitions:
# size offset fstype [fsize bsize]
a: 332310 0 2.11BSD 1024 1024 # (Cyl. 0 - 794)
b: 8360 332310 swap # (Cyl. 795 - 814)
c: 340670 0 unused 1024 1024 # (Cyl. 0 - 814)

Do not forget to write a new label to disk before quit. After quit you will see boot prompt again:

44Boot from tm(0,0,1) at 0172522
:

Create root filesystem

To create root filesystem, enter “tm(0,2)”:

Boot: bootdev=0402 bootcsr=0172522
Mkfs
file system:

Enter “xp(0,0)”. Then enter default values:

file sys size [166155]:
bytes per inode [4096]:
interleaving factor (m; 2 default):
interleaving modulus (n; 209 default):
isize = 41536
m/n = 2 209
Exit called

44Boot from tm(0,0,2) at 0172522
:

Restore root filesystem

To restore the root file system, type “tm(0,3)”:

Boot: bootdev=0403 bootcsr=0172522
Restor
Tape?

For tape, enter “tm(0,5)”. For disk, enter “xp(0,0)”:

Tape? tm(0,5)
Disk? xp(0,0)
Last chance before scribbling on disk.

Type a carriage return to start. When restore finished, you will see:

End of tape

44Boot from tm(0,0,3) at 0172522
:

Boot from disk

To boot from disk, type “xp(0,0)unix”:

Boot: bootdev=05000 bootcsr=0176700

2.11 BSD UNIX #115: Sat Apr 22 19:07:25 PDT 2000
[email protected]:/usr/src/sys/GENERIC


phys mem = 1048576
avail mem = 824640
user mem = 307200

June 8 21:21:24 init: configure system

hk 0 csr 177440 vector 210 attached
ht ? csr 172440 vector 224 skipped: No CSR.
ra 0 csr 172150 vector 154 vectorset attached
rl 0 csr 174400 vector 160 attached
tm 0 csr 172520 vector 224 attached
tms 0 csr 174500 vector 260 vectorset attached
ts ? csr 172520 vector 224 interrupt vector already in use.
xp 0 csr 176700 vector 254 attached
erase, kill ^U, intr ^C
#

You are in single-user Unix now!

To make disk bootable, you need to install an RP06 boot record:

# dd if=/mdec/hpuboot of=/dev/rxp0a count=1

Set date:

# date yymmddhhmm

Read /usr

Now we need to read /usr from tape.

# cd /dev
# rm *mt*
# ./MAKEDEV tm0
# sync
# cd /usr
# mt rew
# mt fsf 6
# tar xpbf 20 /dev/rmt12
# sync

Done /usr.

Read /usr/src

Now read sources from tape to /usr/src:

# mkdir /usr/src
# cd /usr/src
# mt -f /dev/rmt12 fsf
# tar xpbf 20 /dev/rmt12
# sync
# mt -f /dev/rmt12 fsf
# tar xpbf 20 /dev/rmt12
# cd /
# chmod 755 / /usr /usr/src /usr/src/sys
# sync

Fix fstab and swap

Edit /etc/fstab and replace /dev/ra0 by /dev/xp0. Use vi editor.

Set swapping on /dev/xp0b:

# cd /dev
# rm swap drum
# mknod swap b 10 1
# mknod drum b 10 1
# sync

All done. After installation, you will have 80 magabytes free space:

# df
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/xp0a 163557 82734 80823 51% /

How to stop

To stop the system cleanly, run:

halt

and wait until SIMH prompt appears:

syncing disks... done
halting

HALT instruction, PC: 000014 (MOV #1,17406)
sim>

Then enter “q”.


你可能感兴趣的:(Installation of 2.11BSD on SIMH)