[comp.unix.i386] How to make a disaster boot floppy?

nvk@ddsw1.MCS.COM (Norman Kohn) (05/25/90)

In article <187@touch.touch.com> john@touch.touch.com (John Weald) writes:
>In article <9005202304.aa13994@PARIS.ICS.UCI.EDU> baxter@zola.ICS.UCI.EDU (Ira Baxter) writes:
>>
>>Having installed a tape drive, and snapped a copy of my disk onto a
>>tape,  I am wondering how to restore that image should my disk
>>contents get wiped out.  Since one has to custom-configure ISC Unix
>>to install the tape drive, the obvious solution is to install
>>a fresh Unix, configure it, and then restore the tape.... This
>>solution suffers the problem of having to do all that configuration
>>work, when the desired result of it is already sitting on the tape,
>>just waiting to be restored.  Clearly a chicken-before-the-egg? problem.
>>Surely there must be a better way; I'm open to suggestions.

After having tried under uport 386 the solution of making a new
unix kernel on the floppy that reads the tape, I settled on
the following scheme. Its advantage is that disaster recovery
is simple, the "supplement" disk is readily updated, and
you don't need to keep multiple flavors of boot floppy around
(when the vendor upgrades the os, there's minimal extra work)

1) boot off standard boot disk.  In the unusual event that the
hard disk is totally clobbered, rebuild at least the minimal
unix partitions with the vendor's script.  Modification
of the script is a reasonable idea, but I haven't bothered.
It obviously helps to have reasonably current printouts of
/etc/partitions, /etc/fstab, and the mkpart listings of 
mkpart -tpa ...

2) use cpio to read in the new unix kernel, configured for your
tape drive.  I keep a floppy with /unix and the necessary /dev
files (also any essential /etc files, currently none) in cpio format.

3) save the /etc/partitions file created by rebuilding unix, as
it will be overwritten from tape.

4) do sync;sync; uadmin 2 0

5) reboot unix from hard disk
be sure now to mount any file systems that will need to be
mounted to read the tape, then save /etc/mnttab (a copy
will be read in from tape)

6) load from tape

7) ps_data will have been read from tape and should be cleared.

8) shutdown and reboot: the unix kernel on tape, which was
read in over the kernel you booted from, is probably newer.

9) file systems not needed for bootup and basic operation may
be easier to create at this point, when full unix facilities
are available.  I keep different file systems on separate
tapes (they require different backup algorithms and frequencies).
One benefit is avoiding splitting a backup over multiple tape
volumes.  That way I can run the backups unattended, and have
the tape automatically scanned via cpio -it to make sure
the files are all there and the tape reads to the end.
Backup and scanning, of course, are done via shell script.


-- 
Norman Kohn   		| ...ddsw1!nvk
Chicago, Il.		| days/ans svc: (312) 650-6840
			| eves: (312) 373-0564

davidsen@sixhub.UUCP (Wm E. Davidsen Jr) (05/27/90)

In article <1990May25.120501.26091@ddsw1.MCS.COM> nvk@ddsw1.MCS.COM (Norman Kohn) writes:

| After having tried under uport 386 the solution of making a new
| unix kernel on the floppy that reads the tape, I settled on
| the following scheme. Its advantage is that disaster recovery
| is simple, the "supplement" disk is readily updated, and
| you don't need to keep multiple flavors of boot floppy around
| (when the vendor upgrades the os, there's minimal extra work)

  You describe a method by wich you can reload, but my interpretation of
the original request was for something useful to recover... I have a
bootable floppy with tape configured, and it has all of the utilities I
can possibly fit on one disk. Since most of my systems have a 2nd disk,
I have a directory stub called bin2 to hold the mounted 2nd disk of
goodies, and on systems which allow it a RAM disk to make the really
frequently needed things (df, fsck, ls, etc) available quickly.

  What you describe is useful (I archived the posting) but not what I
think of as a disaster floppy.
-- 
bill davidsen - davidsen@sixhub.uucp (uunet!crdgw1!sixhub!davidsen)
    sysop *IX BBS and Public Access UNIX
    moderator of comp.binaries.ibm.pc and 80386 mailing list
"Stupidity, like virtue, is its own reward" -me

herbert@ektools.UUCP (Tom Herbert) (05/30/90)

In article <1990May25.120501.26091@ddsw1.MCS.COM> nvk@ddsw1.MCS.COM (Norman Kohn) writes:
>In article <187@touch.touch.com> john@touch.touch.com (John Weald) writes:
>>In article <9005202304.aa13994@PARIS.ICS.UCI.EDU> baxter@zola.ICS.UCI.EDU (Ira Baxter) writes:
>>>
>>>Having installed a tape drive, and snapped a copy of my disk onto a
>>>tape,  I am wondering how to restore that image should my disk
>>>contents get wiped out. ....
>
>1) boot off standard boot disk. ....
>
>2) use cpio to read in the new unix kernel,  ....
>
>3) save the /etc/partitions file ....
>
>4) do sync;sync; uadmin 2 0
>
>5) reboot unix from hard disk
> ....
>
>6) load from tape
>
>7) ps_data will have been read from tape and should be cleared.
>
>8) shutdown and reboot:  ....
>
....
>
>-- 
>Norman Kohn   		| ...ddsw1!nvk
>Chicago, Il.		| days/ans svc: (312) 650-6840
>			| eves: (312) 373-0564

This seems somewhat complicated to me.  What I do is:
	
	First create a boot floppy with tape capabilities

1.	Copy ISC supplied boot disk with ..
	dd if=/dev/dsk/f0q15dt of=/tmp/boot bs=33b 
	... and onto new formatted disk ...
	dd if=/tmp/boot of=/dev/dsk/f0q15dt bs=33b

2.	Mount the new boot disk, ....
	mount /dev/dsk/f0q15d /mnt ...remember...
	/dev/dsk/f0q15dt contains the boot track and /dev/dsk/f0q15d doesn't.

3.	Copy a small unix with a tape driver over the unix on the boot disk.
	copy /etc/conf/kconfig.d/unix.2.d/unix.2 /tmp/unix ....
	you may need to delete some stuff on the new boot disk.

4.	Make special character device file for the tape drive:
	mknod c /mnt/dev/rmt0 28 1 ...and...
	ln /mnt/dev/rmt0 /mnt/dev/tape

	Whenever I need to do a restore....

1.	Boot the new boot floppy.  When the message appears
	"type ENTER to INSTALL....", hit an interrupt.

2.	Go to where you kept a copy of your /etc/partitions file, type:
	mkfs /dev/dsk/0s1 48048  ... or what ever the size of your root is and
	mkfs /dev/dsk/0s3 144672 ... or what ever the size of your /usr is.

3.	fsck /dev/dsk/0s1 ...and ... fsck /dev/dsk/0s3 for confidence and...

4.	Mount each partition and cd to the partition...
	mount /dev/dsk/0s1 /mnt

5.	Do the restore...
	cd /mnt;  cpio -iacvdumC 256000 -I /dev/tape

6.	Do the same for the other partition.

7.	Reboot the hard disk with uadmin 2 0

	It takes about an half hour to do a complete restore on my Compaq
	386 model 110 with Compaq (Wangtek) tape drive.
	

2.	Copy small unix kernal with a tape driver and little else onto




-- 
Thomas F. Herbert                          | ..!uunet!rochester!kodak!herbert
Signal Processing Dept., Eastman Kodak Co. | herbert@kodak.com
Rochester, NY 14653-5908                   | 716-342-4085