|
|
Disk Restoration and Dvhtool
I.
Disk Restoration.
For the rare case when your system cannot boot IRIX due to the loss of the root filesystem, and conventional methods of attempting to restore individual files or directories fail to correct the problem, this procedure could be used if backup tapes were available that were written using relative pathnames. If IRIX hangs or panic traps during the boot process, always attempt to fix the problem by repairing any corrupt or missing files, or attempt a rebuild of the kernel before you attempt a restore of the complete root. Disk data errors will normally be corrected by adding any new bad spot block number to the bad spot table. Also, fsck attempts to keep the filesystems in a good state of repair, but if fsck cannot correct the problem, and other methods also fail, then restoring the filesystems may be necessary. Question:
How could a filesystem be lost? Answer:
1. Terminal disk failure, and replacement of disk may be required. 2. Human error removed the filesystem. 3. The rare condition when formatting the disk is required. 4. The system lost power when IRIX was active. Objective. This document explains how to: A. Boot the mini-root. B. Start a mini-root shell. C. Restore the root and user filesystems using the special backup tape. D. Restore critical files to the volume header using dvhtool. Purpose.
Teach how to
restore the root and user filesystems, and the volume directory
files of sash, fx, and symmon after a terminal disk failure
renders the disk useless and a new disk is added to the system or the problem of
the existing disk is corrected using fx. IV. EquipmentA. A functional
Onyx or Challenge system. B. An IRIX
distribution CDROM containing the Installation Tools. C. The root and
user backup tape, written using relative. V
Procedure - These procedures will be
perform from the alternate console attached to the first serial port. Throughout the text
are comments that will explain what you are doing or what is about to happen as
a result of executing a command.
Software Installation
Tools General Information
The
IRIX operating system and all the optional software products are released as a
set of CDROMs. The
5.X release CDROMs contain the following:
-
sashARCS
The ARCS sash. The 5.0 and 5.0.1 CDROMs contain only sashARCS, while the 5.1.1 CDROM contains the sash images for all the different CPU types. -
mr
The mini-root. -
proml.03
Code for I04 flash prom (Release 5.0 only). -
io4prom
Code for I04 flash prom (Release 5.1.1).
-
/dist
The directory that holds: -
sa
The standalone tools used for installing software. -
software images The
actual software images. -
/stand
The directory that holds: -
sashARCS
Another copy of the ARCS sash. -
fx.ARCS
A copy of the ARCS fx. -
ide.IP19
Copy of the CPU ide. Copies
of other sash, fx, and ide images are maintained in /stand for the other
CPU types on the 5.1.1 CDROM. -
/insight
SGI
Bookshelves (5.1.1 release). The Standalone
Tools are, sash, fx, and the mini-root. The
mini-root, with it’s Install Utility (inst), is used to build a
new operating system or update (add to) an existing system with
additional software images. In order
to restore the filesystems from the backup tape written using relative
pathnames, we need the mini-root, which is loaded into and runs out
of the system disk swap partition. The mini-root, because it resides in
the swap partition, and has the special directories of /root and /root/usr,
which it mounts the root and user partitions to, can retrieve
the files from tape, and because the pathnames are relative, the files are
placed into the correct partitions as they stream off the tape. Begin
Actual Procedure.
STEP 1:
Booting the Mini-Root and
Starting the Install Tool (inst) You must be in the
PROM Monitor in order to boot the mini-root from
the CDROM. If fx is active,
exit fx and return to the PROM monitor.
We
will start the process by selecting choice #2: Install System
Software. The PROM Monitor
will prompt you, asking you if the load device is a local or
remote device. The PROM Monitor
will load sash from the volume
header of the CDROM, and then sash
will load the mini-root from
partition 7 of the
CDROM. Once the mini-root
is loaded, the Installation Tool (inst)
is started, which you will
immediately exit by starting a mini-root shell. Once
in the shell, you will restore both of the filesystems. The load from the
CDROM will take several minutes, during which time dots are output to the screen to inform you that the
load is progressing. Let’s load the
mini-root.
If you were performing a system build or update, inst assumes that a root filesystem already exists and it attempts to mount /dev/dsk/dks0d1s0 (the partition that holds the real root filesystem) onto the mini-root directory of /root. Since format
destroyed all the filesystems, inst
informs you that no valid filesystem
exists in the partition /dev/dsk/dks0d1s0, and
it asks you if you want a filesystem created. You must answer yes, so
inst will execute the
make filesystem command (mkfs) and create a blank filesystem in partition 0 (/dev/dsk/dks0d1s0). The mini-root
was
itself created on a system that had all the devices that are listed as
missing by this system. This is normal, just ignore the missing
messages. OK, answer yes to the prompt and let inst create the blank filesystem in partition 0 (/dev/dsk/dks0d1s0) and mount it at the mini-roots /root directory.
After inst creates a filesystem in partition 0 (/dev/dsk/dks0d1s0) and mounts it at /root, it attempts to mount /dev/dsk/dks0d1s6 (partition 6) at the mini-roots /root/usr directory, but again discovers that no valid filesystem exists in partition 6, and asks you if a filesystem should be created in this partition. You will again answer with yes.
After inst creates a
filesystem in partition 6 (/dev/dsk/dksOdls6)
and mounts it at /root/usr, it displays
it’s Main Menu. If you were building or updating a system, you would
select specific functions from this menu, but we do not want the install
tool. We want to start a mini-root shell,
therefore we will exit inst by executing sh. *****************WARNING*************** When the mini-root
is
started, the system disks partition table
is
modified to allow the install tool to function correctly. When you
quit the
install tool, the partition
table will be set back to its correct values by inst, therefore, while in the mini-root shell, do not forget how
you got there and inadvertently attempt a reboot or shutdown. You must return to inst
and
select quit to insure that the
partition table is returned to its normal settings. Also, when you are normally in inst and want to quit,
you would select
quit and inst would ask you if you wanted to reboot the system. Since there is no root filesystem, the
reboot would fail. Inst knows this and
would not allow the reboot and would
instead output an error message informing you that the root filesystem was
not usable. STEP 2:
Starting a Mini-Root Shell. Let’s exit the install tool by starting a mini-root
shell.
Now that we are in
a mini-root shell, let’s use the 1s
command
and look at the mini-root top level directory (/).
As you can see, the mini-root
top
directory (/) looks similar to the top directory of the IRIX root (/). The basic difference is the mini-root is running out of
partition 1 (the swap partition) and not partition
0. Notice that the mini-root kernel
is
called unix.IP19 and that the
special root directory exists. The root directory is where
partition 0 (/dev/dsk/dks0d1s0)
was
mounted after inst created a blank
filesystem in it. Let’s see what filesystems are mounted.
Your values may be different, but the same filesystems should be mounted. Notice that the newly created filesystems are empty, 0% used. STEP 3: Restoring
the Root and User Filesystems. All we have to do is move into the /root directory, install the backup tape, and restore the files of the
root and user
filesystems. The restore will take approximately 45 minutes.
Execute the disk free command (df) and verify that you actually restored the two filesystems. You will see that both root and usr are now quite fill.
Now that both filesystems have been
restored to their correct partitions, you are ready to restore fx, sash, and symmon
to the volume directory of the volume header. The utility dvhtool is used to copy files into the volume header. II. Dvhtool
Dvhtool
is a utility that allows the user to modify or display three of the sub-sections of a disk volume
header: volume directory, parameters, and the partition table. Both the mini-root and root filesystems have this command. Two modes of operation exist: Interactive and Command Line.
This mode is entered by executing the command without any options or arguments. i.e. # dvhtool When using this mode, the user will be prompted to enter commands that will instruct the program what to do.
This mode allows experienced users of dvhtool to supply, on a single line, all the commands and data required to complete a desired operation. The operation executes without any prompts being displayed. i.e. # dvhtool -v c /stand/sash sash The lab project will guide you through interactive mode first, and then show you how individual tasks can be made much simpler using command line mode. STEP 1: Dvhtool
Interactive Mode. Remember, you are still in the mini-root shell. Let’s move to the top
of the mini-root tree and start dvhtool.
You are being asked if you want to select the volume header of the system disk. The
default of (/dev/rvh) is linked to /dev/rdsk/dks0d1vh. If you wanted
another disk, then you would have to enter the actual device file, i.e. /dev/rdsk/dks1d1vh. We will accept the default device, because this is the disk that we want to restore sash and fx to. Later in the lab project, we will display the volume directory of the second disk drive, and to do this, the actual device file must be specified.
You are now being asked to select a command or indicate what sub-section of the volume header that you want to access.
-
read This command will read the volume header into a memory buffer. -
write This command will write the
memory buffer back to the volume header. -
quit This terminates dvhtool
and returns you to the mini-root or root.
-
vd This selects the volume
directory. - pt This selects the partition
table. - dp This selects the disk
parameters. -
bootfile This allows the user to change the name of the bootfile variable of the bootinfo section. Since the Onyx/Challenge systems do not use this sub-section, this is not used. Let’s select the volume
directory (vd).
Now you are being asked to select one of the
functions that will affect the volume directory:
a, c, d, g, or 1.
This will over-write a file with the same name.
Let’s list the current contents of the volume directory. When dvhtool was started, the contents of the volume header was read and placed into a memory buffer. The contents of the memory buffer is what you will be acting upon.
Since you just
formatted the drive (previous lab project) and are in the mini-root, two files should be present: sgilabel and instinfo.
This file is created by fx when a default label
is
created.
The install tool (inst)
creates
this file and it defines the configuration of the volume header while the
mini-root is running. If you started dvhtool
from
IRIX, this file would
not be present. When you quit inst,
this
file is removed. NOTE: If this was a non-SCSI
disk
drive, then you would see a file called bsttab. This file is the bad spot table for non-SCSI drives, which is maintained in the volume header and not in an
EPROM like it is for the SCSI drives. Let’s now copy the file sash into the volume
directory. Since dvhtool
can be
invoked from the mini-root (as we have done)
or from IRIX, the pathname to the stand
directory is different. The stand directory is where
copies of sash and fx are maintained. Stand Directorv PathnamesFrom the mini-root:
/root/stand From IRIX: /stand
Let’s look at the change.
The change was made to the image held in the memory buffer. You must now write the memory buffer
back to the volume header. To access the write
command, depress return to move back to
the top menu.
OK, let’s write the memory
buffer back to the volume header.
Now that we have restored sash to the system disk, let’s quit interactive mode and return to the mini-root.
STEP 2: Dvhtool Command Line
Mode. Command line mode makes adding,
deleting, copying, and listing files of the volume directory a very simple
task. We are going to perform the same task as we did in
step 1, but this time, fx is the file that
will be copied into the volume
directory. By specifying the -v
option with the dvhtool
command, we can supply all the required information necessary
to complete the task. The -v option identifies the
volume directory as the sub-section
of the volume header that we want to
work on. A single letter will again identify the operation.
This will over-write
a file
with the same name.
Let’s copy symmon
and
fx to the volume directory, and remember, we
are still in the mini-root, therefore the
pathnams are /root/stand/symmon and /root/stand/fx.
Let’s look at the results of the above command.
You can see that fx
was
written to the volume header as a result of the
above command. STEP 3: Displaying
the Volume Header of the Second Disk. This example will show you how to access disks other then the system disk. If you remember, when you started dvhtool, the pathname to the volume header was set to /dev/rvh. This is the pseudonym of the system disk. To access other disks, you must supply the actual device file of the disk that you want to access. You will again use command
line mode. Let’s display the volume
header of the second disk.
Notice that the inst
configuration file instinfo is not present
in this disks volume
directory. STEP 4: Returning
to the Install Tool. If you remember, we started the mini-root shell (using sh) while we were in the install tool (inst). I mentioned (at that time) that the install tool modifies the partition table to suit its own needs, and the
current state of the partition table is not
compatible with IRIX. You must return to inst and select quit, allowing inst to restore the volume header to the state that it was in before inst was started. Follow the procedure on the next page to exit the mini-root and terminate inst. Return to inst using
exit.
2. When inst is entered,
execute quit.
3. Answer yes,
allowing inst to clean up the volume header.
|
Send mail to jokeefe@hummingbirdcomp.com
with questions or comments about this web site. |