[Simh] Unix SYS III on SIMH

Jason Stevens neozeed at gmail.com
Thu May 21 06:25:58 EDT 2009


Thanks for the reply!

> My memory of the process is that a) different distros had specific
> instructions, so you just about had to have the printed instructions
> or at least had to have done one particular distro enough that you
> memorized them, and b) in the case of a BSD tape at least, some of the
> instructions and a "cat" program were on the tape prior to the root
> filesystem,
>
> It's odd you get a hard tape error at block 7000 unless that happens
> to be the size of your virtual tape file.  How large is
> tape1_set1_file1.dat and how large is it compared to tape1.tap?
>
> Tape block 7000 should be around 35840000 bytes (or 70000 blocks of
> 512 bytes)., and a real RP06 should be able to hold 322278 blocks of
> 512 bytes (165006336 bytes) IIRC.  With about 35MB read, it sounds
> like the install/restore program could be is running off the end of
> the virtual tape (a "real" 16MT9 holds around 40MB, ISTR). so it
> sounds to me as if something in the tape EOF marker
> creation/detectionis busted.  Do you have a way to verify that
> mkdistap.pl is writing EOFs in a way that simh is happy with the .tap
> file?  Perhaps the
> program at the start of the tape is doing something "clever" and not
> properly seeing the EOF marker between tape1_set1_file1.dat and
> tape1_set1_file2.dat.  Do you have source for that program you can
> examine for how it knows when to stop reading from the tape?
>
> That's where I'd start.
>
> -ethan

This is the directory of the file 'data'

09/26/2007  10:35 PM            18,944 tape1_set1_file0.dat
09/26/2007  10:35 PM         3,584,000 tape1_set1_file1.dat
09/26/2007  10:35 PM            24,064 tape1_set1_file2.dat
09/26/2007  10:35 PM         1,694,720 tape1_set1_file3.dat
09/26/2007  10:36 PM         3,870,720 tape1_set1_file4.dat
09/26/2007  10:36 PM           276,480 tape1_set1_file5.dat
09/26/2007  10:36 PM           358,400 tape1_set1_file6.dat

Now I'm presuming that this perl script works, as I've used it to
build tapes for 4.X BSD, now that being said, just because it works
for one, doesn't mean it's universal.... Here is the script

----8<----8<----8<----8<----8<----8<----8<
#!/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/mkdisttap.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("tape1_set1_file0.dat", 512);
end_file();
add_file("tape1_set1_file1.dat", 5120);
end_file();
add_file("tape1_set1_file2.dat", 512);
end_file();
add_file("tape1_set1_file3.dat", 5120);
end_file();
add_file("tape1_set1_file4.dat", 5120);
end_file();
add_file("tape1_set1_file5.dat", 5120);
end_file();
add_file("tape1_set1_file6.dat", 5120);
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);
}
----8<----8<----8<----8<----8<----8<----8<

I have tried all kinds of 'block sizes' for file1....

I managed to cpio out a bunch of stuff, and this seems to be the part
about the tape in the setup man page:

----8<----8<----8<----8<----8<----8<----8<
refers to the directory ``/'',
which is the root of all the directory trees.
The format of this tape is as follows:
.VL 22 \n(Si compact
.LI "record~0:"
Tape boot loader\-512-bytes;
.LI "record~1:"
Tape boot loader\-512-bytes;
.LI "remainder of file 1:"
Initial load program\-several 512-byte records;
.LI "~~~~~~\f2end-of-file\fP"
.sp .5v
.LI "file~2:"
\f2root\^\fP file system (physical)\-several 5,120-byte records (blocking factor
 10);
.LI "~~~~~~\f2end-of-file\fP"
.sp .5v
.LI "file~3:"
\f2cpio\^\fP program (latest version)\-several 512-byte records;
.LI "~~~~~~\f2end-of-file\fP"
.sp .5v
.LI "file~4:"
\f2root\^\fP file system (structured in \f2cpio\^\fP format)\-several 5,120-byte
 records
(to be used
.I only\^
for updating an earlier \*u);
.LI "~~~~~~\f2end-of-file\fP"
.LI "file~5:"
.I /usr\^
file system except
.I src\^
and
.I man\^
.RI ( cpio ).
.LI "~~~~~~\f2end-of-file\fP"
.LI "file~6:"
.I /usr/src\^
part 1.
.LI "~~~~~~\f2end-of-file\fP"
.LI "file 7:"
.I /usr/src\^
part 2.
.LI "~~~~~~\f2end-of-file\fP"
.LI "file 8:"
.I /usr/man .
.LI "~~~~~~\f2end-of-file\fP"
.LE
.P
----8<----8<----8<----8<----8<----8<----8<

The key part seems to be this:

5,120-byte records (blocking factor 10)

which I'm assuming is 5120 for the 'tape' creation... but "blocking
factor 10" means nothing to me...  I wonder if that just means 512x10
for 5120?

The outputed tap file is this:

05/21/2009  06:03 AM         9,843,320 tape1.tap

well short of 165,006,336 bytes...

Another thing Ive tried to do was get 32v to run it's 'disk boot'
procedure and juse point SIMH to a copy of the miniroot on a rp06 disk
(rp0 to be exact)...  This is how I 'cheated' the boot for 4.2 BSD by
just booting it directly...  Interestingly enough the 32v 'console
boot' stuff doesn't work on SYSIII... And I just get the following:

% ./vax780  dboot.init

VAX780 simulator V3.8-1

HALT instruction, PC: 00030040 (HALT)

HALT instruction, PC: 00000003 (HALT)
simh>

-- And even trying to just 'trust the boot'...

Or even this:
VAX780 simulator V3.8-1
sim> set rp0 rp06
sim> att rp0 tape1_set1_file1.dat
sim> boot rp0
Loading boot code from vmb.exe
%BOOT-F-Unable to locate BOOT fil

----

sim> set rp0 rp06
sim> att rp0 rp06.disk
sim> boot rp0 /r5:8
Loading boot code from vmb.exe

HALT instruction, PC: 00002003 (HALT)
sim>


Which gives me the feeling the miniroot isn't bootable.... Or the most
likely scenario is that I'm doing something wrong...

>From some cpio'd out peices I found this file:

----8<----8<----8<----8<----8<----8<----8<
!
!       DEFAULT BOOT COMMAND FILE - DEFBOO.CMD
!
HALT                    ! HALT PROCESSOR
UNJAM                   ! UNJAM SBI
INIT                    ! INIT PROCESSOR
D/I 11 20003800 ! SET UP SCBB
D R0 0          ! DISK PACK DEVICE TYPE
D R1 8          ! MBA TR=8
D R2 0          ! ADAPTER UNIT = 0
D R3 0          ! CONTROLLER UNIT = 0
D R4 0          ! BOOT BLOCK LBN (UNUSED)
D R5 8          ! SOFTWARE BOOT FLAGS
D FP 0          ! SET NO MACHINE CHECK EXPECTED
START 20003000          ! START ROM PROGRAM
WAIT DONE               ! WAIT FOR COMPLETION
                        !
LOAD SASH       ! LOAD PRIMARY BOOTSTRAP
START 2                 ! AND START IT
----8<----8<----8<----8<----8<----8<----8<

Which I was thinking translates to:

d 11 20003800
set rp0 rp06
att rp0 rp06.disk
d r0 0
d r1 8
d r2 0
d r3 0
d r4 0
d r5 0
d fp 0
g 20003000

HALT instruction, PC: 20003001>>MCTL: invalid adapter read mask, pa = 20003001,
lnt = 1
Segmentation fault (core dumped)

which isn't exactly 'good'.


Again thanks for the reply!

Jason



More information about the Simh mailing list