Running OS/2 Unattended

OS/2 Warp version 3 comes built-in with several features that make it ideal for running in an unattended environment. Some of these features are similar with those available in Unix systems - automatic writing of crash dumps, system reboots, etc.

This text will take you through a brief discussion of the handful of modifications you can make to CONFIG.SYS that will setup your OS/2 for automatic recovery from most system software and hardware problems. The automatic crash dump feature will require partitioning of your hard disk.

AUTOFAIL Command

The most basic step towards unattended system operation is to eliminate the "Abort, Retry, Ignore, Fail" errors which will suspend your application while the system waits for user response. This error can happens when, for example, you try to access drive A: when there is no disk in the drive. With this option turned on, OS/2 will automatically select Fail, normally the best course of action. In the above example, the process causing the error will receive a "drive not ready" error code.

To use this option, put the following line in your CONFIG.SYS:

        AUTOFAIL=YES

SUPPRESSPOPUPS Command

Another class of errors is caused by application crashes or other system errors. When such errors occurs, OS/2 pops up a window stating the error condition and giving you the option of viewing the register information or continuing by closing the offending process. As with the error class discussed in the previous section, OS/2 requires a user response. Using this option will tell OS/2 to automatically log the error to a specified drive, close the offending process, then proceed normally.

To set drive D: to contain the error log, put the following line in your CONFIG.SYS:

        SUPPRESSPOPUPS=D

Replace the D above with whatever drive letter you wish to use. Note that the colon after the drive letter is not specified. OS/2 will write the error information to the file POPUPLOG.OS2 in the root directory of the specified drive.

REIPL Command

The most fatal of OS/2 errors is a "system halt". This is usually caused by a fault in the kernal or other code running at the privileged supervisor mode (ring 0) of the 386/486 CPU. Errors occuring at this level cannot be recovered. Normally, you need do a cold reboot of your system. However, OS/2 can now automatically reboot your system for you. For the uninitiated, REIPL stands for Re-Initial Program Load.

To use this option, put the following line in your CONFIG.SYS:

        REIPL=ON

TRAPDUMP Command

If you wish to save a crash dump before your system performs an automatic reboot using the REIPL command above, you can use TRAPDUMP. You can write crash dumps to floppy drives, but this will require user intervention to feed the diskettes (as many as will hold the amount of RAM installed on your system!). If you wish to run an unattended system, crash dumps must be written to hard disk. First, you need to create a FAT partition to hold the crash dump. This partition must be 1 meg larger than the total amount of RAM installed on your system. This partition must be labelled SADUMP. You should not use this partition to store data because OS/2 automatically overwrites whatever is contained in it when writing the crash dump. If your SADUMP partition is drive E:, then put the following line in your CONFIG.SYS:

        TRAPDUMP=E:

Replace E: with whatever drive your SADUMP partition corresponds to on your system.

SETBOOT Command

The SETBOOT command is issued from the OS/2 command line (all the previous commands are used in CONFIG.SYS only) and essentially does what the FDISK allows you to do to configure the Boot Manager. There are additional features in SETBOOT.

You can use SETBOOT to configure 1 main partition and up to 3 backup partitions the Boot Manager should fallback to when it fails to successfully start up the default operating system. You need to have each operating system (all of which can be OS/2) installed in different partitions, each identified with a different label. Suppose your default boot partition is named OS2_MAIN and is drive C:. If this fails to boot, you want to start your system from a backup partition named OS2_BACKUP which is drive D:. If OS2_BACKUP also fails to boot, you want to start your system from the partition named OS2_OLD which is drive E:. The drive letters are not required to use SETBOOT command itself. To configure the fallback procedure, type the following on the command line:

        SETBOOT /3:OS2_MAIN /2:OS2_BACKUP /1:OS2_OLD /X:3

The parameters /3: to /1: are indices used to specify the order of partitions Boot Manager should attempt to restart. The /X: parameter specifies the partition corresponding to the given index value to startup automatically.

Every time Boot Manager boots up, the index value in /X: is decreased automatically. Therefore, you should setup the operating system (using AUTOEXEC.BAT in DOS or STARTUP.CMD in OS/2) in the OS2_MAIN partition to automatically run SETBOOT to reset the startup index:

        SETBOOT /X:3

This will ensure that after a successful startup in the OS2_MAIN partition, the Boot Manager will continue to boot OS2_MAIN the next time you reboot or restart your system.


Written by Lai Zit Seng