Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ chsys(1M) — HP-UX 5.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

sh(1)

osmgr(1M)

shutdown(1M)

stopsys(1M)

sync(1M)

CHSYS(1M)  —  Series 500 Only

NAME

chsys − change to different operating system or version

SYNOPSIS

/etc/chsys sysname

HP-UX COMPATIBILITY

Level: HP-UX/NON-STANDARD

Origin: HP

Remarks: Chsys is implemented on the Series 500 only. 

DESCRIPTION

Chsys is a shell script that enables you to boot a different operating system, or a different version of the same operating system, using only one boot area on one disc.  Sysname is one of a number of operating system names defined within chsys.  Chsys uses oscp(1M) to rebuild the boot area on /dev/rhd with the selected system, reading from ordinary files containing operating system code.  Chsys then invokes osck(1M) to confirm that the new system is "healthy".  (Note that osck performs a redundant check, so its invocation in chsys may be removed if you want to save time.) 

Chsys invokes oscp as quietly as possible.  Chsys causes oscp to read the new system ID string from a file selected by the sysname given, and redirects the output from oscp to /dev/null.  If oscp and osck are successful, chsys calls reboot(1M) to switch to the new operating system.  Note that oscp and osck together can take longer than a minute to run.  During this time, chsys keeps you informed as to what actions are being taken. 

If you simply want to re-boot the operating system already in the boot area, do not use chsys.  Instead, invoke reboot(1M) directly. 

If you want to allocate and use several boot areas on several discs, see osmgr(1M). 

You should modify chsys to localize it for your system.  You may want to add or delete available sysnames, change the names or meanings of sysnames, change the name of the character special file (/dev/rhd) which points to the boot volume, etc.  Chsys recognizes four default sysnames.  They stand for:

HP-UX Model 520 single-user minimal system;

HP-UX Model 520 single-user complete system;

BASIC minimal system;

BASIC complete system. 

These sysnames serve as examples for any others you may want to add.  They may or may not be useful to you. 

Chsys should only be invoked by the effective super-user unless both of the following are true:

the special file which points to the boot device must be readable and writable by whoever invokes chsys;

the reboot command must be owned by root and have the set-user-ID bit set. 

If either of the above are not true, either the oscp or the reboot command will fail. 

Chsys must be invoked with a $PATH that includes the directories containing the oscp, osck, reboot, and echo commands. 

RETURN VALUES

If any of the invoked commands fails, chsys writes a message to standard error and exits with the same return value as that returned by the unsuccessful command.  Chsys returns 1 if invoked improperly. 

SEE ALSO

sh(1), osmgr(1M), shutdown(1M), stopsys(1M), sync(1M). 

WARNINGS

Chsys does not check that the system is idle, and it does not notify all users that the system is going down.  You should usually execute shutdown(1M) before executing chsys. 

Chsys does not ask you to confirm that the intended operating system or version has been selected before the system is re-booted.  However, osck ensures that the system is rebootable, and reboot performs a sync(1M).  Note that new operating systems built in the boot area by oscp are always marked as loadable (see osmark(1M)). 
 

Hewlett-Packard  —  last mod. May 11, 2021

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026