Installing NetBSD 1.2 on the SIMH MicroVAX II
From Computer History Wiki
Installation of NetBSD 1.2 on the MicroVAX II is a little shaky... Also I found that the miniroot from 1.3 is far more stable, and doesn't page on itself...!!
To keep things simple I'm going to stick with the examples...
Contents
ini file
set cpu 16M att tq0 net12.tap set tq1 dis set tq2 dis set tq3 dis set rq0 rd54 att rq0 rd54.rq0 set rq1 rd54 att rq1 rd54.rq1 set rq2 dis set rq3 dis set cr dis set ry dis att ts dis set rl dis set lpt dis set xq dis set dz lines=8 boot cpu
building the tape
#!/usr/local/bin/perl -w use strict; # Based on mkdisttap.pl # ftp://ftp.mrynet.com/pub/os/PUPS/PDP-11/Boot_Images/2.11_on_Simh/211bsd/mkdist tap.pl # # $Id: mkdisttap.pl,v 1.1 2006/09/16 23:33:46 kirk Exp kirk $ # # Based on the example in the HOWTO using dd. Does not work! # add_file("cat mtboot mtboot boot |", 512); # Based on the maketape.c program and the maketape.data data file. add_file("tk50-file1-12", 512); end_file(); add_file("tk50-file2-13A", 512); end_file(); add_file("base.tar", 10240); end_file(); add_file("etc.tar", 10240); end_file(); add_file("man.tar", 10240); end_file(); add_file("games.tar", 10240); end_file(); add_file("comp.tar", 10240); end_file(); add_file("misc.tar", 10240); end_file(); add_file("text.tar", 10240); end_file(); add_file("ksrc.tar", 10240); end_file(); end_file(); sub end_file { print "\x00\x00\x00\x00"; } sub add_file { my($filename, $blocksize) = @_; my($block, $bytes_read, $length); open(FILE, $filename) || die("Can't open $filename: $!"); while($bytes_read = read(FILE, $block, $blocksize)) { if($bytes_read < $blocksize) { $block .= "\x00" x ($blocksize - $bytes_read); $bytes_read = $blocksize; } $length = pack("V", $bytes_read); print $length, $block, $length; } close(FILE); }
Preparing the hard disk
the instructions need us to know the geometry of a disk, and all of it's parameters.. So for me it's a tad daunting, but they do give an RD54 as an example. Here is the disktab entry:
rd54|RD54|DEC RD54 on Microvax:\ :ty=winchester:ns#17:nt#15:nc#1225:\ :dt=MSCP:\ :pa#15884:oa#0:ba#8192:fa#1024:\ :pb#33440:ob#15884:bb#8192:fb#1024:tb=swap:\ :pc#311200:oc#0:bc#8192:fc#1024:\ :pd#15884:od#49324:bd#4096:fd#512:\ :pe#55936:oe#65208:be#8192:fe#1024:\ :pf#190485:of#121144:bf#8192:ff#1024:\ :pg#261876:og#49324:bg#8192:fg#1024:\ :b0=rdboot:
With this knowledge we can start the disk label.
running edisklabel
VAX simulator V3.8-1 Loading boot code from ka655x.bin ←[c KA655-B V5.3, VMB 2.7 Performing normal system tests. 40..39..38..37..36..35..34..33..32..31..30..29..28..27..26..25.. 24..23..22..21..20..19..18..17..16..15..14..13..12..11..10..09.. 08..07..06..05..04..03.. Tests completed. >>>b/3 mua0 (BOOT/R5:3 MUA0 2.. -MUA0 1..0.. howto 0x3, bdev 0x12, booting... 10556+552+33996 start 0x0 Nboot : edlabel 12524+676+42280 start 0x0 With this program you can modify everything in the on-disk disklabel. To do something useful you must know the exact geometry of your disk, and have ideas about how you want your partitions to be placed on disk. Some hints: The a partition should be at least ~20000 blocks, the b (swap) is depending on your use of the machine but it should almost never be less than ~32000 blocks. Disk geometry for most DEC disks can be found in the disktab file, and disknames is listed in the installation notes. Remember that disk names is given as disk(adapt, ctrl, disk, part) when using the installation tools. Label which disk? ra(0,0,0,0) getdisklabel: no disk label ra(0,0,0,0): no disk label (E)dit, (S)how, (D)efaults, (W)rite, (Q)uit) : e First set disk type. Valid types are: 0 unknown 1 SMD 2 MSCP 3 old DEC 4 SCSI 5 ESDI 6 ST506 7 HP-IB 8 HP-FL 9 type 9 10 floppy 11 ccd 12 vnd Numeric disk type? [0] 2 Disk name? [] rd54 badsectoring? [n] ecc? [n] removable? [n] Interleave? [0] 1 rpm? [0] 3600 trackskew? [0] cylinderskew? [0] headswitch? [0] track-to-track? [0] drivedata 0? [0] drivedata 1? [0] drivedata 2? [0] drivedata 3? [0] drivedata 4? [0] bytes/sector? [0] 512 sectors/track? [0] 17 tracks/cylinder? [0] 15 sectors/cylinder? [0] 255 cylinders? [0] 1221 a partition: offset? [0] size? [0] 20000 b partition: offset? [0] 20000 size? [0] 20000 c partition: offset? [0] size? [0] 311200 d partition: offset? [0] size? [0] e partition: offset? [0] 40000 size? [0] 271200 f partition: offset? [0] size? [0] g partition: offset? [0] size? [0] h partition: offset? [0] size? [0] (E)dit, (S)how, (D)efaults, (W)rite, (Q)uit) : s disk type 2 (MSCP), rd54: interleave 1, rpm 3600, trackskew 0, cylinderskew 0 headswitch 0, track-to-track 0, drivedata: 0 0 0 0 0 bytes/sector: 512 sectors/track: 17 tracks/cylinder: 15 sectors/cylinder: 255 cylinders: 1221 8 partitions: size offset a: 20000, 0 b: 20000, 20000 c: 311200, 0 d: 0, 0 e: 271200, 40000 f: 0, 0 g: 0, 0 h: 0, 0 (E)dit, (S)how, (D)efaults, (W)rite, (Q)uit) : w This program does not (yet) write bootblocks, only disklabel. Remember to write the bootblocks from the miniroot later with the command "disklabel -B <diskname>". (E)dit, (S)how, (D)efaults, (W)rite, (Q)uit) : q Label which disk? q q: no disk label (E)dit, (S)how, (D)efaults, (W)rite, (Q)uit) : q Label which disk? Simulation stopped, PC: 00103083 (BEQL 10307C) sim> q Goodbye
Running copy
Loading boot code from ka655x.bin ←[c KA655-B V5.3, VMB 2.7 Performing normal system tests. 40..39..38..37..36..35..34..33..32..31..30..29..28..27..26..25.. 24..23..22..21..20..19..18..17..16..15..14..13..12..11..10..09.. 08..07..06..05..04..03.. Tests completed. >>>b/3 mua0 (BOOT/R5:3 MUA0 2.. -MUA0 1..0.. howto 0x3, bdev 0x12, booting... 10556+552+33996 start 0x0 Nboot : copy 11248+564+33948 start 0x0 copy: This program will read miniroot from tape/floppy/disk and install this miniroot onto disk. Specify the device to read from as xx(N,?), where xx is the device-name, ? is file/partition number and N is the unit-number, e.g. "tms(0,1)" for the first TMSCP-tape (TK50), "ra(2,0)" for the third MSCP-disk/floppy (RX33/RX50) device to read from ? tms(0,1) Specify number of blocks to transfer. Usually this is sizeof(miniroot) / 512. It's safe to transfer more blocks than just the miniroot. number of blocks ? 4096 If your miniroot is split into volumes, then you must specify the number of blocks per volume. (e.g. 800 blocks per RX50, 2400 blocks per RX33) number of blocks per volume ? [4096] Make sure unit tms(0,1) is online and holds the proper volume. Then type 'g' to Go or 'a' to Abort. OK to go on ? [g/a] g Reading ... Reading of miniroot done. (4096 blocks read) Now specify the device to write miniroot to as xx(N,1) where xx is the drive type and N is the drive number. For example: ra(0,1) refers to MSCP drive #0, b partition Root disk ? : ra(0,0,1) Initializing partition ... done. (4096 blocks written.) Halt the machine and reboot from distribution media, giving second partition as part to mount as root. Ex: : ra(0,1) for ra disk 0, hp(2,1) for massbuss disk 2 Halt/Reboot the machine NOW. Infinite loop, PC: 00100613 (BRB 100613) sim> q Goodbye
booting the miniroot
VAX simulator V3.8-1 Loading boot code from ka655x.bin ←[c KA655-B V5.3, VMB 2.7 Performing normal system tests. 40..39..38..37..36..35..34..33..32..31..30..29..28..27..26..25.. 24..23..22..21..20..19..18..17..16..15..14..13..12..11..10..09.. 08..07..06..05..04..03.. Tests completed. >>>b/3 mua0 (BOOT/R5:3 MUA0 2.. -MUA0 1..0.. howto 0x3, bdev 0x12, booting... 10556+552+33996 start 0x0 Nboot : ra(0,1)netbsd 621568+32768+85724 start 0x8b414 Copyright (c) 1982, 1986, 1989, 1991, 1993 The Regents of the University of California. All rights reserved. NetBSD 1.2_ALPHA (GENERIC) #2: Sun Jun 23 11:26:00 MET DST 1996 ragge@urgoriyf:/usr/src/sys/arch/vax/compile/GENERIC realmem = 16744448 avail mem = 13292544 Using 817 buffers containing 836608 bytes of memory. backplane0 (root) cpu0 at backplane0sbi0 at backplane0: Q22 uba0 at sbi0 tr0 uda0 at uba0 csr 172150 vec 774, ipl 15 uda0: version 3 model 3 uda0: DMA burst size set to 4 ra0 at uda0 slave 0: rd54, size = 311200 sectors zs0: timeout waiting for TS_SSR zs0: timeout waiting for TS_SSR zs0: timeout waiting for TS_SSR zs0: timeout waiting for TS_SSR zs0: timeout waiting for TS_SSR zs0: timeout waiting for TS_SSR tmscp0 at uba0 csr 174500 vec 760, ipl 15 tms0 at tmscp0 slave 0 qe0 at uba0 csr 174440 vec 754 ipl 15 qe0: delqa, hardware address 08:00:2b:aa:bb:cc dz0 at uba0 csr 160100 vec 304 ipl 15 root device? ra0* ♦WARNING: Clock has gained 47 days - CHECK AND RESET THE DATE. Preserved 3687 blocks of miniroot leaving 16313 pages of swap Segv in kernel mode: rv 1 Trap: type c, code 0, pc 800158b3, psl 4150004 P0BR 80653400 P1BR 7fe4c800 P0LR 15dc P1LR 1fff00 KSP 830435a4 ISP 80148aec USP 7fffddec R0 0 R1 81cedd40 R2 830435c0 R3 81cedd40 R4 ffffffff R5 15 R6 81cedd00 R7 14 R8 20007461 R9 81cf6100 R10 81cf6dc0 R11 8304369c FP 80148b88 AP 80148b9c PC 800158b3 PSL 4150004 panic: trap: adr 0 Stopped at 0x80091b08: bbs $6, 60(r6), 0x80091b10 db>
Oops. :(
single user mode steps
disklabel -B /dev/ra0 newfs /dev/ra0a newfs /dev/ra0e mount /dev/ra0a /mnt sync mkdir /mnt/usr mount /dev/ra0e /mnt sync mt -f /dev/nrmt0 rew mt -f /dev/nrmt0 fsf 2 tar -xvmf /dev/nrmt0 sync mt -f /dev/nrmt0 fsf tar -xvmf /dev/nrmt0 sync cd /mnt/dev ./MAKEDEV ra0 sync ./MAKEDEV std sync cat > /mnt/etc/fstab /dev/ra0a / ffs rw 1 1 /dev/ra0e /usr ffs rw 1 2 /dev/ra0b none swap sw 0 0
Full boot #1
VAX simulator V3.8-1 Loading boot code from ka655x.bin ←[c KA655-B V5.3, VMB 2.7 Performing normal system tests. 40..39..38..37..36..35..34..33..32..31..30..29..28..27..26..25.. 24..23..22..21..20..19..18..17..16..15..14..13..12..11..10..09.. 08..07..06..05..04..03.. Tests completed. >>>b/3 dua0 (BOOT/R5:3 DUA0 2.. -DUA0 1..0.. howto 0x3, bdev 0x11, booting...done. (11108+33996) Nboot : ra(0,0)netbsd 621568+32768+85720 start 0x8b454 [ netbsd symbol table not valid ] Copyright (c) 1982, 1986, 1989, 1991, 1993 The Regents of the University of California. All rights reserved. NetBSD 1.2 (GENERIC) #0: Sun Nov 15 21:25:36 PST 1998 root@myname.my.domain:/usr/src/sys/arch/vax/compile/GENERIC realmem = 16744448 avail mem = 13292544 Using 817 buffers containing 836608 bytes of memory. backplane0 (root) cpu0 at backplane0sbi0 at backplane0: Q22 uba0 at sbi0 tr0 uda0 at uba0 csr 172150 vec 774, ipl 15 uda0: version 3 model 3 uda0: DMA burst size set to 4 ra0 at uda0 slave 0: rd54, size = 311200 sectors tmscp0 at uba0 csr 174500 vec 770, ipl 15 tms0 at tmscp0 slave 0 qe0 at uba0 csr 174440 vec 764 ipl 15 qe0: delqa, hardware address 08:00:2b:aa:bb:cc dz0 at uba0 csr 160100 vec 304 ipl 15 root device? ra0a ♦Enter pathname of shell or RETURN for sh: # setting tty flags starting network add host myname.my.domain: gateway localhost starting rpc daemons: portmap. starting system logger, time daemontimed: no network usable . checking for core dump... savecore: no core dump checking quotas: done. building databases... chmod: /dev/tty[pqrs]*: No such file or directory clearing /tmp standard daemons: update cron. starting network daemons: routed printer inetd. creating runtime link editor directory cache. starting local daemons:. Wed Dec 9 23:35:06 PST 1998 Dec 9 23:35:06 myname init: kernel security level changed from 0 to 1 ? NetBSD_öáx (íùîáíe.íù.äoíáiîc (coîóolec? ? loçiî:
It works...