I have seen many systems that have both OS/2 and some other operating system (usually NT) installed on two primary partitions. Usually BootManager is used to choose between the operating systems at bootup.
Problems may arise when a second OS/2 is used, for example a maintenance partition with a bare minimal installation of OS/2, or a RIPL server, or just a second full OS/2 on an extended partition.
Especially RIPL systems, that load the operating system from a remote RIPL server, usually store the swap file and temporary files on the local harddisk, on the C: partition. If that C: partition is NTFS (when NT was the previosly booted operating system), OS/2 cannot read from or write to C: and will store the swap file and temporary files on the RIPL server itself. Obviously, this will slow down the system.
The following batch file corrects this problem by checking which partition is active at bootup, and toggling the active partition if necessary.
There is one limitation: it checks for the name that is specified in BootManager for each partition.
To use this batch file those names have to match the names used in this batch file exactly.
In this case the HPFS partition is called OS/2 and the NTFS partition is called NT.
@ECHO OFF REM ChkFdisk.cmd, Version 2.00 REM Written by Rob van der Woude REM Checks if OS/2 partition is active on bootup, and makes it active REM and reboots if not. Also deletes "illegal" swap file on RPL server REM or extended partition REM For RPL servers or OS/2 on extended partitions only: specify full REM path and name of swap file on RPL server or extended partition SET SWAPFILE=Z:\OS2\SYSTEM\SWAPPER.DAT REM Otherwise: REM SET SWAPFILE= REM Check if OS/2 partition is active (C:) FDISK /QUERY | FIND "C:" | FIND "OS/2" > NUL REM If not, set it active IF ERRORLEVEL 1 GOTO ChgAccess REM If active, remove swap file from RPL server if necessary IF NOT "%SWAPFILE%"=="" IF EXIST %SWAPFILE% DEL %SWAPFILE% GOTO End :ChgAccess REM Toggle active partition FDISK /SETACCESS REM Check if it succeeded FDISK /QUERY | FIND "C:" | FIND "OS/2" > NUL REM If not, display error message IF ERRORLEVEL 1 GOTO Error REM Reboot if successfull SETBOOT /IBD:C: GOTO End :Error REM Error message ECHO <BELL>Error changing accessible partion: FDISK /QUERY PAUSE :End
page last uploaded: 2018-12-20, 10:47