OSCP(1M)
Series 500 Only
NAME
oscp − copy, create, append to, split operating system
SYNOPSIS
/etc/oscp [ −o ] [ −v ] fromvolume tovolume
/etc/oscp −m [ −v ] file ... tovolume
/etc/oscp −a [ −v ] file ... tovolume
/etc/oscp −s [ −v ] fromvolume
/etc/oscp −f [ −v ] fromvolume tofile
Remarks:
Oscp is implemented on the Series 500 only.
DESCRIPTION
Oscp enables you to perform:
boot-to-boot copy
Copy an operating system from the boot areas on one or more SDF volumes to the boot area on one SDF volume;
files-to-boot copy (−m, −a options)
Create a new operating system or append to an existing operating system from a list of ordinary files, and put the resulting system in one boot area;
boot-to-files copy (−s option)
Split up the segments in an operating system from one or more boot areas to one or more ordinary files.
boot-to-file copy (−f option)
Split up the segments in an operating system from one or more boot areas to a single ordinary file.
Fromvolume and tovolume are usually character special files.
Boot-to-Boot Copy
If −m, −a, −s, and −f are not specified, oscp does boot-to-boot copy. For normal, multi-volume boot-to-boot copy, oscp requires that the OSF on the first fromvolume be the first section of an n-section operating system. If n is greater than one, oscp prompts you for additional volumes as required. The additional volumes must be mounted in order.
Before starting the copy, oscp clears the OSF header on tovolume. The OSF header values are corrected on tovolume after the copy is done. This new header may include a new system ID string that you enter when you are prompted (the same ID string displayed by the boot loader).
The −o (one volume only) option tells oscp to copy only one OSF (which may be part or all of a system) from fromvolume to tovolume, without changing the OSF header.
The −v (verbose) option tells oscp to print additional information about each volume as it is encountered. Otherwise, oscp is silent except for warnings, errors, and prompts for new volumes and new system ID strings.
Files-to-Boot Copy
If the −m (merge) option is given, oscp does a files-to-boot copy from the specified files. The source files may be BASIC/9000 BIN files or HP-UX ordinary files. The files must all be accessible and contain valid code segments. The code segments must all be of the same system type. The last code segment in each file must be followed by two null bytes.
Note that segments of unknown type, and old power-up segments (before February 1983) are "generic donors", and may be merged with any other type. Also note that, when creating a new system, oscp uses the first OSF header magic number in its internal list (i.e. 0xE9C28206).
Once you enter the new system ID string, oscp destroys the old OSF (if any) in the boot area before writing the new system.
The −a (append) option allows you to append code segments from ordinary files to an existing OSF on tovolume. There must be enough unused space in the boot area after the OSF, and the OSF must be a complete system in itself (i.e. volume 1 of 1). The existing OSF is not invalidated until the last segment is copied to the boot area.
In conjunction with −m or −a, the −v (verbose) option gives you additional information about the boot area and each segment as it is encountered.
Boot-to-Files Copy
The −s (split) option allows you to split an operating system into one or more ordinary files (HP-UX ordinary files only, not BASIC BIN files). For each code segment in the operating system, you are prompted for a file name to which the code segment is appended. If you enter a null line, the code segment is appended to the same file as was used in the previous append operation.
If the size of the specified file is greater than zero, oscp backs up two bytes from the end of the file to overwrite the previous terminator before appending the code segment to the file.
The −v (verbose) option gives you additional information about the boot area and each segment as it is encountered.
Note that the resulting ordinary files may be owned by the owner of the oscp command, depending on its permissions.
Boot-to-File Copy
The −f option allows you to split an operating system into a single ordinary file (tofile), eliminating any user interaction (except possibly to change certain types of media, if that is where the boot area is located). Otherwise, this option behaves exactly like the −s option.
Copying to Boot Areas
Before beginning the copy, oscp prompts you for the 80-character operating system ID string to use for all volumes.
Before writing to tovolume, oscp first checks that it contains a boot area with sufficient unused space.
SEE ALSO
osck(1M), osmark(1M), osmgr(1M), sdfinit(1M).
DIAGNOSTICS
Oscp prints an appropriate error message and returns a non-zero value if fromvolume or tovolume cannot be accessed or is not an SDF volume, there is no boot area, the boot area contents appear invalid, or the source OSF is not section 1 of an n-section system.
Errors are also given if:
fromvolume and tovolume are the same (by name);
fromvolumes are mounted out of order;
a specified ordinary file is inaccessible or has invalid contents;
the first segment is not a power-up segment;
any segment has a mismatching system type.
See osmgr(1M) for the exact list of return values.
BUGS
Oscp −a checks that all appended segments are mutually compatible, but it does not check them against the segments in the existing OSF.
Performing an oscp −a to a boot area with less than 1024 free bytes results in an error before the copy completes.
Before appending, oscp −s backspaces over the existing two-null-byte terminator at the end of each ordinary file, but it does not check that the bytes overwritten were actually two null bytes.
A boot area of less the 1024 bytes, at the end of a volume, results in a read error.
Hewlett-Packard Company — April 12, 1993