Received: (from major@localhost)
	by minnie.cs.adfa.oz.au (8.8.5/8.8.5) id CAA16834
	for pups-liszt; Sat, 11 Apr 1998 02:02:25 +1000 (EST)
X-Authentication-Warning: minnie.cs.adfa.oz.au: major set sender to owner-pups@minnie.cs.adfa.oz.au using -f
Received: from moe.2bsd.com (0@MOE.2BSD.COM [206.139.202.200])
	by minnie.cs.adfa.oz.au (8.8.5/8.8.5) with ESMTP id CAA16829
	for <pups@minnie.cs.adfa.oz.au>; Sat, 11 Apr 1998 02:02:19 +1000 (EST)
Received: (from sms@localhost)
	by moe.2bsd.com (8.8.5/8.8.5) id JAA14552;
	Fri, 10 Apr 1998 09:01:24 -0700 (PDT)
Date: Fri, 10 Apr 1998 09:01:24 -0700 (PDT)
From: "Steven M. Schultz" <sms@moe.2bsd.com>
Message-Id: <199804101601.JAA14552@moe.2bsd.com>
To: Bob.Supnik@digital.com, pups@minnie.cs.adfa.oz.au
Subject: Re: Question re TM11 boostrap
Sender: owner-pups@minnie.cs.adfa.oz.au
Precedence: bulk

Bob, et al -

> Several people have asked for a bootstrap for the TM11 magtape. V2.3a
> has a simple bootstrap that just reads the first magtape record and

	For booting 2.xBSD that will work fine.

> jumps to it.  However, John Holden points out that the M9301 bootstrap
> actually skips the first record and reads the second.

	True - and that's precisely why bootable tapes (at least starting with
	2.9BSD, not sure about V7) have two copies of the tapebootblock at
	the front.  The layout of a boottape is:

		tapeboot
		tapeboot
		boot
		<filemark>
		standaloneprogram 1
		<filemark>
		...

> Does anyone have source code for an actual TM11 bootstrap?

	What I use (it's in the 2.11 setup documentation) is:

If no other means are available, the following code can be keyed in
and executed at (say) 0100000 to boot from a TM tape drive (the magic number
172526 is the address of the TM-11 current memory address register;
an adjustment may be necessary if your controller is at a nonstandard
address):

012700  (mov $unit, r0)
000000  (normally unit 0)
012701  (mov $172526, r1)
172526
010141  (mov r1, -(r1))
012741  (mov $60003, -(r1))
060003  (if unit 1 use 060403, etc)
000777  (br .)

	This does nothing more than read the first record (much like V2.3a
	already does) into location 0.  Then a ^E is typed followed by 
	"g 0".

> What do the various versions of UNIX expect in a bootable tape image,
> particularly BSD 2.9 and 2.11?

	The tape bootblocks for 2.xBSD all know to skip TWO copies of the
	tapebootblock in order to find the 'boot' program.

	The actual standalone programs present differ between 2.9 and 2.11
	but 2.11's is:

		tapeboot
		tapeboot
		boot
		<filemark>
		disklabel
		<filemark>
		mkfs
		<filemark>
		restor
		<filemark>
		icheck
		<filemark>
		dump of root fs
		<filemark>

	For 2.11 the 'tapeboot' is a universal bootblock - it can handle
	all 4 tape drive types (MS, MM, MT, TMSCP).  2.9 on the otherhand
	has different tapebootblocks at the front of the tape depending on
	the drive type (MS or MM/MT, no TMSCP support in 2.9).  Thus if you
	have a MS bootblock you can't boot from the tape on a MT based system.

	Steven Schultz


