572 lines
22 KiB
Text
572 lines
22 KiB
Text
<!-- $Id: backups.sgml,v 1.4 1998-08-09 22:20:29 wosch Exp $ -->
|
|
<!-- The FreeBSD Documentation Project -->
|
|
|
|
<!--
|
|
<!DOCTYPE chapt PUBLIC "-//FreeBSD//DTD linuxdoc//EN"> -->
|
|
|
|
<chapt><heading>Backups<label id="backups"></heading>
|
|
|
|
<p>Issues of hardware compatibility are among the most
|
|
troublesome in the computer industry today and FreeBSD is by
|
|
no means immune to trouble. In this respect, FreeBSD's
|
|
advantage of being able to run on inexpensive commodity PC
|
|
hardware is also its liability when it comes to support for
|
|
the amazing variety of components on the market. While it
|
|
would be impossible to provide a exhaustive listing of
|
|
hardware that FreeBSD supports, this section serves as a
|
|
catalog of the device drivers included with FreeBSD and the
|
|
hardware each drivers supports. Where possible and
|
|
appropriate, notes about specific products are included.
|
|
You may also want to refer to <ref id="kernelconfig:config"
|
|
name="the kernel configuration file"> section in this handbook for
|
|
a list of supported devices.
|
|
|
|
As FreeBSD is a volunteer project without a funded testing
|
|
department, we depend on you, the user, for much of the
|
|
information contained in this catalog. If you have direct
|
|
experience of hardware that does or does not work with
|
|
FreeBSD, please let us know by sending e-mail to the &a.doc;.
|
|
Questions about supported hardware
|
|
should be directed to the &a.questions (see
|
|
<ref id="eresources:mail" name="Mailing Lists"> for more
|
|
information). When submitting information or asking a
|
|
question, please remember to specify exactly what version of
|
|
FreeBSD you are using and include as many details of your
|
|
hardware as possible.
|
|
|
|
<sect><heading>* What about backups to floppies?</heading>
|
|
<sect><heading> Tape Media<label id="backups:tapebackups"></heading>
|
|
<p>The major tape media are the 4mm, 8mm, QIC, mini-cartridge and
|
|
DLT.
|
|
<sect1><heading> 4mm (DDS: Digital Data Storage)
|
|
<label id="backups:tapebackups:4mm"></heading>
|
|
<!--gen-->
|
|
<p>4mm tapes are replacing QIC as the workstation backup
|
|
media of choice. This trend accelerated greatly when Conner
|
|
purchased Archive, a leading manufacturer of QIC drives, and then
|
|
stopped production of QIC drives. 4mm drives are small and quiet
|
|
but do not have the reputation for reliability that is enjoyed by 8mm drives.
|
|
The cartridges are less expensive and smaller (3 x 2 x 0.5
|
|
inches, 76 x 51 x 12 mm) than 8mm cartridges. 4mm, like 8mm, has
|
|
comparatively short head life for the same reason, both use
|
|
helical scan.
|
|
|
|
<!--spec-->
|
|
<p>Data thruput on these drives starts ~150kB/s, peaking
|
|
at ~500kB/s. Data capacity starts at 1.3 GB and ends at 2.0 GB.
|
|
Hardware compression, available with most of these drives,
|
|
approximately doubles the capacity. Multi-drive tape library
|
|
units can have 6 drives in a single cabinet with automatic tape
|
|
changing. Library capacities reach 240 GB.
|
|
|
|
<!--tech-->
|
|
<p>4mm drives, like 8mm drives, use helical-scan. All
|
|
the benefits and drawbacks of helical-scan apply to both 4mm and
|
|
8mm drives.
|
|
|
|
<p>Tapes should be retired from use after 2,000 passes or
|
|
100 full backups.
|
|
|
|
<sect1><heading> 8mm (Exabyte)<label id="backups:tapebackups:8mm">
|
|
</heading>
|
|
|
|
<!--gen-->
|
|
<p>8mm tapes are the most common SCSI tape drives; they
|
|
are the best choice of exchanging tapes. Nearly every site has
|
|
an exabyte 2 GB 8mm tape drive. 8mm drives are reliable,
|
|
convenient and quiet. Cartridges are inexpensive and small (4.8 x
|
|
3.3 x 0.6 inches; 122 x 84 x 15 mm). One downside of 8mm tape is
|
|
relatively short head and tape life due to the high rate of
|
|
relative motion of the tape across the heads.
|
|
|
|
<!--spec-->
|
|
<p>Data thruput ranges from ~250kB/s to ~500kB/s. Data
|
|
sizes start at 300 MB and go up to 7 GB. Hardware compression,
|
|
available with most of these drives, approximately doubles the
|
|
capacity. These drives are available as single units or
|
|
multi-drive tape libraries with 6 drives and 120 tapes in a
|
|
single cabinet. Tapes are changed automatically by the unit.
|
|
Library capacities reach 840+ GB.
|
|
|
|
<!--tech-->
|
|
<p>Data is recorded onto the tape using helical-scan, the
|
|
heads are positioned at an angle to the media (approximately 6
|
|
degrees). The tape wraps around 270 degrees of the spool that
|
|
holds the heads. The spool spins while the tape slides over the
|
|
spool. The result is a high density of data and closely packed
|
|
tracks that angle across the tape from one edge to the other.
|
|
|
|
|
|
<sect1><heading> QIC<label id="backups:tapebackups:qic"></heading>
|
|
<!--gen-->
|
|
<p>QIC-150 tapes and drives are, perhaps, the most common
|
|
tape drive and media around. QIC tape drives are the least
|
|
expensive "serious" backup drives. The downside is the cost of
|
|
media. QIC tapes are expensive compared to 8mm or 4mm tapes, up
|
|
to 5 times the price per GB data storage. But, if your needs can
|
|
be satisfied with a half-dozen tapes, QIC may be the correct
|
|
choice. QIC is the <em>most</em> common tape drive. Every site
|
|
has a QIC drive of some density or another. Therein lies the
|
|
rub, QIC has a large number of densities on physically similar
|
|
(sometimes identical) tapes. QIC drives are not quiet. These
|
|
drives audibly seek before they begin to record data and are
|
|
clearly audible whenever reading, writing or seeking. QIC tapes
|
|
measure (6 x 4 x 0.7 inches; 15.2 x 10.2 x 1.7 mm). <ref
|
|
id="backups:tapebackups:mini" name="Mini-cartridges">, which also
|
|
use 1/4" wide tape are discussed separately. Tape libraries and
|
|
changers are not available.
|
|
|
|
<!--spec-->
|
|
<p>Data thruput ranges from ~150kB/s to ~500kB/s. Data
|
|
capacity ranges from 40 MB to 15 GB. Hardware compression is
|
|
available on many of the newer QIC drives. QIC drives are less
|
|
frequently installed; they are being supplanted by DAT drives.
|
|
|
|
<!--tech-->
|
|
<p>Data is recorded onto the tape in tracks. The tracks
|
|
run along the long axis of the tape media from one end to the
|
|
other. The number of tracks, and therefore the width of a track,
|
|
varies with the tape's capacity. Most if not all newer drives
|
|
provide backward-compatibility at least for reading (but often
|
|
also for writing). QIC has a good reputation regarding the
|
|
safety of the data (the mechanics are simpler and more robust
|
|
than for helical scan drives).
|
|
|
|
<p>Tapes should be retired from use after 5,000 backups.
|
|
|
|
<sect1><heading> * Mini-Cartridge<label id="backups:tapebackups:mini">
|
|
</heading>
|
|
|
|
<sect1><heading> DLT<label id="backups:tapebackups:dlt"></heading>
|
|
<!--gen-->
|
|
<p>DLT has the fastest data transfer rate of all the drive
|
|
types listed here. The 1/2" (12.5mm) tape is contained in a
|
|
single spool cartridge (4 x 4 x 1 inches; 100 x 100 x 25 mm). The
|
|
cartridge has a swinging gate along one entire side of the
|
|
cartridge. The drive mechanism opens this gate to extract the
|
|
tape leader. The tape leader has an oval hole in it which the
|
|
drive uses to "hook" the tape. The take-up spool is located
|
|
inside the tape drive. All the other tape cartridges listed here
|
|
(9 track tapes are the only exception) have both the supply and
|
|
take-up spools located inside the tape cartridge itself.
|
|
|
|
<!--spec-->
|
|
Data thruput is approximately 1.5MB/s, three times the
|
|
thruput of 4mm, 8mm, or QIC tape drives. Data capacities range
|
|
from 10GB to 20GB for a single drive. Drives are available in
|
|
both multi-tape changers and multi-tape, multi-drive tape
|
|
libraries containing from 5 to 900 tapes over 1 to 20 drives,
|
|
providing from 50GB to 9TB of storage.
|
|
|
|
<!--tech-->
|
|
Data is recorded onto the tape in tracks parallel to the
|
|
direction of travel (just like QIC tapes). Two tracks are written
|
|
at once. Read/write head lifetimes are relatively long; once the
|
|
tape stops moving, there is no relative motion between the heads
|
|
and the tape.
|
|
|
|
<sect1><heading> Using a new tape for the first time</heading>
|
|
<p>The first time that you try to read or write a new,
|
|
completely blank tape, the operation will fail. The console
|
|
messages should be similar to:
|
|
<tscreen><verb>
|
|
st0(ncr1:4:0): NOT READY asc:4,1
|
|
st0(ncr1:4:0): Logical unit is in process of becoming ready
|
|
</verb></tscreen>
|
|
|
|
The tape does not contain an Identifier Block (block number
|
|
0). All QIC tape drives since the adoption of QIC-525 standard
|
|
write an Identifier Block to the tape. There are two
|
|
solutions:
|
|
<p><tt>mt fsf 1</tt> causes the tape drive to write an
|
|
Identifier Block to the tape.
|
|
<p>Use the front panel button to eject the tape.
|
|
<p>Re-insert the tape and <tt>dump(8)</tt> data to the
|
|
tape.
|
|
<p><tt>dump(8)</tt> will report <tt>DUMP: End of tape
|
|
detected</tt> and the console will show: <tt>HARDWARE FAILURE
|
|
info:280 asc:80,96</tt>
|
|
<p>rewind the tape using: <tt>mt rewind</tt>
|
|
|
|
<p>Subsequent tape operations are successful.
|
|
|
|
<sect><heading> Backup Programs<label id="backup:programs"></heading>
|
|
<p>The three major programs are <tt>dump(8)</tt>,
|
|
<tt>tar(1)</tt>, and <tt>cpio(1)</tt>.
|
|
|
|
<sect1><heading> Dump and Restore</heading>
|
|
<!--gen-->
|
|
<p><tt>dump(8)</tt> and <tt>restore(8)</tt> are the
|
|
traditional Unix backup programs. They operate on the drive as a
|
|
collection of disk blocks, below the abstractions of files, links
|
|
and directories that are created by the filesystems.
|
|
<tt>dump(8)</tt> backs up devices, entire filesystems, not parts
|
|
of a filesystem and not directory trees that span more than one
|
|
filesystem, using either soft links <tt>ln(1)</tt> or mounting
|
|
one filesystem onto another. <tt>dump(8)</tt> does not write
|
|
files and directories to tape, but rather writes the data blocks
|
|
that are the building blocks of files and directories.
|
|
<tt>dump(8)</tt> has quirks that remain from its early days in
|
|
Version 6 of ATT Unix (circa 1975). The default parameters are
|
|
suitable for 9-track tapes (6250 bpi), not the high-density media
|
|
available today (up to 62,182 ftpi). These defaults must be
|
|
overridden on the command line to utilize the capacity of current
|
|
tape drives.
|
|
|
|
<p><tt>rdump(8)</tt> and <tt>rrestore(8)</tt> backup data
|
|
across the network to a tape drive attached to another computer.
|
|
Both programs rely upon <tt>rcmd(3)</tt> and <tt>ruserok(3)</tt>
|
|
to access the remote tape drive. Therefore, the user performing
|
|
the backup must have <tt>rhosts</tt> access to the remote
|
|
computer. The arguments to <tt>rdump(8)</tt> and
|
|
<tt>rrestore(8)</tt> must suitable to use on the remote computer.
|
|
(e.g. When <tt>rdump</tt>'ing from a FreeBSD computer to an
|
|
Exabyte tape drive connected to a Sun called komodo, use: <tt>/sbin/rdump
|
|
0dsbfu 54000 13000 126 komodo:/dev/nrst8 /dev/rsd0a 2>&1</tt>)
|
|
Beware: there are security implications to allowing
|
|
<tt>rhosts</tt> commands. Evaluate your situation carefully.
|
|
|
|
|
|
|
|
<sect1><heading> Tar</heading>
|
|
<!--gen-->
|
|
<p><tt>tar(1)</tt> also dates back to Version 6 of ATT
|
|
Unix (circa 1975). <tt>tar(1)</tt> operates in cooperation with
|
|
the filesystem; <tt>tar(1)</tt> writes files and directories to
|
|
tape. <tt>tar(1)</tt> does not support the full range of options
|
|
that are available from <tt>cpio(1)</tt>, but <tt>tar(1)</tt>
|
|
does not require the unusual command pipeline that
|
|
<tt>cpio(1)</tt> uses.
|
|
|
|
<p>Most versions of <tt>tar(1)</tt> do not support backups across the
|
|
network. The GNU version of <tt>tar(1)</tt>, which FreeBSD utilizes, supports
|
|
remote devices using the same syntax as <tt>rdump</tt>. To <tt>tar(1)</tt>
|
|
to an Exabyte tape drive connected to a Sun called komodo, use:
|
|
<tt>/usr/bin/tar cf komodo:/dev/nrst8 . 2>&1</tt>.
|
|
For versions without remote device support, you can use a pipeline
|
|
and <tt>rsh(1)</tt> to send the
|
|
data to a remote tape drive. (XXX add an example command)
|
|
|
|
<sect1><heading> Cpio</heading>
|
|
<!--gen-->
|
|
<p><tt>cpio(1)</tt> is the original Unix file interchange
|
|
tape program for magnetic media. <tt>cpio(1)</tt> has options (among
|
|
many others) to perform byte-swapping, write a number of
|
|
different archives format, and pipe the data to other programs.
|
|
This last feature makes <tt>cpio(1)</tt> and excellent choice for
|
|
installation media. <tt>cpio(1)</tt> does not know how to walk
|
|
the directory tree and a list of files must be provided thru <tt>STDIN</tt>.
|
|
|
|
<p><tt>cpio(1)</tt> does not support backups across the
|
|
network. You can use a pipeline and <tt>rsh(1)</tt> to send the
|
|
data to a remote tape drive. (XXX add an example command)
|
|
|
|
<sect1><heading> Pax</heading>
|
|
<!--gen-->
|
|
|
|
<p><tt>pax(1)</tt> is IEEE/POSIX's answer to <tt>tar</tt> and
|
|
<tt>cpio</tt>. Over the years the various versions of <tt>tar</tt> and
|
|
<tt>cpio</tt> have gotten slightly incompatible. So rather than fight it
|
|
out to fully standardize them, POSIX created a new archive utility.
|
|
<tt>pax</tt> attempts to read and write many of the various cpio and tar
|
|
formats, plus new formats of its own. Its command set more resembles
|
|
<tt>cpio</tt> than <tt>tar</tt>.
|
|
|
|
|
|
<sect1><heading> Amanda<label id="backups:programs:amanda"></heading>
|
|
<p><htmlurl url="../ports/misc.html#amanda-2.4.0"
|
|
name="Amanda"> (Advanced Maryland Network Disk Archiver) is a
|
|
client/server backup system, rather than a single program. An
|
|
Amanda server will backup to a single tape drive any number of
|
|
computers that have Amanda clients and network communications
|
|
with the Amanda server. A common problem at locations with a
|
|
number of large disks is the length of time required to backup to
|
|
data directly to tape exceeds the amount of time available for
|
|
the task. Amanda solves this problem. Amanda can use a "holding
|
|
disk" to backup several filesystems at the same time. Amanda
|
|
creates "archive sets": a group of tapes used over a period of
|
|
time to create full backups of all the filesystems listed in
|
|
Amanda's configuration file. The "archive set" also contains
|
|
nightly incremental (or differential) backups of all the
|
|
filesystems. Restoring a damaged filesystem requires the most
|
|
recent full backup and the incremental backups.
|
|
|
|
<p>The configuration file provides fine control backups
|
|
and the network traffic that Amanda generates. Amanda will use
|
|
any of the above backup programs to write the data to tape.
|
|
Amanda is available as either a port or a package, it is not
|
|
installed by default.
|
|
|
|
<sect1><heading> Do nothing</heading>
|
|
<p>"Do nothing" is not a computer program, but it is the
|
|
most widely used backup strategy. There are no initial costs.
|
|
There is no backup schedule to follow. Just say no. If
|
|
something happens to your data, grin and bear it!
|
|
|
|
<p>If your time and your data is worth little to nothing,
|
|
then "Do nothing" is the most suitable backup program for your
|
|
computer. But beware, Unix is a useful tool, you may find that
|
|
within six months you have a collection of files that are
|
|
valuable to you.
|
|
|
|
<p>"Do nothing" is the correct backup method for
|
|
<tt>/usr/obj</tt> and other directory trees that can be exactly
|
|
recreated by your computer. An example is the files that
|
|
comprise these handbook pages-they have been generated from
|
|
<tt>SGML</tt> input files. Creating backups of these
|
|
<tt>HTML</tt> files is not necessary. The <tt>SGML</tt> source
|
|
files are backed up regularly.
|
|
|
|
<sect1><heading> Which Backup Program is Best?</heading>
|
|
<p><tt>dump(8)</tt> <em>Period.</em> Elizabeth D. Zwicky
|
|
torture tested all the backup programs discussed here. The clear
|
|
choice for preserving all your data and all the peculiarities of
|
|
Unix filesystems is <tt>dump(8)</tt>. Elizabeth created
|
|
filesystems containing a large variety of unusual conditions (and
|
|
some not so unusual ones) and tested each program by do a backup
|
|
and restore of that filesystems. The peculiarities included:
|
|
files with holes, files with holes and a block of nulls, files
|
|
with funny characters in their names, unreadable and unwritable
|
|
files, devices, files that change size during the backup, files
|
|
that are created/deleted during the backup and more. She
|
|
presented the results at LISA V in Oct. 1991. See
|
|
<htmlurl url="http://reality.sgi.com/zwicky_neu/testdump.doc.html"
|
|
name="torture-testing Backup and Archive Programs">.
|
|
|
|
<sect1><heading>Emergency Restore Procedure</heading>
|
|
<sect2><heading> Before the Disaster</heading>
|
|
<p>There are only four steps that you need to perform in
|
|
preparation for any disaster that may occur.
|
|
|
|
<p>First, print the disklabel from each of your disks
|
|
(<tt>e.g. disklabel sd0 | lpr</tt>), your filesystem table
|
|
(<tt>/etc/fstab</tt>) and all boot messages, two copies of each.
|
|
|
|
<p>Second, determine that the boot and fixit floppies
|
|
(boot.flp and fixit.flp) have all your devices. The easiest way
|
|
to check is to reboot your machine with the boot floppy in the
|
|
floppy drive and check the boot messages. If all your devices
|
|
are listed and functional, skip on to step three.
|
|
|
|
<p>Otherwise, you have to create two custom bootable
|
|
floppies which has a kernel that can mount your all of your disks
|
|
and access your tape drive. These floppies must contain:
|
|
<tt>fdisk(8)</tt>, <tt>disklabel(8)</tt>, <tt>newfs(8)</tt>,
|
|
<tt>mount(8)</tt>, and whichever backup program you use. These
|
|
programs must be statically linked. If you use <tt>dump(8)</tt>,
|
|
the floppy must contain <tt>restore(8)</tt>.
|
|
|
|
<p>Third, create backup tapes regularly.
|
|
Any changes that you make after your last backup may be
|
|
irretrievably lost. Write-protect the backup tapes.
|
|
|
|
<p>Fourth, test the floppies (either boot.flp and
|
|
fixit.flp or the two custom bootable floppies you made in step
|
|
two.) and backup tapes. Make notes of the procedure. Store
|
|
these notes with the bootable floppy, the printouts and the
|
|
backup tapes. You will be so distraught when restoring that the
|
|
notes may prevent you from destroying your backup tapes (How? In
|
|
place of <tt>tar xvf /dev/rst0</tt>, you might accidently type
|
|
<tt> tar cvf /dev/rst0</tt> and over-write your backup tape).
|
|
|
|
<p>For an added measure of security, make bootable
|
|
floppies and two backup tapes each time. Store one of each at a
|
|
remote location. A remote location is NOT the basement of the
|
|
same office building. A number of firms in the World Trade Center
|
|
learned this lesson the hard way. A remote location should be
|
|
physically separated from your computers and disk drives by a
|
|
significant distance.
|
|
|
|
<p>An example script for creating a bootable floppy:
|
|
<tscreen><verb>
|
|
#!/bin/sh
|
|
#
|
|
# create a restore floppy
|
|
#
|
|
# format the floppy
|
|
#
|
|
PATH=/bin:/sbin:/usr/sbin:/usr/bin
|
|
|
|
fdformat -q fd0
|
|
if [ $? -ne 0 ]
|
|
then
|
|
echo "Bad floppy, please use a new one"
|
|
exit 1
|
|
fi
|
|
|
|
# place boot blocks on the floppy
|
|
#
|
|
disklabel -w -B -b /usr/mdec/fdboot -s /usr/mdec/bootfd /dev/rfd0c fd1440
|
|
|
|
#
|
|
# newfs the one and only partition
|
|
#
|
|
newfs -t 2 -u 18 -l 1 -c 40 -i 5120 -m 5 -o space /dev/rfd0a
|
|
|
|
#
|
|
# mount the new floppy
|
|
#
|
|
mount /dev/fd0a /mnt
|
|
|
|
#
|
|
# create required directories
|
|
#
|
|
mkdir /mnt/dev
|
|
mkdir /mnt/bin
|
|
mkdir /mnt/sbin
|
|
mkdir /mnt/etc
|
|
mkdir /mnt/root
|
|
mkdir /mnt/mnt # for the root partition
|
|
mkdir /mnt/tmp
|
|
mkdir /mnt/var
|
|
|
|
#
|
|
# populate the directories
|
|
#
|
|
if [ ! -x /sys/compile/MINI/kernel ]
|
|
then
|
|
cat << EOM
|
|
The MINI kernel does not exist, please create one.
|
|
Here is an example config file:
|
|
#
|
|
# MINI -- A kernel to get FreeBSD on onto a disk.
|
|
#
|
|
machine "i386"
|
|
cpu "I486_CPU"
|
|
ident MINI
|
|
maxusers 5
|
|
|
|
options INET # needed for _tcp _icmpstat _ipstat
|
|
# _udpstat _tcpstat _udb
|
|
options FFS #Berkeley Fast File System
|
|
options FAT_CURSOR #block cursor in syscons or pccons
|
|
options SCSI_DELAY=15 #Be pessimistic about Joe SCSI device
|
|
options NCONS=2 #1 virtual consoles
|
|
options USERCONFIG #Allow user configuration with -c XXX
|
|
|
|
config kernel root on sd0 swap on sd0 and sd1 dumps on sd0
|
|
|
|
controller isa0
|
|
controller pci0
|
|
|
|
controller fdc0 at isa? port "IO_FD1" bio irq 6 drq 2 vector fdintr
|
|
disk fd0 at fdc0 drive 0
|
|
|
|
controller ncr0
|
|
|
|
controller scbus0
|
|
|
|
device sc0 at isa? port "IO_KBD" tty irq 1 vector scintr
|
|
device npx0 at isa? port "IO_NPX" irq 13 vector npxintr
|
|
|
|
device sd0
|
|
device sd1
|
|
device sd2
|
|
|
|
device st0
|
|
|
|
pseudo-device loop # required by INET
|
|
pseudo-device gzip # Exec gzipped a.out's
|
|
EOM
|
|
exit 1
|
|
fi
|
|
|
|
cp -f /sys/compile/MINI/kernel /mnt
|
|
|
|
gzip -c -best /sbin/init > /mnt/sbin/init
|
|
gzip -c -best /sbin/fsck > /mnt/sbin/fsck
|
|
gzip -c -best /sbin/mount > /mnt/sbin/mount
|
|
gzip -c -best /sbin/halt > /mnt/sbin/halt
|
|
gzip -c -best /sbin/restore > /mnt/sbin/restore
|
|
|
|
gzip -c -best /bin/sh > /mnt/bin/sh
|
|
gzip -c -best /bin/sync > /mnt/bin/sync
|
|
|
|
cp /root/.profile /mnt/root
|
|
|
|
cp -f /dev/MAKEDEV /mnt/dev
|
|
chmod 755 /mnt/dev/MAKEDEV
|
|
|
|
chmod 500 /mnt/sbin/init
|
|
chmod 555 /mnt/sbin/fsck /mnt/sbin/mount /mnt/sbin/halt
|
|
chmod 555 /mnt/bin/sh /mnt/bin/sync
|
|
chmod 6555 /mnt/sbin/restore
|
|
|
|
#
|
|
# create the devices nodes
|
|
#
|
|
cd /mnt/dev
|
|
./MAKEDEV std
|
|
./MAKEDEV sd0
|
|
./MAKEDEV sd1
|
|
./MAKEDEV sd2
|
|
./MAKEDEV st0
|
|
./MAKEDEV pty0
|
|
cd /
|
|
|
|
#
|
|
# create minimum filesystem table
|
|
#
|
|
cat > /mnt/etc/fstab <<EOM
|
|
/dev/fd0a / ufs rw 1 1
|
|
EOM
|
|
|
|
#
|
|
# create minimum passwd file
|
|
#
|
|
cat > /mnt/etc/passwd <<EOM
|
|
root:*:0:0:Charlie &:/root:/bin/sh
|
|
EOM
|
|
|
|
cat > /mnt/etc/master.passwd <<EOM
|
|
root::0:0::0:0:Charlie &:/root:/bin/sh
|
|
EOM
|
|
|
|
chmod 600 /mnt/etc/master.passwd
|
|
chmod 644 /mnt/etc/passwd
|
|
/usr/sbin/pwd_mkdb -d/mnt/etc /mnt/etc/master.passwd
|
|
|
|
#
|
|
# umount the floppy and inform the user
|
|
#
|
|
/sbin/umount /mnt
|
|
</verb></tscreen>
|
|
|
|
<sect2><heading>After the Disaster</heading>
|
|
<p>The key question is: did your hardware survive? You
|
|
have been doing regular backups so there is no need to worry
|
|
about the software.
|
|
|
|
<p>If the hardware has been damaged. First, replace
|
|
those parts that have been damaged.
|
|
|
|
<p>If your hardware is okay, check your floppies. If you
|
|
are using a custom boot floppy, boot single-user (type "-s" at
|
|
the "boot:" prompt). Skip the following paragraph.
|
|
|
|
<p>If you are using the boot.flp and fixit.flp floppies,
|
|
keep reading. Insert the boot.flp floppy in the first floppy drive
|
|
and boot the computer. The original install menu will be displayed
|
|
on the screen. Select the "Fixit--Repair mode with CDROM or floppy."
|
|
option. Insert the fixit.flp when prompted. <tt>restore</tt> and
|
|
the other programs that you need are located in <tt>/mnt2/stand</tt>.
|
|
|
|
<p>Recover each filesystem separately.
|
|
|
|
<p>Try to <tt>mount(8) (e.g. mount /dev/sd0a /mnt) </tt>
|
|
the root partition of your first disk. If the disklabel was
|
|
damaged, use <tt>disklabel(8)</tt> to re-partition and label the
|
|
disk to match the label that your printed and saved. Use
|
|
<tt>newfs(8)</tt> to re-create the filesystems. Re-mount the
|
|
root partition of the floppy read-write ("<tt>mount -u -o rw
|
|
/mnt</tt>"). Use your backup program and backup tapes to recover
|
|
the data for this filesystem (e.g. <tt>restore vrf
|
|
/dev/st0</tt>). Unmount the filesystem (e.g. <tt>umount
|
|
/mnt</tt>) Repeat for each filesystem that was damaged.
|
|
|
|
<p>Once your system is running, backup your data onto new
|
|
tapes. Whatever caused the crash or data loss may strike again.
|
|
An another hour spent now, may save you from further distress later.
|
|
|
|
<sect2><heading>* I did not prepare for the Disaster, What Now?</heading>
|
|
|