 |
» |
|
|
 |
If
your system should become so compromised or corrupt that it will
not boot at the login prompt, or the system boots, but critical
files are corrupted, adversely affecting overall system performance,
it may be useful to restore system elements with core recovery media. Before you attempt to recover an HP-UX system, you should
have the following information about your system disk available.
Note that much of this information, including file system
types, can be obtained by accessing your online system manifest,
either via Ignite-UX, or by reading the hardcopy that came with
your system: The address of the root filesystem on the disk (i.e.,
what filesystem you will be checking/repairing using fsck). The address of the bootlif path of that disk. What the autofile in the bootlif should contain. Whether you have an LVM or non-LVM system.
The more you know about the system disk and its partitioning
scheme, before you encounter major damage or corruption,
the easier it will be for you to recover. The procedures which follow assume that both fsck
and mount can
be run successfully on the system disk; otherwise, the following
procedures are not applicable. Automated Recovery Procedures |  |
There are four possible expert recovery
situations, each of which has its associated recovery procedure: If, after a system problem, you can't
get the system to the ISL>
prompt from the system disk, you will want to rebuild the bootlif
on the system disk, and install all critical files required to boot
on the root filesystem. If you can get the system to the ISL>
prompt, but cannot boot vmunix,
the system disk is corrupted; you will want to install only
the critical files required to boot on the root filesystem. If you can't get to the ISL>
prompt, but you know that the root file system is good, you will
want to rebuild the bootlif on the system disk. If you believe your kernel is corrupted, you will
want to replace only the kernel on the root filesystem.
The following subsections describe these procedures in detail. Rebuilding the bootlif
and Installing Critical Files |  |
Following is an example of the detailed procedure for rebuilding
the bootlif of the system disk, and for installing all the critical
files necessary to boot from the root filesystem: Have the Core CD-ROM for the appropriate HP-UX ready. Reset the System Processor Unit (SPU) using the
reset button, or keyswitch, as appropriate. The console will display boot path information. If Autoboot
is enabled, the system console will eventually display the following
or similar messages: Autoboot from primary path enabled To override, press any key within 10 seconds. |
Press any key before the 10 seconds elapse. The
system console will display the following prompt: Boot from primary boot path (Y or N)?> |
Enter n
at the prompt. The console will then display the following: Boot from alternate boot path (Y or N)?> |
If the alternate boot path specifies the address
of the CD device where the Core CD is mounted, enter y
at the prompt. If the alternate boot path does not specify the address of
the CD device where the HP-UX Core media is mounted, enter n
at the prompt. If n
is entered at the prompt, the following message will be displayed
on the system console: Enter the address of the CD device where the HP-UX
Core media is mounted. The system console will display the following: Interact with IPL (Y or N)> |
Enter n
at the prompt. After several minutes (approximately), and after displaying
several screens of status information, the following will be displayed: Welcome to the HP-UX installation/recovery process! Use the <tab> and/or arrow keys to navigate through the following menus,and use the <return> key to select an item. If the menu items are not clear, select the "Help" item for more information. [ Install HP-UX ] [ Run a Recovery Shell ] [ Cancel and Reboot ] [ Advanced Options ] [ Help ] |
Select Run a Recovery Shell.
The screen clears, and the following message will be displayed: Would you like to start up networking at this time? [n] |
Unless you need networking to ftp to other systems,
enter n and the
following will be displayed: * Loading in a shell... * Loading in the recovery system commands... ... HP-UX SYSTEM RECOVERY CORE MEDIA WARNING: YOU ARE SUPERUSER !! NOTE: Commands residing in the RAM-based file system are unsupported 'mini'commands. These commands are only intended for recovery purposes. Loading commands needed for recovery! Press <return> to continue. |
Press return
and the following status message is displayed: Loading commands needed for recovery! |
Then the following menu will be displayed: HP-UX CORE MEDIA RECOVERY MAIN MENU s. Search for a file b. Reboot l. Load a file r. Recover an unbootable HP-UX system x. Exit to shell c. Instructions on chrooting to a lvm /(root). This menu is for listing and loading the tools contained on the core media. Once a tool is loaded, it may be run from the shell. Some tools require other files to be present in order to successfully execute. Select one of the above: |
To load a file or files, enter l
at the prompt; something similar to the following will be displayed: Filesystem kbytes used avail %cap iused ifree %iuse Mounted on / 2011 1459 552 73% 137 343 29% ? /duped_root 2011 1418 593 71% 49 431 10% ? Enter the file name(s) to load: |
Enter the name(s) of the damaged/corrupted file(s)
you wish to load. For example: The following example lists two files (ex
and egrep) which
must be loaded before the files vi
and grep can
be loaded. It also lists a file (date)
which is not in the load list. NOTE : Since ./usr/bin/vi is linked to ./usr/bin/ex './usr/bin/ex' must precede './usr/bin/vi' in the load list. The file 'date' is NOT in the LOADCMS archive. <Press return to continue> NOTE : Since ./usr/bin/grep is linked to ./usr/bin/egrep './usr/bin/egrep' must precede './usr/bin/grep' in the load list. ******** THE REQUESTED FILE(S): *********** ./sbin/sh ./usr/bin/vi ./usr/bin/grep Is the above load list correct? [n] |
This load list is incorrect, because ./usr/bin/ex
does not precede ./usr/bin/vi
in the list of requested files. So you would enter n.
The following is displayed: Nothing will be loaded! <Press return to return to Main Menu> |
Press return
and the Main Menu appears: HP-UX CORE MEDIA RECOVERY MAIN MENU s. Search for a file b. Reboot l. Load a file r. Recover an unbootable HP-UX system x. Exit to shell c. Instructions on chrooting to a lvm /(root). This menu is for listing and loading the tools contained on the core media. Once a tool is loaded, it may be run from the shell. Some tools require other files to be present in order to successfully execute. Select one of the above: |
This time you will select s
to search for a file you wish to load. You will see the following
display: Either enter the file name(s) to be searched for, or 'all' for a total listing. |
Enter the following: You will receive the following response: ./usr/bin/vi linked to ./usr/bin/ex ./sbin/awk ./usr/bin/awk ./sbin/sh **** The file 'date' was not found in the LOADCMDS archive. **** <Press return to continue> |
Press return
and the Main Menu is displayed again: HP-UX CORE MEDIA RECOVERY MAIN MENU s. Search for a file b. Reboot l. Load a file r. Recover an unbootable HP-UX system x. Exit to shell c. Instructions on chrooting to a lvm /(root). Select one of the above: |
To begin the actual system recovery, select r.
The HP-UX Recovery MENU is then displayed: HP-UX Recovery MENU Select one of the following: a. Rebuild the bootlif (ISL, HPUX, and the AUTO file) and install all files required to boot and recover HP-UX on a root file system. b. Do not rebuild the bootlif but install files required to boot and recover HP-UX on the root file system. c. Rebuild only the bootlif. d. Replace only the kernel on the root file system. m. Return to 'HP-UX Recovery Media Main Menu'. x. Exit to the shell. Use this menu to select the level of recovery desired. Selection: |
Select a
to install both the bootlif and critical files; the following menu
is then displayed: DEVICE FILE VERIFICATION MENU This menu is used to specify the path of the root file system. When the information is correct, select 'a'. INFORMATION to verify: Device file used for '/'(ROOT) is c1t6d0 The path to disk is 56/52.6.0 Select one of the following: a. The above information is correct. b. WRONG!! The device file used for '/'(ROOT) is incorrect. m. Return to the 'HP-UX Recovery MENU.' x. Exit to the shell. NOTE: If '/' is an LVM, use an 's1lvm' suffix (e.g.,c0t1d0s1lvm). Selection: |
Assuming the root device file is incorrect, select
b. You will be
prompted to enter the correct device file name: Enter the device file associated with the '/'(ROOT) file system. (example: c1t6d0): |
 |  |  |  |  | NOTE: On a system with hard-sectored disks, the prompt and
response might look like the following: |  |  |  |  |
For example: Enter the device file associated with the '/'(ROOT) file system (example: c0t1d0s1lvm ) : c0t0d0s13 /dev/rdsk/c0t0d0s13 not a special file <Press return to continue> Enter the address associated with the '/'(ROOT) file system (example: 4.0.1) : 4.0.0 NOTE: if your '/'(ROOT) is not part of a sectioned disk layout enter a 'W' for whole disk layout or enter a 'l' for an LVM disk layout instead of a section number. Enter the section associated with the '/'(ROOT) file system (example: 13 ): 13 making rdsk/c0t0d0s13 c 214 0x00000d making dsk/c0t0d0s13 b 26 0x00000d |
If you were to enter c1t1d0
as the root device file name, you would see the following display: DEVICE FILE VERIFICATION MENU This menu is used to specify the path of the root file system When the information is correct, select 'a'. INFORMATION to verify: Device file used for '/'(ROOT) is c1t1d0 The path to disk is 56/52.1.0 Select one of the following: a. The above information is correct. b. WRONG!! The device file used for '/'(ROOT) is incorrect. m. Return to the 'HP-UX Recovery MENU.' x. Exit to the shell. NOTE: If '/' is an LVM, use an 's1lvm' suffix (e.g.,c0t1d0s1lvm). Selection: |
Select a,
since c1t1d0
is the correct root device file name; the following menu will be
displayed: BOOTLIF PATH VERIFICATION MENU This menu must be used to determine the path to the bootlif (ISL, HPUX and the AUTO file). When the information is correct, select 'a'. INFORMATION to verify: Path to the bootlif is 56/52.1.0 Select one of the following: a. The above information is correct. b. WRONG!! The path to bootlif is incorrect. m. Return to the 'HP-UX Recovery MENU.' x. Exit to the shell. Selection: |
Assuming that the bootlif path is correct, enter
a; the following
menu is displayed: FILE SYSTEM CHECK MENU The file system check '/sbin/fs/hfs/fsck -y /dev/rdsk/c1t1d0' will now be run. Select one of the following: a. Run fsck -y . b. Prompt for the fsck run string on c1t1d0. m. Return to the 'HP-UX Recovery MENU.' Selection: |
Select a
to run fsck -y
to check your file system for corruption; you will see a display
similar to the following: ** /dev/rdsk/c1t1d0 ** Last Mounted on /ROOT ** Phase 1 - Check Blocks and Sizes ** Phase 2 - Check Pathnames ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts ** Phase 5 - Check Cyl groups 6256 files, 0 icont, 149423 used,1563824 free(928 frags,195362 blocks) Mounting c1t1d0 to the HP-UX Recovery Media /ROOT directory... <Press return to continue> |
Assuming your file system is not corrupted, and
you wish to continue with the system recovery, press return
to mount your root file system under the /ROOT
directory; something similar to the following will be displayed: ***** Downloading files to the target disk ***** x ./sbin/lvchange, 528384 bytes, 1032 tape blocks ./sbin/lvcreate linked to ./sbin/lvchange ./sbin/lvdisplay linked to ./sbin/lvchange ...
|
Filesystem kbytes used avail %cap iused ifree %iuse Mounted on /ROOT 1713247 149426 1392496 10% 6261 275339 2% ?
|
Should the existing kernel be 'left', 'overwritten', or 'moved'?[overwritten]
|
To overwrite the existing kernel with your new file
system, enter overwritten
or over at the
prompt; the following will be displayed: downloading INSTALL to /stand/vmunix **** Creating device files on the target disk **** ******* Renaming the following files: ******* '/.profile' has been renamed '/.profileBK' *********** Installing bootlif *********** mkboot -b /dev/rmt/1m -i ISL -i HPUX /dev/rdsk/c1t1d0 mkboot -a hpux (56/52.1.0;0)/stand/vmunix /dev/rdsk/c1t1d0 |
 |  |  |  |  | NOTE: If you are recovering a system with hard-sectored disks,
you will see a message similar to the following, instead of the
one above: |  |  |  |  |
*********** Installing bootlif *********** mkboot -b 15.16.128.126 -H -i ISL -i HPUX /dev/rdsk/c0t0d0 mkboot -a hpux (4.0.0;13)/stand/vmunix /dev/rdsk/c0t0d0 |
The following options are used: -H
is used with hard-sectored disks. -l
is used with LVM disks. -W is
used with whole disk configuration.
RECOVERY COMPLETION MENU Use this menu after the recovery process has installed all requested files on your system. Select one of the following: a. REBOOT the system and continue with recovery. b. Return to the Main Menu. Selection: |
Once you find yourself at the Recovery Completion
menu, complete the recovery process by selecting a.
You will see messages similar to the following: NOTE: System rebooting ... - PDC - Processor Dependent Code - Version 1.3 (c) Copyright 1990-1993, Hewlett-Packard Company, All rights reserved. - 16 MB of memory configured and tested. Primary boot path: 56/52.5 (dec) Alternate boot path: 56/52.3 (dec) Manufacturing permissions ON Main Menu Command Description BOot [PRI|ALT| <path>] Boot from specified path PAth [PRI|ALT|][ <path>] Display or modify a path SEArch [DIsplay|IPL][<path>] Search for boot devices COnfiguration menu Displays or sets boot values INformation menu Displays hardware information SErvice menu Displays service commands MFG menu Displays manufacturing commands DIsplay Redisplay the current menu HElp [<menu>|<command>] Display help for menu or command RESET Restart the system Main Menu: Enter command or menu item. |
Enter bo pri
at the prompt to boot from the primary boot path. The following
will then be displayed: Interact with IPL (Y or N)?> |
Enter n
for unattended boot. Several screens of status information will
be displayed, followed by this warning: THIS SYSTEM HAS BEEN BOOTED USING A TEMPORARY KERNEL! DO NOT ATTEMPT TO INVOKE MULTI-USER RUN-LEVEL USING THIS KERNEL! Type the following command from the shell prompt for more information about completing the recovery process: cat /RECOVERY.DOC |
To obtain more information on the recovery process,
type the following at the prompt: You will see the following information displayed: 1) Restore valid copies of the following files (either from backup or from the filename.BK files created during the recovery process). /etc/fstab, /etc/inittab, /stand/ioconfig, /etc/ioconfig, /etc/passwd, /sbin/pre_init_rc, /.profile, /etc/profile NOTE: The backup archive may be extracted using '/sbin/frecover' or'/sbin/pa x' (for backups made with 'tar' or 'cpio'). If using '/sbin/pax', linking it to 'tar' or 'cpio' will force'pax' to emulate the respective command line interface. 2) Replace /stand/vmunix from backup, since the present kernelis probably missing desired drivers. 3) If you have an lvm root, refer to the /LVM.RECOVER text file. |
If you have an LVM system, and want more information
on recovery procedures, type the following:  |  |  |  |  | NOTE: If a card has been added to, or removed from, your system
since the original installation was completed, there is a chance
that the device file for the root disk has changed. Consequently,
before you run the LVM script ./lvmrec.scrpt
(Step 2, below), you should first recover /stand/ioconfig
from backup, and reboot. |  |  |  |  |
You will see the following: INSTRUCTIONS to complete your LVM recovery: The system must now be up now in "maintenance mode". NOTE: In order for the following steps to lead to a successful lvm recovery the LVM label information must be valid. If the bootlif was updated from the RAM-based recovery system,then "mkboot -l" has already been run to repair this label.
step 1. If the autofile was altered to force the system to boot in maintenance mode, use "mkboot -a" to remove the "-lm" option. Example: to change "hpux -lm (52.6.0;0)/stand/vmunix" to "hpux (52.6.0;0)/stand/vmunix" Use the following: mkboot -a "hpux (52.6.0;0)/stand/vmunix"/dev/rdsk/<devicefile> |
 |  |  |  |  | NOTE: Use lssf /dev/rdsk/*
to match the device file with the boot address. |  |  |  |  |
 |
step 2. Run '/lvmrec.scrpt' to repair the following LVM configuration information: a. LVM records (lvmrec) b. BDRA (Boot Data Reserve Area) c. LABEL information Requirement: The following files must reside on disk before the script can complete: a. /etc/lvmtab b. /etc/fstab c. /etc/lvmconf/<rootvg>.conf d. all device files specified in /etc/fstab To run '/lvmrec.scrpt' provide the device file name used to access the bootlif as an argument to the script. Example: /lvmrec.scrpt c0t6d0 In this example 'c0t6d0' is the device file used to access the bootlif. step 3. Once '/lvmrec.scrpt' completes, issue the command "reboot" and bring the system fully up. The recovery of the root LVM is complete. If the'/lvmrec.scrpt' issued the following warning: "************ I M P O R T A N T ******************" " " "Root logical volume has been repaired, but......." "you need to reboot the system and repair the Swap" "logical volume using the following LVM command: " " lvlnboot -A n -s /dev/<root lv>/<swap lvol> " "because Recovery has no way to find out what is " "the Swap logical volume information at this point" " " "*************************************************" The Swap and Dump logical volumes will need to be re-configured The BDRA contains the "root", "swap" and "dump" logical volume information. '/ lvmrec.scrpt' only fixes the root logical volume information in the BDRA.The "swap" and "dump" areas can be updated via the "lvlnboot" command. Example: lvlnboot -s /dev/<vg00>/lvol2 lvlnboot -d /dev/<vg00>/lvol3 In this example 'lvol2' and 'lvol3' are the "swap" and "dump" logical volumes respectively. step 4. Perform any further data recovery deemed necessary. *** NOTE *** If the same volume group contains more than one corrupted bootdisk, Repeat the above steps for each disk that needs to be repaired. |
 |
This completes the process for rebuilding the bootlif
and installing critical files.
Installing Critical Root Files Only |  |
Following is an example of the detailed procedure for installing
all the critical files necessary to boot on the target root filesystem: Boot the CORE media, following the previous steps in “Rebuilding the bootlif
and Installing Critical Files ”. You will see some
status messages, and then a menu: ____________________________________________ Welcome to the HP-UX installation process! Use the <tab> and/or arrow keys to navigate through the following menus,and use the <return> key to select an item. If the menu items are not clear, select the "Help" item for more information. [ Install HP-UX ] [ Run a Recovery Shell ] [ Cancel and Reboot ] [ Advanced Options ] [ Help ] |
____________________________________________________ Select Run a Recovery Shell,
the screen clears, and the following question appears: Would you like to start up networking at this time? [n] |
If you have no need to access the net, enter n
and the following will be displayed: * Loading in a shell... * Loading in the recovery system commands...
|
... HP-UX SYSTEM RECOVERY CORE MEDIA WARNING: YOU ARE SUPERUSER !! NOTE: Commands residing in the RAM-based file system are unsupported 'mini'commands. These commands are only intended for recovery purposes. Loading commands needed for recovery! WARNING: If ANYTHING is changed on a root (/) that is mirrored, 'maintenance mode' (HPUX -1m) boot MUST be done in order to force the mirrored disk to be updated! Press <return> to continue. |
Press return
and the following status message is displayed: Loading commands needed for recovery! |
Then the following menu will be displayed: HP-UX CORE MEDIA RECOVERY MAIN MENU s. Search for a file b. Reboot l. Load a file r. Recover an unbootable HP-UX system x. Exit to shell c. Instructions on chrooting to a lvm /(root). This menu is for listing and loading the tools contained on the core media. Once a tool is loaded, it may be run from the shell. Some tools require other files to be present in order to successfully execute. Select one of the above: |
To begin the actual system recovery, select r.
The HP-UX Recovery MENU is then displayed: HP-UX Recovery MENU Select one of the following: a. Rebuild the bootlif (ISL, HPUX, and the AUTO file) and install all files required to boot and recover HP-UX on a target root file system. b. Do not rebuild the bootlif but install files required to boot and recover HP-UX on the root file system. c. Rebuild only the bootlif. d. Replace only the kernel on the root file system. m. Return to 'HP-UX Recovery Media Main Menu'. x. Exit to the shell. Use this menu to select the level of recovery desired. Selection: |
Select b
to install critical files only; the following menu is then displayed: DEVICE FILE VERIFICATION MENU This menu is used to specify the path of the root file system. When the information is correct, select 'a'. INFORMATION to verify: Device file used for '/'(ROOT) is c1t6d0 The path to disk is 56/52.6.0 Select one of the following: a. The above information is correct. b. WRONG!! The device file used for '/'(ROOT) is incorrect. m. Return to the 'HP-UX Recovery MENU.' x. Exit to the shell. NOTE: If '/' is an LVM, use an 's1lvm' suffix (e.g.,c0t1d0s1lvm). Selection: |
Assuming the root device file is incorrect, select
b; you will be
prompted to enter the correct device file name: Enter the device file associated with the '/'(ROOT) file system (example: c1t6d0): |
 |  |  |  |  | NOTE: On a system with hard-sectored disks, the prompt and
response might look like the following:Enter the device file associated with the '/'(ROOT) file system (example: c0t1d0s1lvm ) : c0t0d0s13 /dev/rdsk/c0t0d0s13 not a special file
|
|  |  |  |  |
<Press return to continue> Enter the address associated with the '/'(ROOT) file system (example: 4.0.1) : 4.0.0 NOTE: if your '/'(ROOT) is not part of a sectioned disk layout enter a 'W' for whole disk layout or enter a 'l' for an LVM disk layout instead of a section number. Enter the section associated with the '/'(ROOT) file system (example: 13 ): 13 making rdsk/c0t0d0s13 c 214 0x00000d making dsk/c0t0d0s13 b 26 0x00000d
|
If you were to enter, for example, c1t1d0
as the root device file name, you would see the following display: DEVICE FILE VERIFICATION MENU This menu is used to specify the path of the root file system. When the information is correct, select 'a'. INFORMATION to verify: Device file used for '/'(ROOT) is c1t1d0 The path to disk is 56/52.1.0 Select one of the following: a. The above information is correct. b. WRONG!! The device file used for '/'(ROOT) is incorrect. m. Return to the 'HP-UX Recovery MENU.' x. Exit to the shell. NOTE: If '/' is an LVM, use an 's1lvm' suffix (e.g.,c0t1d0s1lvm). Selection: |
Select a,
since c1t1d0
is the correct root device file name; the following menu will be
displayed: FILE SYSTEM CHECK MENU The file system check '/sbin/fs/hfs/fsck -y /dev/rdsk/c1t1d0' will now be run. Select one of the following: a. Run fsck -y . b. Prompt for the fsck run string on c1t1d0. m. Return to the 'HP-UX Recovery MENU.' Selection: |
Select a
to run fsck -y
to check your file system for corruption. You will see a display
similar to the following: ** /dev/rdsk/c1t1d0 ** Last Mounted on /ROOT ** Phase 1 - Check Blocks and Sizes ** Phase 2 - Check Pathnames ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts ** Phase 5 - Check Cyl groups 6256 files, 0 icont, 149423 used, 1563824 free (928 frags, 195362 blocks) Mounting c1t1d0 to the CORE media /ROOT directory... <Press return to continue> |
Assuming your file system is not corrupted, and
you wish to continue with the system recovery, press return
to mount your root file system under the CORE media /ROOT
directory; something similar to the following will be displayed: ***** Downloading files to the target disk ***** ,,, x ./sbin/lvchange, 528384 bytes, 1032 tape blocks ./sbin/lvcreate linked to ./sbin/lvchange ./sbin/lvdisplay linked to ./sbin/lvchange ./sbin/lvextend linked to ./sbin/lvchange ...
|
Filesystem kbytes used avail %cap iused ifree %iused Mounted on /ROOT 1713247 1494 1392496 10% 6261 275339 2% ?
|
Should the existing kernel be'left', 'overwritten', or 'moved'?[overwritten]
|
To overwrite the existing kernel with your new file
system, enter overwritten
or over at the
prompt. The following will be displayed: downloading INSTALL to /stand/vmunix **** Creating device files on the target disk **** ******* Renaming the following files: ******* '/.profile' has been renamed '/.profileBK' RECOVERY COMPLETION MENU Use this menu after the recovery process has installed all requested files on your system. Select one of the following: a. REBOOT the target system and continue with recovery. b. Return to the CORE Media Main Menu. Selection: |
Once you find yourself at the Recovery Completion
menu, complete the recovery process by selecting a.
You will see messages similar to the following: NOTE: System rebooting... PDC - Processor Dependent Code - Version 1.3 (c) Copyright 1990-1993, Hewlett-Packard Company, All rights reserved 16 MB of memory configured and tested. Primary boot path: 56/52.5 (dec) Alternate boot path: 56/52.3 (dec) Manufacturing permissions ON - Main Menu - Command Description - - BOot [PRI|ALT|<path>] Boot from specified path PAth [PRI|ALT] [<path>] Display or modify a path SEArch [DIsplay|IPL] [<path>] Search for boot devices COnfiguration menu Displays or sets boot values INformation menu Displays hardware information SERvice menu Displays service commands MFG menu Displays manufacturing commands DIsplay Redisplay the current menu HElp [<menu>|<command>] Display help for menu or command RESET Restart the system - Main Menu: Enter command or menu > |
Enter bo pri
at the prompt to boot from the primary boot path; the following
will then be displayed: Interact with IPL (Y or N)?> |
Enter n
for unattended boot; several screens of status information will
be displayed, followed by this warning: THIS SYSTEM HAS BEEN BOOTED USING A TEMPORARY KERNEL! DO NOT ATTEMPT TO INVOKE MULTI-USER RUN-LEVEL USING THIS KERNEL! Type the following command from the shell prompt for more information about completing the recovery process: cat /RECOVERY.DOC |
To obtain more information on the recovery process,
type the following at the prompt: You will see the following information displayed: 1) Restore valid copies of the following files (either from backup or from the <filename>BK files created during the recovery process). /etc/fstab, /etc/inittab, /stand/ioconfig, /etc/ioconfig, /etc/passwd, /sbin/pre_init_rc, /.profile, and /etc/profile NOTE: The backup archive may be extracted using '/sbin/frecover' or '/sbin/pax' (for backups made with 'tar' or 'cpio'). If using '/sbin/pax', linking it to 'tar' or 'cpio' will force 'pax' to emulate the respective command line interface. 2) Replace /stand/vmunix from backup, since the present kernel is probably missing desired drivers. 3) If you have an lvm root, refer to /LVM.RECOVER . |
If you have an LVM system, and want more information
on recovery procedures, type the following: The file contains the following information: If a card has been added to, or removed from, your system since the original installation was completed, there is a chance that the device file for the root disk has changed. Consequently, before you run the LVM script ./lvmrec.scrpt (Step 2, below), you should first recover /stand/ioconfig from backup and reboot. INSTRUCTIONS to complete your LVM recovery: The system must now be up now in "maintenance mode". NOTE: In order for the following steps to lead to a successful lvm recovery the LVM label information must be valid. If the bootlif was updated from the RAM-based recovery system, then "mkboot -l" has already been run to repair this label. step 1. If the autofile was altered to force the system to boot in maintenance mode, use "mkboot -a" to remove the "-lm" option. Example: to change "hpux -lm (52.6.0;0)/stand/vmunix" to "hpux (52.6.0;0)/stand/vmunix" use mkboot -a "hpux (52.6.0;0)/stand/vmunix" /dev/rdsk/<device file> |
 |  |  |  |  | NOTE: Use lssf /dev/rdsk/*
to match device file with boot address. |  |  |  |  |
 |
step 2. Run '/lvmrec.scrpt' to repair the following LVM configuration information: a. LVM records (lvmrec) b. BDRA (Boot Data Reserve Area) c. LABEL information Requirement: The following files must reside on disk before the script can complete: a. /etc/lvmtab b. /etc/fstab c. /etc/lvmconf/<rootvg>.conf d. all device files specified in /etc/fstab To run '/lvmrec.scrpt' provide the device file name used to access the bootlif as an argument to the script. Example: /lvmrec.scrpt c0t6d0 In this example 'c0t6d0' is the device file used to access the bootlif. step 3. Once '/lvmrec.scrpt' completes, issue the command "reboot" and bring the system fully up. The recovery of the root LVM is complete. If the '/lvmrec.scrpt' issued the following warning: "************ I M P O R T A N T ******************" " " "Root logical volume has been repaired, but......." "you need to reboot the system and repair the Swap" "logical volume using the following LVM command: " " lvlnboot -A n -s /dev/<root lv>/<swap lvol> " "because Recovery has no way to find out what is " "the Swap logical volume information at this point" " " "*************************************************" |
 |
 |
The Swap and Dump logical volumes will need to be re-configured. The BDRA contains the "root", "swap" and "dump" logical volume information. '/lvmrec.scrpt' only fixes the root logical volume information in the BDRA. The "swap" and "dump" areas can be updated via the "lvlnboot" command. Example: lvlnboot -s /dev/<vg00>/lvol2 lvlnboot -d /dev/<vg00>/lvol3 In this example 'lvol2' and 'lvol3' are the "swap" and "dump" logical volumes respectively. step 4. Perform any further data recovery deemed necessary. *** NOTE *** If the same volume group contains more than one corrupted boot disk, repeat the above steps for each disk that needs to be repaired. |
This completes the process for installing critical
files only.
Rebuilding the ''bootlif'' Only |  |
Boot the CORE media, following the steps in “Rebuilding the bootlif
and Installing Critical Files ”. You will see some
status messages, and then a menu: Welcome to the HP-UX installation process! Use the <tab> and/or arrow keys to navigate through the following menus, and use the <return> key to select an item. If the menu items are not clear, select the "Help" item for more information. [ Install HP-UX ] [ Run a Recovery Shell ] [ Cancel and Reboot ] [ Advanced Options ] [ Help ]
|
 |
Select Run a Recovery Shell,
the screen clears, and the following will be displayed: Would you like to start up networking at this time? [n] |
Enter n
and the following will be displayed: * Loading in a shell... * Loading in the recovery system commands... (c) Copyright 1983, 1984, 1985, 1986 Hewlett-Packard Co. ... HP-UX SYSTEM RECOVERY CORE MEDIA WARNING: YOU ARE SUPERUSER !! NOTE: Commands residing in the RAM-based file system are unsupported 'mini' commands. These commands are only intended for recovery purposes. Loading commands needed for recovery! WARNING: If ANYTHING is changed on a root(/) that is mirrored a 'maintenance mode'(HPUX -lm) boot MUST be done in order to force the mirrored disk to be updated!! Press <return> to continue. |
Press Return
and the following status message is displayed: Loading commands needed for recovery! |
The following message appears HP-UX CORE MEDIA RECOVERY MAIN MENU s. Search for a file b. Reboot l. Load a file r. Recover an unbootable HP-UX system x. Exit to shell c. Instructions on chrooting to a lvm /(root). Select one of the above: |
To begin the actual system recovery, select r.
The HP-UX Recovery MENU is then displayed: HP-UX Recovery MENU Select one of the following: a. Rebuild the bootlif (ISL, HPUX, and the AUTO file) and install all files required to boot and recover HP-UX on a target root file system. b. Do not rebuild the bootlif but install files required to boot and recover HP-UX on the root file system. c. Rebuild only the bootlif. d. Replace only the kernel on the root file system. m. Return to 'CORE Media Main Menu'. x. Exit to the shell. Use this menu to select the level of recovery desired. Selection: |
Select c
to rebuild the bootlif. The following menu is displayed: BOOTLIF PATH VERIFICATION MENU This menu must be used to determine the path to the bootlif (ISL, HPUX and the AUTO file). When the information is correct, select 'a'. INFORMATION to verify: Path to the bootlif is 56/52.1.0 Select one of the following: a. The above information is correct. b. WRONG!! The path to bootlif is incorrect. m. Return to the 'HP-UX Recovery MENU.' x. Exit to the shell. Selection: |
Assuming that the bootlif path is correct, enter
a; the following
menu is displayed: BOOT STRING VERIFICATION MENU This menu must be used to verify the system's boot string. When the information is correct, select 'a'. INFORMATION to verify: The system's boot string should be: 'hpux -lm (56/52.5.0)/stand/vmunix' Select one of the following: a. The above information is correct. b. WRONG!! Prompt the user for the system's boot string. m. Return to the 'HP-UX Recovery MENU.' x. Exit to the shell. NOTE: For an LVM '/'(ROOT) the '-lm' option MUST be specified (example: 'hpux -lm (2.3.4)/stand/vmunix' ) Selection: |
Assuming the boot string is incorrect, enter b
at the prompt. You will see a message similar to the following: AUTO FILE should be (replacing 'hpux (56/52.5.0)/stand/vmunix'): |
Enter the correct information (for example, hpux);
you will then see the BOOT STRING VERIFICATION MENU displayed again: BOOT STRING VERIFICATION MENU This menu must be used to verify the system's boot string. When the information is correct, select 'a'. INFORMATION to verify: The system's boot string should be: 'hpux' Select one of the following: a. The above information is correct. b. WRONG!! Prompt the user for the system's boot string. m. Return to the 'HP-UX Recovery MENU.' x. Exit to the shell. NOTE: For an LVM '/'(ROOT) the '-lm' option MUST be specified (example: 'hpux -lm (2.3.4)/stand/vmunix' ) Selection: |
 |  |  |  |  | NOTE: Use the -lm
option to enter LVM administration mode only when recovering an
LVM system. |  |  |  |  |
Assuming the information is now correct, enter a
at the prompt, and you will see one of the following two displays: For an LVM system, you will see something
like the following: *********** Installing bootlif *********** mkboot -b /dev/rmt/1m -i ISL -i HPUX /dev/rdsk/c1t1d0 mkboot -a hpux (56/52.5.0;0)/stand/vmunix /dev/rdsk/c1t1d0 |
If you are recovering a system with hard-sectored
disks, you will see a message similar to the following, instead
of the one above: *********** Installing bootlif *********** mkboot -b 15.16.128.126 -H -i ISL -i HPUX /dev/rdsk/c0t0d0 mkboot -a hpux (4.0.0;13)/stand/vmunix /dev/rdsk/c0t0d0 |
-H
is used with hard-sectored disks. -l
is used with LVM disks. -W
is used to specify the whole disk.
The Recovery Completion Menu is then displayed:
RECOVERY COMPLETION MENU Use this menu after the recovery process has installed all requested files on your system. Select one of the following: a. REBOOT the target system and continue with recovery. b. Return to the CORWE Media Main Menu. Selection: |
Once you find yourself at the RECOVERY COMPLETION
MENU, complete the recovery process by selecting a,
rebooting your system. This completes the process for rebuilding the bootlif
only.
Replacing the Kernel Only |  |
Boot the CORE media, following the steps in “Rebuilding the bootlif
and Installing Critical Files ”. You will see some
status messages, and then a menu: Welcome to the HP-UX installation process! Use the <tab> and/or arrow keys to navigate through the following menus, and use the <return> key to select an item. If the menu items are not clear, select the "Help" item for more information. [ Install HP-UX ] [ Run a Recovery Shell ] [ Cancel and Reboot ] [ Advanced Options ] [ Help ]
|
 |
Select Run a Recovery Shell, the screen clears, and the following
will be displayed: Would you like to start up networking at this time? [n] |
Enter n
and the following will be displayed: * Loading in a shell... * Loading in the recovery system commands... ... HP-UX SYSTEM RECOVERY CORE MEDIA WARNING: YOU ARE SUPERUSER !! NOTE: Commands residing in the RAM-based file system are unsupported 'mini' commands. These commands are only intended for recovery purposes. Loading commands needed for recovery! WARNING: If ANYTHING is changed on a root(/) that is mirrored a 'maintenance mode'(HPUX -lm) boot MUST be done in order to force the mirrored disk to be updated!! Press <return> to continue. |
Press return
and the following status message is displayed: Loading commands needed for recovery! |
You will see the following menu: HP-UX CORE MEDIA RECOVERY MAIN MENU s. Search for a file b. Reboot l. Load a file r. Recover an unbootable HP-UX system x. Exit to shell c. Instructions on chrooting to a lvm /(root). This menu is for listing and loading the tools contained on the CORE media. Once a tool is loaded, it may be run from the shell. Some tools require other files to be present in order to successfully execute. Select one of the above: |
To begin the actual system recovery, select r.
You will see the HP-UX Recovery menu: HP-UX Recovery MENU Select one of the following: a. Rebuild the bootlif (ISL, HPUX, and the AUTO file) and install all files required to boot and recover HP-UX on a target root file system. b. Do not rebuild the bootlif but install files required to boot and recover HP-UX on the root file system. c. Rebuild only the bootlif. d. Replace only the kernel on the root file system. m. Return to 'CORE media Main Menu'. x. Exit to the shell. Use this menu to select the level of recovery desired. Selection: |
Select d
to replace only the kernel on the root filesystem. The following
menu is then displayed: DEVICE FILE VERIFICATION MENU This menu is used to specify the path of the root file system. When the information is correct, select 'a'. INFORMATION to verify: Device file used for '/'(ROOT) is c1t6d0 The path to disk is 56/52.6.0 Select one of the following: a. The above information is correct. b. WRONG!! The device file used for '/'(ROOT) is incorrect. m. Return to the 'HP-UX Recovery MENU.' x. Exit to the shell. NOTE: If '/' is an LVM, use an 's1lvm' suffix (e.g.,c0t1d0s1lvm). Selection: |
Assuming the root device file is incorrect, select
b; you will be
prompted to enter the correct device file name: Enter the device file associated with the '/'(ROOT) file system (example: c1t6d0): |
 |  |  |  |  | NOTE: On a system with hard-sectored disks, the prompt and
response might look like the following: |  |  |  |  |
Enter the device file associated with the '/'(ROOT) file system (For example: c0t1d0s1lvm ) : device_file /dev/rdsk/device_file not a special file <Press return to continue> Enter the address associated with the '/'(ROOT) file system (For example: 4.0.1) : address NOTE: if your '/'(ROOT) is not part of a sectioned disk layout enter a 'W' for whole disk layout or enter a 'l' for an LVM disk layout instead of a section number. Enter the section associated with the '/'(ROOT) file system (For example: 13 ): 13 making rdsk/c0t0d0s13 c 214 0x00000d making dsk/c0t0d0s13 b 26 0x00000d |
If you were to enter c1t1d0
as the root device file name, you would see the following display: DEVICE FILE VERIFICATION MENU This menu is used to specify the path of the root file system. When the information is correct, select 'a'. INFORMATION to verify: Device file used for '/'(ROOT) is c1t1d0 The path to disk is 56/52.1.0 Select one of the following: a. The above information is correct. b. WRONG!! The device file used for '/'(ROOT) is incorrect. m. Return to the 'HP-UX Recovery MENU.' x. Exit to the shell. NOTE: If '/' is an LVM, use an 's1lvm' suffix (e.g.,c0t1d0s1lvm). Selection: |
Select a,
since c1t1d0
is the correct root device file name; the following menu will be
displayed: FILE SYSTEM CHECK MENU The file system check '/sbin/fs/hfs/fsck -y /dev/rdsk/c1t1d0' will now be run. Select one of the following: a. Run fsck -y . b. Prompt for the fsck run string on c1t1d0. m. Return to the 'HP-UX Recovery MENU.' Selection: |
Select a
to run fsck -y
to check your file system for corruption; you will see a display
similar to the following: ** /dev/rdsk/c1t1d0 ** Last Mounted on /ROOT ** Phase 1 - Check Blocks and Sizes ** Phase 2 - Check Pathnames ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts ** Phase 5 - Check Cyl groups 6256 files, 0 icont, 149423 used, 1563824 free (928 frags, 195362 blocks) Mounting c1t1d0 to the CORE media /ROOT directory... Filesystem kbytes used avail %cap iused ifree %iuse Mounted on /ROOT 434773 352461 38834 90% 15241 54647 22% ? Should the existing kernel be 'left', 'overwritten', or 'moved'?[moved]over |
To move the existing kernel with your new file system,
enter move at
the prompt. The following will be displayed: downloading INSTALL to /stand/vmunix RECOVERY COMPLETION MENU Use this menu after the recovery process has installed all requested files on your system. Select one of the following: a. REBOOT the target system and continue with recovery. b. Return to the CORE media Main Menu. Selection: |
Once you find yourself at the RECOVERY COMPLETION
MENU, complete the recovery process by selecting a,
REBOOT the target system....
This completes the process for replacing the kernel
only.
|