home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / assemblr / library / os2dualb / dualboot.txt < prev    next >
Text File  |  1990-01-10  |  11KB  |  267 lines

  1. =================================================================
  2. Installation of the PC-Tech Journal Dual-Boot Program
  3. With IBM OS/2 Version 1.20
  4. Text version 1, 1/10/90
  5. =================================================================
  6.  
  7. Here's my own more detailed, and I hope more simplified, version
  8. of the dual-boot procedure for MS/PC-DOS and OS/2 as originally
  9. described in the September, 1988 issue of PC-Tech Journal.
  10.  
  11. The original article by Ted Mirecki (credit where credit is due)
  12. was somewhat vague and left even some experienced users in the
  13. dark.  This procedure is still not for the faint-of-heart, but
  14. should allow most users to install the dual-boot successfully.
  15.  
  16. Also, the source code to ASKSYS has been slightly modified.  The
  17. version printed in PC-Tech Journal is slightly defective.
  18.  
  19. Why should you install this dual-boot instead of IBM's?  IBM's
  20. dual-boot is OK, but I think this one is easier to use and less
  21. prone to wasted time from absent-mindedness.  It works better for
  22. me, and probably will for you too.
  23.  
  24. These instructions assume you're starting with a DOS-bootable
  25. hard disk using the same DOS you'll be using to dual-boot.
  26.  
  27. You'll need:
  28.  
  29. .  A bootable DOS diskette with the following DOS programs:
  30.      EDLIN
  31.      FORMAT
  32.      DEBUG
  33.      FDISK
  34.      SYS
  35. .  Norton Utilities' NU program (or similarly functional s/w).
  36. .  Norton Utilities' FA program (or similarly functional s/w).
  37. .  ASKSYS files and instructions (from this ZIP file).
  38. .  Your favorite editor (if you're not comfy with EDLIN - hehe!).
  39. .  Your Backup/Restore program.
  40.  
  41. If you can fit it all on a 1.2 or 1.44 Mb disk it'll make life
  42. easier for you.  Then make a backup of that diskette.  Even if
  43. you *are* perfect, back it up anyway.  And while you're at it,
  44. backup your hard drive, and make sure that the backup is usable.
  45. This procedure doesn't require reformatting or other destruction
  46. of your hard disk data, but mistakes can happen.
  47.  
  48. -----------------------------------------------------------------
  49. Before your begin...
  50. -----------------------------------------------------------------
  51.  
  52. You can install an HPFS partition after you've installed every-
  53. thing else.  You simply need to use DOS FDISK to reserve some
  54. hard disk space for the HPFS partition.  That space should be un-
  55. allocated completely, not as any kind of partition.
  56.  
  57. After installing everything, add these lines to config.sys...
  58.  
  59. At the top:
  60. IFS=C:\OS2\HPFS.IFS -C:64 /AUTOCHECK:<drive>
  61.  
  62. At the bottom:
  63. RUN=C:\OS2\CACHE.EXE /LAZY:ON
  64.  
  65. From OS/2's Utilities group choose the FDISKPM program and create
  66. an OS/2 partition in the space you reserved, then reboot into
  67. OS/2 and run the following command from on OS/2 command window:
  68.  
  69. FORMAT <drive>/FS:HPFS
  70.  
  71. For some interesting performance notes, see Eric Rintell's notes
  72. on installing dual-boot and HPFS on IBM OS/2 1.2, DUALBOOT.ZIP.
  73.  
  74. -----------------------------------------------------------------
  75. What we need to do...
  76. -----------------------------------------------------------------
  77.  
  78. Normally, the PC's ROM BIOS calls up the disk boot record, which
  79. loads up a system file (IBMBIO.COM for DOS, OS2LDR for OS/2),
  80. which in turn loads up IBMDOS.COM or OS2KRNL and then looks for
  81. COMMAND.COM.  In OS/2 things go a bit further but that does not
  82. concern us now.
  83.  
  84. So we have to steal boot records from both DOS and OS/2, append
  85. them to the dual-boot program (ASKSYS), and get each operating
  86. system's respective files COMMAND.COM, AUTOEXEC.BAT & CONFIG.SYS
  87. to coexist on the hard disk.  We use OS/2's more versatile boot
  88. record to call ASKSYS instead of OS2LDR, and let ASKSYS take care
  89. of which boot record to use to start the computer.
  90.  
  91. OS2KRNL needs to be changed to look for CONFIG.OS2 instead of
  92. CONFIG.SYS, and OS/2's COMMAND.COM needs to be changed to look
  93. for AUTOEXEC.OS2 instead of AUTOEXEC.BAT.  Each operating
  94. system's COMMAND.COM gets located in its own directory.
  95.  
  96. -----------------------------------------------------------------
  97. Approach...
  98. -----------------------------------------------------------------
  99.  
  100. Most of what we'll be doing is easiest with DEBUG, but Norton
  101. Utilities is desirable for searching through large files and
  102. editing them to suit our needs.  Norton's FA comes in when we
  103. want to change the attributes of system files.  DOS' ATTRIB is
  104. pathetic and can only change the Readonly and Archive settings of
  105. files.  It won't touch Hidden or System settings.  You should not
  106. really need an attribute-setting utility in this procedure unless
  107. you are using a substitute for Norton Utilities that gives you a
  108. hard time with hidden files.
  109.  
  110. I've provided some script files for use with DEBUG to automate
  111. error-prone procedures.  Script files are implemented using DOS
  112. redirection, such as "DEBUG < FILENAME.SCR".  They are:
  113.  
  114. GETDOSBT.SCR       Get DOS boot record
  115.  
  116.   n A:\DOSBOOT.REC
  117.   l 100 2 0 1
  118.   rcx
  119.   200
  120.   w
  121.   q
  122.  
  123. GETOS2BT.SCR       Get OS2 boot record
  124.  
  125.   n A:\OS2BOOT.REC
  126.   l 100 2 0 1
  127.   rcx
  128.   200
  129.   w
  130.   q
  131.  
  132. ASKSYS1.SCR        Combine DOS & OS/2 boot records with ASKSYS
  133.  
  134.   n asksys
  135.   l 100
  136.   n dosboot.rec
  137.   l 276
  138.   n os2boot.rec
  139.   l 476
  140.   n asksys
  141.   rcx
  142.   576
  143.   w
  144.   q
  145.  
  146. PUTOS2BT.SCR       Put OS2 boot record
  147.  
  148.   n A:\OS2BOOT.REC
  149.   l
  150.   w 100 2 0 1
  151.   q
  152.  
  153. The commands in these script files are exactly as they would be
  154. typed to DEBUG's "-" prompt if you had started DEBUG alone.
  155.  
  156. -----------------------------------------------------------------
  157. Let's go!!!
  158. -----------------------------------------------------------------
  159.  
  160. You backed up, right?  RIGHT?!  OK.  Make A: the default drive
  161. and type "DEBUG < GETDOSBT.SCR".  After it runs it should have
  162. left a 512 byte file on your diskette called DOSBOOT.REC.
  163.  
  164. Now, while we're still under DOS we need to get COMMAND.COM out
  165. of the way.  Make a \DOS directory and copy COMMAND.COM into it.
  166. Edit CONFIG.SYS to include the following line at the top:
  167. SHELL=C:\DOS\COMMAND.COM C:\DOS /P
  168. Now copy both your AUTOEXEC.BAT and CONFIG.SYS to \DOS for safe-
  169. keeping.  The copies in the root directory will be overwritten.
  170.  
  171. Now you can run the OS/2 installation procedure.  Just make sure
  172. you don't choose the "format" option when the install program
  173. asks you whether or not to format.
  174.  
  175. OS/2's working OK now?  Great, but reboot with the DOS diskette
  176. and type "DEBUG < GETOS2BT.SCR".  When it's finished it should
  177. leave a 512 byte file on the diskette called OS2BOOT.REC.
  178.  
  179. IBM's OS/2 1.2 is now polite enough to leave the DOS system files
  180. IBMBIO.COM and IBMDOS.COM alone, so much of PC-Tech Journal's
  181. worrying about placing those files is no longer necessary.  They
  182. all coexist peacefully without fuss.
  183.  
  184. Now's time for Norton Utilities.  We need to patch OS2KRNL (a
  185. hidden file) so that occurrences of "CONFIG.SYS" are changed to
  186. read "CONFIG.OS2".  Not all occurrences have to be changed, but
  187. the effort in changing them all is minimal.
  188.  
  189. Just start start NU using "NU C:\", select Explore disk, Choose
  190. item, File, select OS2KRNL, press <Esc> and select Search item,
  191. type in "CONFIG" (without no quotes) and press <Enter>.  Each
  192. time "CONFIG" is encountered replace "SYS" with "OS2", press
  193. <Enter>, "W" (for Write changes) and Continue search until there
  194. are no more occurrences.
  195.  
  196. We have to do likewise for OS/2's COMMAND.COM, currently located
  197. in the root directory, changing all occurrences of AUTOEXEC.BAT
  198. to AUTOEXEC.OS2.  Just search for "AUTOEXEC".
  199.  
  200. Now that the patching is completed, rename OS/2's AUTOEXEC.BAT to
  201. AUTOEXEC.OS2 and CONFIG.SYS to CONFIG.OS2.  Copy the DOS versions
  202. of AUTOEXEC.BAT and CONFIG.SYS back into the root directory, and
  203. then copy the modofied root copy of COMMAND.COM into the \OS2
  204. directory.  The root copy can then be deleted.
  205.  
  206. Make sure that CONFIG.OS2 contains the line:
  207. SHELL=C:\OS2\COMMAND.COM /P
  208.  
  209. Make sure that AUTOEXEC.OS2 contains the line:
  210. SET COMSPEC=C:\OS2\COMMAND.COM
  211.  
  212. These lines should already be there, but check the files anyway.
  213. Also, AUTOEXEC.OS2 may contain a line that copies COMMAND.COM
  214. into the root directory every time OS/2's DOS box executes.  Get
  215. rid of that line - it's silly and unnecessary.  With this setup
  216. you never need any version of any COMMAND.COM in the root.
  217.  
  218. With any luck, you should be able to boot now and end up in OS/2.
  219. Give it a try, and reboot to DOS when you're finished.  If it
  220. didn't work, you have backups, right?  RIGHT?!
  221.  
  222. Now it's time for the heart of the procedure - the ASKSYS
  223. program.  Type "DEBUG < ASKSYS1.SCR".  Then start NU on the
  224. diskette and select the file OS2BOOT.REC.  Change each occurrence
  225. of "OS2LDR" to read "ASKSYS".  Save the changes and quit from NU.
  226. Now from DOS type "DEBUG < PUTOS2BT.SCR".  Do NOT change the
  227. order of these commands!  Lastly, copy the ASKSYS program from
  228. the diskette to the root directory of your hard disk, and
  229. optionally change its attribute to "ReadOnly" to avoid later
  230. disaster.
  231.  
  232. You should now be able to reboot the computer and be welcomed by
  233. the ASKSYS prompt.  As provided, ASKSYS waits 15 seconds before
  234. defaulting to DOS.  <Esc> selects DOS and <Enter> selects OS/2.
  235.  
  236. If everything works now, you should backup the files DOSBOOT.REC,
  237. OS2BOOT.REC and ASKSYS in case they are needed in the future, and
  238. backup all the hard work you just completed!  If you ever have to
  239. reformat and restore your hard disk, you will need PUTOS2BT.SCR
  240. again to get the hard disk boot record to call ASKSYS.
  241.  
  242. -----------------------------------------------------------------
  243. Notes...
  244. -----------------------------------------------------------------
  245.  
  246. If you change ASKSYS.ASM and rebuild ASKSYS, the ASKSYS1.SCR may
  247. no longer be valid.  But if you know enough to fiddle with
  248. ASKSYS.ASM then you're on you own already.
  249.  
  250. -----------------------------------------------------------------
  251. Epilogue...
  252. -----------------------------------------------------------------
  253.  
  254. Since the potential for headache in this procedure is incredible,
  255. I've made a fantastic effort to make sure it's all absolutely
  256. correct.  I know I'm perfect but I do this stuff late at night
  257. when I can't see straight.  So if there's any problem with these
  258. instructions please inform me immediately.  I can be reached
  259. through Compu$serve at [71631,132], and at the Invention Factory,
  260. Thunder Road and Sound of Music BBS' in New York.  I've used
  261. these instructions as a guide when doing installations and have
  262. not gone wrong so long as I did everything as specified.  I'm
  263. truly sorry if I missed anything.
  264.  
  265. BRAD BERSON
  266.  
  267.