================================================================= Installation of the PC-Tech Journal Dual-Boot Program With IBM OS/2 Version 1.20 Text version 1, 1/10/90 ================================================================= Here's my own more detailed, and I hope more simplified, version of the dual-boot procedure for MS/PC-DOS and OS/2 as originally described in the September, 1988 issue of PC-Tech Journal. The original article by Ted Mirecki (credit where credit is due) was somewhat vague and left even some experienced users in the dark. This procedure is still not for the faint-of-heart, but should allow most users to install the dual-boot successfully. Also, the source code to ASKSYS has been slightly modified. The version printed in PC-Tech Journal is slightly defective. Why should you install this dual-boot instead of IBM's? IBM's dual-boot is OK, but I think this one is easier to use and less prone to wasted time from absent-mindedness. It works better for me, and probably will for you too. These instructions assume you're starting with a DOS-bootable hard disk using the same DOS you'll be using to dual-boot. You'll need: . A bootable DOS diskette with the following DOS programs: EDLIN FORMAT DEBUG FDISK SYS . Norton Utilities' NU program (or similarly functional s/w). . Norton Utilities' FA program (or similarly functional s/w). . ASKSYS files and instructions (from this ZIP file). . Your favorite editor (if you're not comfy with EDLIN - hehe!). . Your Backup/Restore program. If you can fit it all on a 1.2 or 1.44 Mb disk it'll make life easier for you. Then make a backup of that diskette. Even if you *are* perfect, back it up anyway. And while you're at it, backup your hard drive, and make sure that the backup is usable. This procedure doesn't require reformatting or other destruction of your hard disk data, but mistakes can happen. ----------------------------------------------------------------- Before your begin... ----------------------------------------------------------------- You can install an HPFS partition after you've installed every- thing else. You simply need to use DOS FDISK to reserve some hard disk space for the HPFS partition. That space should be un- allocated completely, not as any kind of partition. After installing everything, add these lines to config.sys... At the top: IFS=C:\OS2\HPFS.IFS -C:64 /AUTOCHECK: At the bottom: RUN=C:\OS2\CACHE.EXE /LAZY:ON From OS/2's Utilities group choose the FDISKPM program and create an OS/2 partition in the space you reserved, then reboot into OS/2 and run the following command from on OS/2 command window: FORMAT /FS:HPFS For some interesting performance notes, see Eric Rintell's notes on installing dual-boot and HPFS on IBM OS/2 1.2, DUALBOOT.ZIP. ----------------------------------------------------------------- What we need to do... ----------------------------------------------------------------- Normally, the PC's ROM BIOS calls up the disk boot record, which loads up a system file (IBMBIO.COM for DOS, OS2LDR for OS/2), which in turn loads up IBMDOS.COM or OS2KRNL and then looks for COMMAND.COM. In OS/2 things go a bit further but that does not concern us now. So we have to steal boot records from both DOS and OS/2, append them to the dual-boot program (ASKSYS), and get each operating system's respective files COMMAND.COM, AUTOEXEC.BAT & CONFIG.SYS to coexist on the hard disk. We use OS/2's more versatile boot record to call ASKSYS instead of OS2LDR, and let ASKSYS take care of which boot record to use to start the computer. OS2KRNL needs to be changed to look for CONFIG.OS2 instead of CONFIG.SYS, and OS/2's COMMAND.COM needs to be changed to look for AUTOEXEC.OS2 instead of AUTOEXEC.BAT. Each operating system's COMMAND.COM gets located in its own directory. ----------------------------------------------------------------- Approach... ----------------------------------------------------------------- Most of what we'll be doing is easiest with DEBUG, but Norton Utilities is desirable for searching through large files and editing them to suit our needs. Norton's FA comes in when we want to change the attributes of system files. DOS' ATTRIB is pathetic and can only change the Readonly and Archive settings of files. It won't touch Hidden or System settings. You should not really need an attribute-setting utility in this procedure unless you are using a substitute for Norton Utilities that gives you a hard time with hidden files. I've provided some script files for use with DEBUG to automate error-prone procedures. Script files are implemented using DOS redirection, such as "DEBUG < FILENAME.SCR". They are: GETDOSBT.SCR Get DOS boot record n A:\DOSBOOT.REC l 100 2 0 1 rcx 200 w q GETOS2BT.SCR Get OS2 boot record n A:\OS2BOOT.REC l 100 2 0 1 rcx 200 w q ASKSYS1.SCR Combine DOS & OS/2 boot records with ASKSYS n asksys l 100 n dosboot.rec l 276 n os2boot.rec l 476 n asksys rcx 576 w q PUTOS2BT.SCR Put OS2 boot record n A:\OS2BOOT.REC l w 100 2 0 1 q The commands in these script files are exactly as they would be typed to DEBUG's "-" prompt if you had started DEBUG alone. ----------------------------------------------------------------- Let's go!!! ----------------------------------------------------------------- You backed up, right? RIGHT?! OK. Make A: the default drive and type "DEBUG < GETDOSBT.SCR". After it runs it should have left a 512 byte file on your diskette called DOSBOOT.REC. Now, while we're still under DOS we need to get COMMAND.COM out of the way. Make a \DOS directory and copy COMMAND.COM into it. Edit CONFIG.SYS to include the following line at the top: SHELL=C:\DOS\COMMAND.COM C:\DOS /P Now copy both your AUTOEXEC.BAT and CONFIG.SYS to \DOS for safe- keeping. The copies in the root directory will be overwritten. Now you can run the OS/2 installation procedure. Just make sure you don't choose the "format" option when the install program asks you whether or not to format. OS/2's working OK now? Great, but reboot with the DOS diskette and type "DEBUG < GETOS2BT.SCR". When it's finished it should leave a 512 byte file on the diskette called OS2BOOT.REC. IBM's OS/2 1.2 is now polite enough to leave the DOS system files IBMBIO.COM and IBMDOS.COM alone, so much of PC-Tech Journal's worrying about placing those files is no longer necessary. They all coexist peacefully without fuss. Now's time for Norton Utilities. We need to patch OS2KRNL (a hidden file) so that occurrences of "CONFIG.SYS" are changed to read "CONFIG.OS2". Not all occurrences have to be changed, but the effort in changing them all is minimal. Just start start NU using "NU C:\", select Explore disk, Choose item, File, select OS2KRNL, press and select Search item, type in "CONFIG" (without no quotes) and press . Each time "CONFIG" is encountered replace "SYS" with "OS2", press , "W" (for Write changes) and Continue search until there are no more occurrences. We have to do likewise for OS/2's COMMAND.COM, currently located in the root directory, changing all occurrences of AUTOEXEC.BAT to AUTOEXEC.OS2. Just search for "AUTOEXEC". Now that the patching is completed, rename OS/2's AUTOEXEC.BAT to AUTOEXEC.OS2 and CONFIG.SYS to CONFIG.OS2. Copy the DOS versions of AUTOEXEC.BAT and CONFIG.SYS back into the root directory, and then copy the modofied root copy of COMMAND.COM into the \OS2 directory. The root copy can then be deleted. Make sure that CONFIG.OS2 contains the line: SHELL=C:\OS2\COMMAND.COM /P Make sure that AUTOEXEC.OS2 contains the line: SET COMSPEC=C:\OS2\COMMAND.COM These lines should already be there, but check the files anyway. Also, AUTOEXEC.OS2 may contain a line that copies COMMAND.COM into the root directory every time OS/2's DOS box executes. Get rid of that line - it's silly and unnecessary. With this setup you never need any version of any COMMAND.COM in the root. With any luck, you should be able to boot now and end up in OS/2. Give it a try, and reboot to DOS when you're finished. If it didn't work, you have backups, right? RIGHT?! Now it's time for the heart of the procedure - the ASKSYS program. Type "DEBUG < ASKSYS1.SCR". Then start NU on the diskette and select the file OS2BOOT.REC. Change each occurrence of "OS2LDR" to read "ASKSYS". Save the changes and quit from NU. Now from DOS type "DEBUG < PUTOS2BT.SCR". Do NOT change the order of these commands! Lastly, copy the ASKSYS program from the diskette to the root directory of your hard disk, and optionally change its attribute to "ReadOnly" to avoid later disaster. You should now be able to reboot the computer and be welcomed by the ASKSYS prompt. As provided, ASKSYS waits 15 seconds before defaulting to DOS. selects DOS and selects OS/2. If everything works now, you should backup the files DOSBOOT.REC, OS2BOOT.REC and ASKSYS in case they are needed in the future, and backup all the hard work you just completed! If you ever have to reformat and restore your hard disk, you will need PUTOS2BT.SCR again to get the hard disk boot record to call ASKSYS. ----------------------------------------------------------------- Notes... ----------------------------------------------------------------- If you change ASKSYS.ASM and rebuild ASKSYS, the ASKSYS1.SCR may no longer be valid. But if you know enough to fiddle with ASKSYS.ASM then you're on you own already. ----------------------------------------------------------------- Epilogue... ----------------------------------------------------------------- Since the potential for headache in this procedure is incredible, I've made a fantastic effort to make sure it's all absolutely correct. I know I'm perfect but I do this stuff late at night when I can't see straight. So if there's any problem with these instructions please inform me immediately. I can be reached through Compu$serve at [71631,132], and at the Invention Factory, Thunder Road and Sound of Music BBS' in New York. I've used these instructions as a guide when doing installations and have not gone wrong so long as I did everything as specified. I'm truly sorry if I missed anything. BRAD BERSON