home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 8 Other / 08-Other.zip / adsmboot.zip / ADSMBOOT.CMD next >
OS/2 REXX Batch file  |  1996-01-08  |  9KB  |  213 lines

  1. /******************************************************************
  2.  * To create boot disks for ADSM boot recovery under Warp Connect.
  3.  *
  4.  * NOTE:
  5.  *  1. These files are layed out for Drive A: being 1.44, and Drive
  6.  *     B: being 1.22.
  7.  ******************************************************************/
  8.  
  9. /******************************************************************
  10.  * Be sure to properly set the next few entries to match your system.
  11.  * Don't change anything else!
  12.  ******************************************************************/
  13.  
  14. Ether_Driver =  'ELNK16.OS2'
  15.  
  16. OS2_Drive    =  'D:'
  17. IBMCOM_Drive =  'D:'
  18. MPTN_Drive   =  'D:'
  19. TCPIP_Drive  =  'D:'
  20. ADSM_Path    =  'E:\util\adsm'
  21.  
  22. /* Driver1    =  'AHA?????.ADD' */   /* Scsi hasn't been tried yet */
  23. Driver1      =  'IBM1S506.ADD'       /* for IDE */
  24.  
  25.  
  26. /*********************************************************************
  27.  * Begin copying files.
  28.  *********************************************************************/
  29.  
  30. 'cls'
  31. say ''
  32. say ''
  33. say '   This procedure will be copying files to three disks. It will first'
  34. say 'use drive A:, then drive B:, then A: again.'
  35. say ''
  36. say 'Please make sure you have three blank, formatted disks.'
  37. say ''
  38. say 'If you don''t have the disks ready, just open another command-line window'
  39. say 'and format the disks.'
  40. say ''
  41. say ''
  42. say ''
  43. say 'Place the first boot disk in drive A:, and the second boot disk in B:'
  44. say ''
  45. say ''
  46. pause
  47.  
  48. OS2_Drive'\OS2\INSTALL\BOOTDISK\SYSINSTX A:'   /* create system disk */
  49.  
  50. 'COPY 'OS2_Drive'\OS2\BOOT\'Driver1' A:'       /* copy the HD controller driver */
  51.                                                /* if scsi is ever tried, more   */
  52.                                                /* copies may need to be placed  */
  53.                                                /* here for os2scsi.dmd, etc.    */
  54.  
  55. 'ATTRIB -H -S 'OS2_Drive'\OS2KRNL'             /* prepare to copy system files  */
  56. 'ATTRIB -H -S 'OS2_Drive'\OS2LDR'
  57. 'ATTRIB -H -S 'OS2_Drive'\OS2LDR.MSG'
  58. 'ATTRIB -H -S 'OS2_Drive'\OS2VER'
  59.  
  60. 'COPY 'OS2_Drive'\OS2KRNL       A:'            /* copy system files             */
  61. 'COPY 'OS2_Drive'\OS2LDR        A:'
  62. 'COPY 'OS2_Drive'\OS2LDR.MSG    A:'
  63. 'COPY 'OS2_Drive'\OS2VER        A:'
  64.  
  65. 'ATTRIB +H +S 'OS2_Drive'\OS2KRNL'             /* undo the changes to system files */
  66. 'ATTRIB +H +S 'OS2_Drive'\OS2LDR'
  67. 'ATTRIB +H +S 'OS2_Drive'\OS2LDR.MSG'
  68. 'ATTRIB +H +S 'OS2_Drive'\OS2VER'
  69.  
  70.  
  71. /* put the hard disk driver in config.sys as the top line.    */
  72. /* append the vanilla config.sys.                             */
  73. /* append the device statement for the ethernet driver at     */
  74. /* the end of config.sys.  It will be set to drive B:         */
  75. /* because that's where the driver will be copied in a moment */
  76.  
  77. echo 'BASEDEV='Driver1'  > A:\config.sys'
  78. 'type config.dsm >> A:\config.sys'
  79. echo 'DEVICE=B:\'Ether_Driver'  >> A:\config.sys'
  80.  
  81. 'COPY 'OS2_Drive'\OS2\CMD.EXE                          A:'  /* copy OS/2 files */
  82. 'COPY 'OS2_Drive'\OS2\HPFS.IFS                         A:'
  83. 'COPY 'OS2_Drive'\OS2\KEYBOARD.DCP                     A:'
  84. 'COPY 'OS2_Drive'\OS2\BOOT\CLOCK01.SYS                 A:'
  85. 'COPY 'OS2_Drive'\OS2\BOOT\DOS.SYS                     A:'
  86. 'COPY 'OS2_Drive'\OS2\BOOT\IBM1FLPY.ADD                A:'  
  87. 'COPY 'OS2_Drive'\OS2\BOOT\IBMKBD.SYS                  A:'
  88. 'COPY 'OS2_Drive'\OS2\BOOT\KBDBASE.SYS                 A:'  
  89. 'COPY 'OS2_Drive'\OS2\BOOT\OS2DASD.DMD                 A:'
  90. 'COPY 'OS2_Drive'\OS2\BOOT\PRINT01.SYS                 A:'
  91. 'COPY 'OS2_Drive'\OS2\BOOT\RESOURCE.SYS                A:'
  92. 'COPY 'OS2_Drive'\OS2\BOOT\SCREEN01.SYS                A:'
  93. 'COPY 'OS2_Drive'\OS2\BOOT\TESTCFG.SYS                 A:'
  94. 'COPY 'OS2_Drive'\OS2\INSTALL\BOOTDISK\VTBL850.DCP     A:'
  95. 'COPY 'OS2_Drive'\OS2\SYSTEM\COUNTRY.SYS               A:'
  96. 'COPY 'OS2_Drive'\OS2\SYSTEM\HARDERR.EXE               A:'
  97.  
  98. 'COPY 'IBMCOM_Drive'\IBMCOM\PROTOCOL\NETBEUI.OS2       A:' /* copy TCPIP files */
  99. 'COPY 'IBMCOM_Drive'\IBMCOM\PROTOCOL\NETBIND.EXE       A:'
  100. 'COPY 'IBMCOM_Drive'\IBMCOM\LT2.MSG                    A:'
  101. 'COPY 'IBMCOM_Drive'\IBMCOM\PRO.MSG                    A:'
  102. 'COPY 'IBMCOM_Drive'\IBMCOM\PROTMAN.OS2                A:'
  103. 'COPY 'MPTN_Drive'\MPTN\PROTOCOL\IFNDIS.SYS            A:'
  104. 'COPY 'MPTN_Drive'\MPTN\BIN\CNTRL.EXE                  A:' 
  105.  
  106.  
  107. 'COPY 'OS2_Drive'\OS2\BOOT\CDFS.IFS              B:'  /* copy OS/2 files */
  108. 'COPY 'OS2_Drive'\OS2\DLL\ANSICALL.DLL           B:'
  109. 'COPY 'OS2_Drive'\OS2\DLL\BKSCALLS.DLL           B:'
  110. 'COPY 'OS2_Drive'\OS2\DLL\BMSCALLS.DLL           B:'
  111. 'COPY 'OS2_Drive'\OS2\DLL\BVHINIT.DLL            B:'
  112. 'COPY 'OS2_Drive'\OS2\DLL\BVSCALLS.DLL           B:'
  113. 'COPY 'OS2_Drive'\OS2\DLL\DOSCALL1.DLL           B:'
  114. 'COPY 'OS2_Drive'\OS2\DLL\KBDCALLS.DLL           B:'
  115. 'COPY 'OS2_Drive'\OS2\DLL\MOUCALLS.DLL           B:'
  116. 'COPY 'OS2_Drive'\OS2\DLL\MSG.DLL                B:'
  117. 'COPY 'OS2_Drive'\OS2\DLL\NAMPIPES.DLL           B:'
  118. 'COPY 'OS2_Drive'\OS2\DLL\NLS.DLL                B:'
  119. 'COPY 'OS2_Drive'\OS2\DLL\OS2CHAR.DLL            B:'
  120. 'COPY 'OS2_Drive'\OS2\DLL\QUECALLS.DLL           B:'
  121. 'COPY 'OS2_Drive'\OS2\DLL\SESMGR.DLL             B:'
  122. 'COPY 'OS2_Drive'\OS2\DLL\UCDFS.DLL              B:'
  123. 'COPY 'OS2_Drive'\OS2\DLL\UHPFS.DLL              B:'
  124. 'COPY 'OS2_Drive'\OS2\DLL\VIOCALLS.DLL           B:' 
  125.  
  126. 'COPY 'IBMCOM_Drive'\IBMCOM\PROTOCOL.INI         B:'  /* copy TCPIP files */
  127. 'COPY 'TCPIP_Drive'\TCPIP\ETC\PROTOCOL           B:'
  128. 'COPY 'IBMCOM_Drive'\IBMCOM\MACS\'Ether_driver  'B:'
  129. 'COPY 'MPTN_Drive'\MPTN\DLL\TCPIPDLL.DLL         B:'
  130. 'COPY 'MPTN_Drive'\MPTN\PROTOCOL\AFINET.SYS      B:'
  131. 'COPY 'MPTN_Drive'\MPTN\PROTOCOL\SOCKETS.SYS     B:'
  132. 'COPY 'MPTN_Drive'\MPTN\PROTOCOL\AFOS2.SYS       B:'
  133.  
  134. 'COPY 'ADSM_path'\DLL\FCLCNRP.DLL                B:'  /* copy ADSM files */
  135. 'COPY 'ADSM_path'\DLL\HPFS386.DLL                B:'
  136.  
  137.  
  138. 'cls'
  139. say ''
  140. say ''
  141. say 'Remove the two boot disks, and label them '
  142. say '      ''ADSM Boot Disk A'' and            '
  143. say '      ''ADSM Boot Disk B''                ' 
  144. say ''
  145. say '(Disk A contains only those files needed during boot '
  146. say ' and Disk B contains DLLs, etc. needed during boot as '
  147. say ' well as during TCPIP and ADSM activity. Disk B also '
  148. say ' contains the ethernet adaptor driver.  If you ever use '
  149. say ' these disks on another machine, you will need to replace '
  150. say ' this driver with the correct one, and edit config.sys to '
  151. say ' load the correct driver name.)'
  152. say ''
  153. say ''
  154. say 'Put the third disk in drive A:            '
  155. say ''
  156. pause
  157. 'COPY 'OS2_Drive'\OS2\TEDIT.EXE                A:' /* copy OS/2 utilities */
  158. 'COPY 'OS2_Drive'\OS2\TEDIT.HLP                A:'
  159. 'COPY 'OS2_Drive'\OS2\CHKDSK.COM               A:'
  160. 'COPY 'OS2_Drive'\OS2\FDISK.COM                A:'
  161. 'COPY 'OS2_Drive'\OS2\FORMAT.COM               A:'
  162.  
  163. 'COPY 'MPTN_Drive'\MPTN\BIN\INETWAIT.EXE       A:' /* copy TCPIP config files */
  164. 'COPY 'MPTN_Drive'\MPTN\BIN\IFCONFIG.EXE       A:'
  165. 'COPY 'MPTN_Drive'\MPTN\BIN\ROUTE.EXE          A:'
  166. 'COPY 'MPTN_Drive'\MPTN\BIN\ARP.EXE            A:'
  167. 'COPY 'TCPIP_Drive'\TCPIP\BIN\IPGATE.EXE       A:'
  168.  
  169. /* normally, config.sys runs mptnstart.cmd which  */
  170. /* does 'INETWAIT' and then runs setup.cmd to do  */
  171. /* IFCONFIG/ROUTE/etc.  We're just going to stick */
  172. /* INETWAIT into setup.cmd as the first line, and */
  173. /* append startup.cmd to it.  User only needs to  */
  174. /* run setup.cmd, and it will do the INETWAIT.    */
  175. /* IP Addrs are hard coded in setup.cmd           */
  176.  
  177. echo 'INETWAIT  >  A:\SETUP.CMD'
  178. 'type 'MPTN_Drive'\MPTN\BIN\SETUP.CMD  >>  A:SETUP.CMD'
  179.  
  180.  
  181. 'COPY 'ADSM_path'\DSMC.EXE                     A:' /* copy ADSM runtime files */
  182. 'COPY 'ADSM_path'\DSCAMENG.TXT                 A:'
  183. 'COPY 'ADSM_path'\DSM.OPT                      A:'
  184.  
  185.  
  186. cls
  187. say 'Remove the disk in drive A: and label it'
  188. say '      ''ADSM Recovery Disk A''          '
  189. say ''
  190. say ' The ADSM Recovery disk must replace boot disk #1 after boot'
  191. say ' finishes, and boot disk #2 must remain in drive B: during recovery.'
  192. say ''
  193. say ' This disk contains TCPIP commands, FORMAT, FDISK, TEDIT, the'
  194. say ' ADSM command line client and the DSM.OPT file.'
  195. pause
  196. say ''
  197. say ' If you ever use these disks on another machine, be sure to edit'
  198. say ' DSM.OPT to reflect the other machine, and also edit the IP addresses'
  199. say ' contained in SETUP.CMD.  Remember that the ADSM server address '
  200. say ' contained in DSM.OPT must be in dotted decimal format because there'
  201. say ' is no nameserver connectivity using these disks.'
  202. say ''
  203. say ' After boot completes, place Recovery Disk A in drive A: and type '
  204. say '''SETUP'' to complete your TCPIP configuration.  You may then type '
  205. say ' FDISK, FORMAT and execute DSMC commands such as:'
  206. say '      DSMC QUERY FILESPACE'
  207. say '      DSMC RESTORE C:* D:* -SUBDIR=YES -REPLACE=YES'
  208. say ''
  209. say ' Hints on ADSM commands, and the format command, are contained in'
  210. say ' config.sys as remarks.  You can always type config.sys to the '
  211. say ' screen and refresh your memory.'
  212. exit
  213.