Subject: Re: Booting from tape (was: standalone programs...)
To: None <port-sparc@NetBSD.ORG>
From: Steve Singles <steve@kiera.wizards.raptor.com>
List: port-sparc
Date: 12/12/1995 23:20:18
> Does anyone remember how Suns (sun3/sun4/sun4c) boot from tape?  I guess
> the PROM loads the first file on the tape expecting it to be the second
> stage boot program.  This program should then probably copy a miniroot
> from tape to disk.

    Here's some messages I saved off Sun news groups about making Sun boot
tapes.  I haven't tried any of the methods described.  For more information,
click here (:-) ftp://perseus.elen.utah.edu/sun/413-boot-tape/
The site also contains info on making bootable floppies.

Steve
_____________________________________________________________________

From: lisa@fci.COM (Lisa Zenobi)
Newsgroups: info.sun-managers
Subject: SUMMARY: Bootable Solaris 2.3 tape
Date: 11 Jul 1994 21:00:19 -0500
Message-ID: <9407112028.AA02461@sales.fci.COM>

Original Question:

< Does anyone know how to make a bootable tape for Solaris 2.3?  I know how
< it is done with Solaris 1.x but being that they changed the whole file
< structure in 2.x I'm not sure how it is done.

Summary:

Well I didn't get anyone who could give me a way to make a bootable tape from
Solaris 2.3 but I got several people who wanted to know how to make a bootable
tape from Solaris 1.x.

There are a few ways to do this.  If you already have a bootable tape then 
the attachments are how to copy the tape in bootable form.  The second way
is what I got out of sun-managers just a while ago.  Haven't tried it myself
but I know of people that have and it works.

1st way:  Read the bootable tape onto disk and then write it back out
on to tape....

[read_tape]


	mt -f /dev/rst2 rewind
count=1
while true
do
        dd if=/dev/nrst2 bs=64k of=/mnt/file.$count
        if [ $? != "0" ]
        then
                exit
        fi
        count=`expr $count + 1`
done

[write_tape]

	mt -f /dev/rst2 rewind
cd /mnt
files="`ls -1 file.? | sort` "
files=$files" `ls -1 file.?? | sort`"
for i in $files
do
  echo $i
  dd if=$i bs=64k of=/dev/nrst2
  if [ $? != "0" ]
    then
    exit
    fi
done

.................................................................

Lisa Zenobi, Technical Support Engineer

FORCE Computers            E-mail: lisa@fci.COM
2001 Logic Drive           UUCP:   fci!lisa@uunet.UU.NET
San Jose, CA  95124-3456
Phone: 408/369-6217        Fax: 408/371-3382

-------------------------------------------------------------

From: mark@Misty.com (Mark Thomas)
Newsgroups: comp.sys.sun.admin
Subject: Re: How do you create a boot tape on SunOS4?
Date: 1 Dec 1994 19:19:51 GMT
Organization: Thomas' Consulting
Message-ID: <3bl7kn$las@netaxs.com>

Jan-Pieter Cornet (cornet@OTech.fgg.EUR.nl) wrote:
> I recently ran into this problem and I couldn't find it anywhere in
> the documentation. The boot tape we currently have is of the old 150MB
> tape format and that tape drive has become obsolete, really (It isn't
> even connected anymore). Besides, I installed a lot of patches and upgrades
> and I'd rather have a boot tape with the newest system.

> So... does anybody know how to create your own boot tape on SunOS4.1.3_U1/
> Solaris 1.1.1? There is no /etc/mkrs, like on HPUX...


This comes up occasionally and should probably be part of the FAQ.
Here are some old posts regarding this, and instructions from:
perseus.elen.utah.edu.

The tape instructions are as follows:
---------------------------------
From: markb@elen.utah.edu
Subject: How to build a QIC-150 boot-tape for SunOS 4.1.3
Date: July 1, 1993
Last Updated: June 8, 1994


Select the appropriate MUNIX file for your KARCH:

	karch	file			CDROM partition
	-----	----			---------------
	sun4	MUNIX-sun4-4.1.3	1
	sun4c	MUNIX-sun4c-4.1.3	2
	sun4m	MUNIX-sun4m-4.1.3	3

	The only way I know to copy MUNIX off of CDROM is using the volume
	manager under SunOS 5.x.  If some clever person knows how to do
	this using SunOS 4.1.x, I would like to hear from you.

	Note: The 4.1.3 CDROM MUNIX differs from the 4.1.1 QIC MUNIX in
	that the CDROM MUNIX has the MUNIX kernel and the MUNIX file system
	combined together.  In other words, you no longer need to load the
	MUNIX file system after booting the MUNIX kernel.


Mount your CDROM and select the appropriate miniroot for your KARCH:

	karch	file
	-----	----
	sun4	/cdrom/export/exec/kvm/sun4_sunos_4_1_3/miniroot_sun4
	sun4c	/cdrom/export/exec/kvm/sun4c_sunos_4_1_3/miniroot_sun4c
	sun4m	/cdrom/export/exec/kvm/sun4m_sunos_4_1_3/miniroot_sun4m


Build your QIC-150 tape as follows:

	# mt -f /dev/nrst0 rew
	# dd if=MUNIX    of=/dev/nrst0 bs=8k conv=sync
	# dd if=miniroot of=/dev/nrst0 bs=100k conv=sync

	You may also want to dump a copy of your "/" and "/usr" filesystems
	to the end of tape as once booted you won't be able to run SunInstall
	(for obvious reasons).


The procedure to boot MUNIX from tape is as follows:

	Press L1-A (i.e. STOP-A) to enter console mode and type:
	ok boot tape
	
	Make the following selection when asked:
	2 - exit to single user shell

	Format and/or partition your disk if necessary.

	Copy miniroot to disk:
	(You have to do this step manually, as the automated procedure
	 will attempt to copy it from CDROM.)
	# mt -f /dev/rst0 rew
	# mt -f /dev/nrst0 fsf 1
	# dd if=/dev/nrst0 of=/dev/rsd0b bs=100k conv=sync

	
The procedure to boot the just-loaded miniroot is as follows:

	Press L1-A (i.e. STOP-A) to enter console mode and type:
	ok boot disk:b -sw

	Once miniroot is booted you can then restore your "/" and "/usr"
	partitions from tape, etc.


NOTE:

This procedure is known to work for QIC-24 and QIC-150 tape drives.
And I have been told by others that this procedure will also work for
4mm tape drives.

HOWEVER, this procedure *does not* work for Exabyte 8200 or 8500 tape
drives.  The best speculative explanation I've heard is that since the
Exabyte *is* a recognized device by Sun, that the prom-monitor
attempts to use the wrong blocking factor.  If you can convince the
prom-monitor that the Exabyte is an unrecongized (sic) device, then
perhaps the Exabyte will be treated as a generic SCSI device and the
above procedure might work.  A workaround for this problem is to boot
MUNIX off of floppies (see README.413-boot-floppy, available via
anonymous ftp from perseus.elen.utah.edu), and then once MUNIX is
booted proceed to load miniroot from your Exabyte.


-----------------------------------------------

Here are some additional instructions from a previous post:
-----------------------------------------------
From: tschach@math.fu-berlin.de (Carsten Tschach)
Newsgroups: comp.sys.sun.admin
Subject: Boot-Tape: A way to create one
Message-ID: <NI2ABA4E@math.fu-berlin.de>
Date: 24 Feb 93 15:22:42 GMT
Organization: Free University of Berlin, Germany

How to create a boot-tape for SunOS 4.1.2:
==========================================

This is the layout of a bootable tape:

|--- MUNIX ---|--- XDRTOC ---|--- MINIROOT ---|--- REST OF O.S. -----

First of all you must have a boot-tape of a previous tape-release of SunOS 
(e.g 4.1.1). Insert the Tape and do the following commands:

                mt -f /dev/nrst0 rew
                dd if=/dev/nrst0 of=tape.00 bs=512k
                dd if=/dev/nrst0 of=tape.01 bs=512k
                dd if=/dev/nrst0 of=tape.02 bs=512k

If you don't have any pre-released SunOS-Tapes contact me by e-mail and we'll 
see what we can do.

The file 'tape.00' contains the munix and the file 'tape.01' contains the 
mini-root. I tried to get both from the SunOS 4.1.2 CD but after a lot of
experiments I came to the result that it is impossible, because in mini-root
and munix is specified which device is used to install.

Don't worry about if these files are older - It doesn't matter because
they are only used to extract the system-packages. You won't have any
old SunOS-Parts if you install from the generated tape.

The file 'tape.01' contains an index about the packages on the tape and is
used when the install-procedure asks you which packages you want to install.
You can get the index with the following command:

                /usr/etc/install/xdrtoc tape.01

        SunOS 4.1.2 704-2976-10 of Wed Oct 30 17:30:09 [...] Engineering
        ARCH sun4c
        VOLUME 1
         Vol File             Name       Size   Type
           1    0            munix    3022848   image
           1    1           XDRTOC       7112   toc
           1    2        mini-root    7168000   image
           1    3             root     253952   tarZ
           1    4              usr   12525025   tarZ
           1    5              Kvm    3017919   tarZ
        [...]
           1   28         Security     250129   tarZ
           1   29 OpenWindows_Programmers    4698861    tarZ
           1   30        Copyright       1124   image


The SunOS 4.1.1 where two 60 MB tapes - but I think today most of the people
have 150 MB Streamers so I decided to put all on one tape. It was a little
light-minded because I didn't thought about changing the toc-file (tape.01) -
but it's a must.
There is no information available about the data-structure of the file and
I have to discover it on my own - a really hard work.

You'll find a copy of my toc-file (tape.01) and a copy of Sun's copyright
notice at the and of this article. Decode and uncompress it.

Now you need to get the packages from the cd-rom in the same order listed in
the toc-file. I call the files tape.xx (where xx is the file-number from the
toc-file). On the CD's all the package-files are in normale tar-format but on 
the tape the files are compressed. So you have to compress the files after
copying from the CD. 

You'll now have a bunch of files labeled from tape.00 to tape.31.

Insert a new tape in your drive and copy the files to the tape:

                mt -f /dev/nrst0 rew
                dd if=tape.00 of=/dev/nrst0 bs=512k
                dd if=tape.01 of=/dev/nrst0 bs=512k
                [...]
                dd if=tape.30 of=/dev/nrst0 bs=512k

or use the following c-shell commands:

                mt -f /dev/nrst0 rew
                foreach i (tape.*)
                        dd if=$i of=/dev/nrst0
                end

Thats all folks !


BTW: If you running SunOS 4.1.2 without the st-streamer patch be careful with
     the bs-specification in the dd-commands, because the old'n'buggy st-driver
     allways need 512 Byte-block and will not write the last block on close.
     If you have problems just get Patch #100581-03 or don't use the bs-option.


Nice hacking, Carsten
--
/ Carsten Tschach         tschach@cs.tu-berlin.de  tschach@math.fu-berlin.de  \
|                                                                             |
|   A stab in the back from the workers and bosses. They're counting their    |
\   gains as you count your losses                             (Anne Clark)   /



table
 !"#$%&'()*+,-./0123456789:;<=>?
@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_
begin 644 tape.01.Z
M'YV0@  $X'"FR8@$ !(J!+!@2ATW3Z: H.$BA@L9"R\X= -"2ADV9<+,*0.Bz
MB)LS:=R4*2,GY9F%"V[ H-%"1HX;-EK$@+&0PY4R9$ \&4,'Q P8(&+<T'%4y
M!XP<(*!,H9(T1XX8"DLLW)HP@$($5IXPJ=*D2%*% ?ZI_3< U-8!<^C@6%B@x
MS<,T>+@B:%.FS1LY><XF-$$F:!HS/>RZP>N"3A@X95S,>4AC# @Q<WK@6 -Bw
MS!LW=GK,R>-F#%>T"@^$'5L6ZU87( "T?1MWKD(!"@>@3EA@LIO*"U^P ! 0v
M !V%!K 0D4+ER9"M)82D# ,8A'(I(.2$)!-&#$@0CKV3?&.F\V<Z9=S0F<.5u
M0!D\:8YS]9H0K%BR9ET+3+@!V>R%<,FU$'W[*50<(PHET$9*:;0@QQMOR+?0t
M7@P^&*%"A!F&V(*+64B'9)19AED/.\' F6>@B4::::<5"(!J][6V$&YM@"&;s
M6P#6-J-"!.P&0&\A+O0&+,0E1 R/'BH$@100%F5$&M]-D4=<?2G$PQH]@ ''r
M'62 L0.6)*S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4*Q\<89 ((@EAMTA#&F3V.,558:9P7FVAPVT7$'o
MA20!*>2#Q)$VZ ESA":52A3! 8=OZR6&7AA/H2&='@]R>:U>'\H)%&!,\?<?n
M")>^P9,8[6&6F!1%3$&%%!I14001"N![!!)4%,1$$4<4X001.I1&65WB EFNm
M&W6UA%1/1_:E)TF DF<>"&>\<5E];8"W(D5BJ/&J2DTJ.-E2>ND8'%$^4:82l
M?>7]=!?)<% 8QAG0P8%&26NA$$,***21ADR;;BP%L)#9#-*K:*0WAGP*$ %3k
M4=G96AP<J\K!4+''MGDDMY01I1(11A!8D PUR*"0##>T8%4,N:'P!'^)M84#j
M#JNUID#:4H#0]MMQMP6T3"@H(1!)>M^00H!'%2KEI%8:AEA=;'L$PA%UIE%4i
M$)>Y44<9+"C0Q!L"Y3HF"%9,=T==0P0! @@YT'#5#(DI ,#NO/?N^^_ !R_\h
M\,07;_SQR">O_/+,-^_\\]!'+_WTU%=O_?789Z_]]MQW[_WWX(<O_OCDEV_^g
M^>BGK_[Z[+?O_OOPQR___/37;__]^.>O__[\]^___P ,H  '2, "&O" "$R@f
M A?(P 8Z\($0C* $)TC!"EKP@AC,H 8WR,$.>O"#( RA"$=(PA*:\(0H3*$*e
?5\C"%KKPA3",H0QG2,,:VO"&.,RA#G?(PQ[Z\(< ! RAd
 c
end

-- 
/ Carsten Tschach         tschach@cs.tu-berlin.de  tschach@math.fu-berlin.de  \
----------------------------------------------------------------------


--
Mark G. Thomas (Mark@Misty.com)