update(1M)
NAME
update, updist − update or install HP-UX files (software products)
SYNOPSIS
/etc/update [−m] [−s source] [−S series] [−P port] [−C codeword] [−d destination] [−r [kernel_gen_file]] [−b boot_partition] [−f file] [fileset...]
/etc/update −i
/etc/update −c [−s source] [−S series] [−P port] [−C codeword]
/etc/updist (same except −r and −b are not supported)
/etc/mk_cnodekern linkset_flag_file cnode_name
DESCRIPTION
update is used interactively or non-interactively to:
• Update the HP-UX operating system and core product files,
• Install new HP-UX application software (optional products),
• Update existing optional HP-UX application software.
The updist command is similar to update, except that it installs or updates the HP-UX system or application files as “fileset packages” in a special directory. This allows the system to be a network file distribution (netdist) server. The network server daemon, netdistd(1M), finds the files in this special directory and supplies them to a remote update process on request.
The mk_cnodekern script is used by update to rebuild cluster node kernels.
If no options or fileset names are specified, update and updist run interactively, providing help screens to aid in selection of installation or update options. If one or more options or fileset names are specified, update and updist run non-interactively as indicated by the options and fileset names given.
update and updist load files from three types of update media:
• tar-format serial media, normally nine-track, cartridge, or DAT tapes, or an ordinary file containing an appropriate tar image
• systems configured to be netdist servers
• directories, normally mounted CD-ROMs
Tape update media consist of simple tar(1) archives containing product files and directories, plus a few leading information files, and specially-crafted file paths that allow files to be grouped into filesets (see Filesets and Partitions below; also update(4)). When run non-interactively, update and updist run unattended and therefore do not allow loading from multiple media units (tapes). If an attempt is made to load from multiple media non-interactively, update refuses to begin loading; updist loads from the first media unit only, then terminates with a warning message.
When updating from a netdist server system or from a CD-ROM (directory), the update “media” consists of a collection of files in a directory hierarchy plus various information files that, together, act as a single media volume. (The netdist server and CD-ROM directory formats are different.)
The cdfs file system must be configured in the kernel to mount a CD-ROM.
Before loading any filesets, update and updist calculate the additional disk space consumed by the installation or update. This prevents loading of filesets when sufficient disk space is not available.
Only the super-user can run update and updist.
Options
update and updist support the following options when used non-interactively:
−m (match) Load new versions of all filesets currently installed on the system. The /etc/filesets directory is used to determine the currently loaded set. If fileset names change between releases of the HP-UX core functionality, update and updist use an internal table to convert old names to corresponding names in the new release.
(The updist command cannot match the filesets already loaded on the system for distribution by a netdist server. However, it is possible to construct the list manually and run updist from the command line with the desired list.)
−s source Specify a non-default source for the update. source can be:
• Absolute path name of local special file representing a nine-track, cartridge, or DAT tape.
• Absolute path name of regular file containing an update media image in tar format.
• Hostname of a netdist server system running the netdistd(1M) daemon.
• Absolute path name of directory, normally a CD-ROM file system (must be listed in the checklist file or already mounted).
The default source is /dev/update.src on Series 300, 400, and 700 systems and /dev/rmt/0m on Series 600 and 800 systems.
−S series Specify Series 300/400 (−S300), Series 700 (−S700), or Series 600/800 (−S800) for the type of files you expect to extract from the source media. The default is the type of system on which update or updist is run. Use this option when:
• loading files for the non-default system type from a netdist server system;
• loading from update media that is made for more than one type of system. (For the 8.05 release, media can be made for both Series 700 and 600/800 systems.)
−P port Set the port number for the netdist service (applies only if the source is a netdist server). This option overrides the number in the network services database (see FILES below). It is useful when a netdist server system offers various software packages through different netdist servers at different port numbers.
−C codeword Specify a codeword for allowing access to protected software loaded from a directory (normally a mounted CD-ROM). A codeword is a string of 16 or 29 characters. codewords are issued by HP and are based on hardware IDs associated with specific hardware units attached to the system when the software is updated.
Hardware units that provide hardware IDs can be any of:
• An SPU ID: provides a machine ID number from uname(2) as found in a LAN card (Series 300/400; for 7.0, the lla driver must be in the kernel), or the SW_ID field in Stable Storage (Series 700 and 600/800).
• A Model 46084A HP-HIL ID module or Model 460841 HP-HIL exchange ID module: either provides a security number (on Series 600/800 systems, the hil driver must be in the kernel).
• An HP-C1707A CD-ROM drive: provides a security number (the drive must be mounted, or listed in the checklist file and mountable). Not supported on Series 700 systems.
The −C option is required when the source is a directory, and ignored otherwise. Run update or updist interactively to set up a products list file for the directory (see FILES below) before using this option non-interactively.
update and updist remember the last valid codeword specified in any previous invocation (see FILES below). If the same codeword is to be reused, the −C option can be omitted.
−d destination Specify a non-default destination directory under which filesets are unpacked. For update the default destination is /. Some filesets require that the destination directory be /. This option is used for updating an application that can be installed anywhere on the file system.
For updist the default destination is /netdist. This option is used for creating alternate source trees for netdistd.
−r [kernel_gen_file]
(update only) Reboot after loading all requested filesets, if required, and (for Series 600/800 only) specify the kernel generation file that reflects the currently-running kernel. With this option, if any fileset is marked as requiring a system reboot, update reboots the system after loading files and rebuilding the kernel, regardless of currently running processes. This option is required if a fileset is selected that modifies the kernel.
On Series 300, 400, and 700 systems, no kernel_gen_file option argument is required or allowed, because update extracts a new kernel generation file from the currently running system when necessary (if and only if the KERN-BLD fileset is selected for loading). On Series 600/800 systems, kernel_gen_file is typically /etc/conf/gen/S800. There is no default value. The option argument is required because update must inspect or alter the generation file to succeed.
−b boot_partition
(update only; Series 600/800 only) Specify the current boot partition on the disk. The disk partition, not to be confused with a logical (fileset) partition, is the name of a special file relative to /dev/rdsk. The default is c0d0s6. The disk partition must contain a LIF volume.
When run interactively, update uses the default value, and prompts for an alternate value only if /dev/rdsk/c0d0s6 is unusable or that partition does not contain a LIF volume.
−f file Read from the specified file, rather than from the command line, the list of filesets or partitions to be loaded (see Filesets and Partitions below). Blank lines and comments in the file are ignored. Comments are remainders of lines beginning with # following whitespace or at the start of a line.
−i Produce a list of hardware IDs available on the system for requesting a codeword to allow access to protected software (see the −C option above). Note that the −i option only reports on CD-ROM drives already mounted; not those that would be mounted automatically by update or updist before loading from them.
−c Produce a table of contents from the source media. update and updist write a list of partition.fileset names to standard output, one name per line (see Filesets and Partitions below). The output includes comments describing the size of each fileset, its media unit number, any associated fileset flags (see update(4)), its version number, and its description. The output is usable as input to the −f option. Comment out or delete the lines for any filesets you do not want to load.
The −m and −f options cannot be used when naming filesets explicitly, and vice-versa.
Filesets and Partitions
update and updist load units called “filesets” that are groups of related files. One or more filesets can be further grouped into logical “partitions”. Filesets and partitions are the items that you can choose from when updating.
One or more filesets or partitions can be selected for loading. The format of partition/fileset names is:
partition.fileset
The following shorthand specifications are allowed:
partition Select all filesets in a partition.
fileset Select an individual fileset.
∗ Select all filesets on the media. The ∗ must be escaped in the command line to prevent its expansion by the shell.
Any fileset might require other filesets on which it depends. The update media includes this dependency information. Thus, selection of a fileset with dependencies (interactively or from the command line) causes automatic selection of other required filesets if they are not already present on the system (or for updist, in the netdist source tree) with a version number equal to or greater than that required. (Version numbers are stored in per-fileset index files; see FILES below.) Likewise, interactive unselection of a fileset causes automatic unselection of its other required filesets, unless you explicitly selected them or selected other filesets that require them.
update creates or rewrites fileset lists in “fileset files” under the filesets directory (see FILES below). Each file in this directory has the same name as the fileset it represents. Each line in a filesets file is the full, absolute path name (actual destination) of a corresponding file loaded as part of the fileset.
Filesets marked as requiring rebooting are always loaded first so update can rebuild the kernel after loading them. If rebuilding fails, update aborts rather than loading any other filesets, because they might include executable files that cannot run correctly on the current system version.
Updating Netdist Server Master Files
updist transfers filesets from update media to a special tree under the local file system of an update server system and prepares the filesets for use by the netdistd(1M) server process. updist differs from update as follows:
• The default destination is /netdist.
• Fileset files are not created.
• The kernel is not rebuilt and the system is not rebooted.
• Customize scripts are not run.
• Other information files are prepared under the special tree.
Mounted Volumes and Links
update and updist avoid loading files under directories that are on read-only file systems or those normally used as NFS mount points. Both commands begin by executing mount −a with errors ignored. They then check and require that all disks listed in /etc/checklist are indeed mounted (the disks must be listed in /etc/mnttab).
update and updist break hard links when re-creating updated files. They also follow symbolic links and update the targets of the symbolic links. update records in fileset files the absolute path of updated files, after resolving any symbolic links.
HP Clustered Environment
update and updist recognize filesets as containing Series 300/400, Series 700, or Series 600/800 files. If a fileset contains Series 300/400 files and is being loaded onto a Series 700 or Series 600/800 cluster server file system in a mixed cluster, update creates context-dependent file (CDF) elements as required (specified by the media), and records their explicit path names in fileset files. updist maintains separate subdirectories for each Series.
update does not install cluster servers or convert stand-alone systems to cluster servers. Use sam(1M) for that purpose.
On a clustered system, only the cluster server’s checklist file is checked to ensure that all volumes are mounted. Locally mounted file systems are ignored; ensure they are properly mounted or unmounted as required prior to doing the update.
On a mixed cluster such as a Series 700 server with Series 300 client nodes, some files are shared (common); that is, not CDFs. update skips loading common files if they are in a fileset whose version on the update media is lower than the highest version of that fileset on the system for any architecture type (usually the opposite type). For example, suppose your Series 700 server is running 8.05 software, and you are updating your Series 300 clients to version 8.0. update does not load the common files in 8.0 version filesets because higher versions of those files already exist on the server. The higher version of each file is designed to be backward compatible.
update provides a way to override the default behavior. Setting the environment variable UPDATENOSKIP (with any value) causes update to load all common files. This might create incompatibilities between the server and clients. For example, type:
UPDATENOSKIP ="" update
The mk_cnodekern Script
This script directs the building of a kernel for a cluster node if one is not already built. It is called by each Series 300 cnode’s temporary copy of /etc/inittab when that cnode is initially booted following an update that has rebuilt the cluster server’s kernel. It always restores the cnode’s original /etc/inittab file regardless of the success or failure of the kernel build attempt.
The first argument, linkset_flag_file, is a value unique to the cnode in question (such as the inode number of its current kernel file) to be used to distinguish a lock file and other temporary files. The second argument, cnode_name, is the name of the kernel to build.
RETURN VALUE
Upon completion, update returns one of the following values:
0 the update ran successfully to completion
1 an error occurred and no files were loaded
2 an error occurred and some files might have been loaded; review the log file for details (see FILES below)
DIAGNOSTICS
Messages are displayed during interactive execution, and error messages result from invalid non-interactive invocation. For information about any failures encountered while loading filesets in either mode, inspect the log file (see FILES below).
EXAMPLES
Update or install the filesets “AMERICAN” and “NETIPC” on the system using the default source device and destination directory:
update AMERICAN NETIPC
Update or install all filesets on the media in the default source device under the directory /tmp:
update -d /tmp ’∗’
Print the contents of the update media accessed through special file /dev/rmt:
update −c −s /dev/rmt
Update all files in filesets currently on the system (match), rebuilding the kernel and rebooting when done if necessary:
update −mr
Extract fileset “TEXT-FMT” from the default source device and make it available to other systems via netdistd. In this example, /pseudoroot is the directory from which netdistd draws its files:
updist −d /pseudoroot TEXT-FMT
WARNINGS
Attempting to load from 8.0 or later update media with a 7.0 version of update results in an arcane message about an improper file size line in the INFO file. If you encounter this condition, load the new version of the TOOL fileset from the new update media, following the directions in the Installing and Updating HP-UX manual.
Always review the log file after an update for relevant errors, warnings, and other messages.
update can rebuild the kernel (including cluster node kernels, if any) and reboot the system as part of an update. Flags associated with each fileset indicate the necessity for a rebuild and reboot. In interactive mode, update warns you if such a fileset is selected. If the system is not in a quiescent state, you can proceed, or abort update and take appropriate action to bring the system to single-user state. In command-line invocation with a rebooting fileset selected, update aborts before loading any filesets unless the −r option is specified.
If any loaded fileset is flagged for reboot, and any other loaded fileset is not, update reboots the system twice. The first reboot brings up the new kernel and allows deferred customize scripts to run. The second reboot restarts the system in its normal state after all customization is complete.
(In this case, update leaves a file named /tmp/customize on the system. This is the master customize script that invokes all others and causes the second system reboot. It can be removed without risk.)
Most filesets are flagged such that update does not remove their files first (using sysrm(1M)). If a fileset is updated to a different destination than where currently installed, the old version might not be deleted. In this case, you might want to run sysrm(1M) manually before the update (before the fileset file is revised). (After loading the 8.0 or later TOOL fileset, run rmfn(1M) instead of sysrm. rmfn is in the TOOL fileset.) Also, if a fileset name changes, update removes the fileset using its current name, which might be ineffective.
The rmfn and sysrm commands cannot be used to remove packages loaded by updist. To remove updist-package files, run rm −r on the corresponding package directories under the netdist source tree, then edit the central package definition file to comment out or delete the references to the package.
Fileset name translation with the −m option is limited to filesets in the core HP-UX product, and excludes optional or third-party products and software subsystems.
When run interactively, update and updist depend on the TERM environment variable to determine the display type. If the variable is absent or has the wrong value, the display might behave oddly.
Interactive update and updist use special function keys (SFKs) extensively. They do not save or restore user function-key definitions after the update is complete.
CD-ROM File System (CDFS) support must be configured into the kernel (using sam(1M)) before attempting to mount and load from a CD-ROM.
DEPENDENCIES
Series 700
For releases before 8.05, such as 8.0 and 8.01, update and updist do not distinguish Series 700 and Series 600/800 update media. They refer to Series 700 systems and update media as “S800”. In cases where the filesets on the media do not run equally well on both Series, be sure to load from the correct media according to the printed label, or, in the case of a netdist server, from the correct port number. (See DEPENDENCIES in netdistd(1M).)
NFS The update and updist commands refuse to update files on remote systems over NFS network connections. They pre-mount all normally mounted volumes, including NFS mounts, to ensure that such files are detected and that unwanted files are not deposited under the mount point on the local disk. update and updist complete loading all local files, give warnings about remote files not loaded, and return 0 if no other problems are detected.
Networking
To load files from a netdist server system, networking services must be configured into the local kernel and turned on.
AUTHOR
update and updist were developed by HP.
FILES
/dev/update.src default source for Series 300, 400, and 700 systems
/dev/rmt/0m default source for Series 600 and 800 systems
/ default destination for update
/netdist default destination for updist and source for netdistd
/etc/filesets directory where fileset files are stored
/system directory containing important information about and customize scripts for each fileset
/system/fileset/index provides information about the fileset, in particular, its version (update uses the version to decide if a dependee fileset is already current on the system and need not be reloaded)
/system/fileset/update_dest
names the destination directory under which a fileset was loaded, if other than /, for later use by sam(1M) when clustering a system
/tmp/update.log log file describing the events that occurred during the update process, including errors, warnings, and notes
/tmp/update.procs list of unexpected processes running concurrently with update; only created if a related warning is reported
/tmp/update.killall script to kill unexpected processes; only created if a related warning is reported
/tmp/update.cleanup list of files logged as non-removable, usually due to “text file busy”
/tmp/update.kernbld used by cluster nodes to rebuild their kernels at the next reboot
/tmp/customize script left on the system when some customize scripts are executed after a reboot onto a newly built kernel (runs in / and moves itself to /tmp when done)
/etc/interface.lib/jam directory containing JAM user interface information
/etc/update.lib directory containing files used by update and updist when run interactively
/etc/update.lib/codeword
saves the last valid codeword provided to an invocation of update or updist
/etc/services networking services database, file describing networking services, including the netdist service
/etc/checklist list of volumes that should be mounted
/etc/mnttab list of volumes currently mounted
SEE ALSO
tar(1), rmfn(1M), sam(1M), sysrm(1M), mount(1M), netdistd(1M), update(4).
HP-UX System Administrator and Installing and Updating HP-UX manuals.
Hewlett-Packard Company — HP-UX Release 8.07: November 1991