42BOOT (c) Copyright 1992, Raymond P. Tackett (Except for DMBOOT.ZIP, included by permission of Edward Welch.) Distribution Policy: Only the original, unmodified 42BOOT.ZIP may be distributed under any circumstances, provided: a) No charge is made other than reasonable and customary duplication or connect time charges; b) Distribution is not made part of any other goods or services; c) The distribution policy of the included DMBOOT.ZIP as reproduced below is also followed. This collection of text files and small DEBUG scripts and batch files may be freely copied, distributed, or uploaded anywhere at no charge, as long as all the files remain together and intact. There is a possibility of creating a hard drive problem using the procedure described, and I assume no responsibility for such problems. Anyone with any comments or corrections is invited to leave me a Compuserve message. Edward Welch Boston, MA CIS ID 72361,620 Trademarks: 4DOS is a trademark of JP Software. DR-DOS is a trademark of Digital Research, Inc. MS-DOS is a trademark of Microsoft, Inc. Norton Utilities is a trademark of Symantec, Inc. All other trademarks found herein are the property of their respective owners. Warnings: It is possible to make errors using this technique which can render your hard disk unbootable or cause other file damage. I assume no responsibility for anything which may go wrong. Purpose: Starting with the dual boot technique described in DMBOOT.ZIP, it is possible to use 4DOS (a command.com replacement from JP Software, Inc.), aliasing and a few simple patches to smooth the process and to make your system immune to installation programs which modify config.sys and/or autoexec.bat. Getting started: Read and understand the text files included in DMBOOT.ZIP. Use the included debug scripts to capture your MS-DOS boot sector and your DR-DOS boot sector to MS.SEC and DR.SEC, respectively. You will not be using the supplied .BAT files. Extending the Basic DMBOOT technique Dual autoexec.bat files: With 4DOS, it is possible to have autoexec.bat someplace other than the root directory of the boot drive. In 4DOS.INI, the AutoexecPath directive can be used to specify some other place (e.g. c:\dos\boot) where autoexec is to be found. The command.com supplied with DR-DOS also has this capability, but the assumption here is that 4DOS is the command processor for either operating system. This capability will be used to maintain separate copies of autoexec.bat, neither of which is in the root directory of the boot drive. There will be separate 4DOS.INI files for MS-DOS and DR-DOS. We will return to this topic after dealing with config.sys. Dual config.sys files: The technique used in the original DMBOOT involved copying the correct file to config.sys in the root directory of the boot drive. With a disk sector editor such as the Norton Utilities or ZipZap (shareware by Keith Chuvala), you can atch DR-DOS's ibmbio.com and io.sys to change the extension name for config.sys. Although DEBUG could be used, it would be an awkward, error-prone process and will not be described here. BE SURE YOU HAVE AT LEAST TWO BOOTABLE DISKETTES BEFORE STARTING THIS PROCEDURE! For either file or both "io" files, search for the text "SYS". In DR-DOS's ibmbio.com, you will find one occurence just after the string "CONFIG". I patched mine to "DRD". That will cause DR-DOS to search for config.drd instead of config.sys. The same idea applies to the MS-DOS "io" module, but there are several places to patch (I used "MSD"). One is the file name for config.sys. The others are in the text of error messages, but they should all match if only for esthetic reasons. The end result is that DR-DOS will look for config.drd and MS-DOS will look for config.msd. There are two wins: The copy step in DMBOOT can be eliminated; A dummy config.sys can be left around for installation programs which tamper with it. Such tampering will no longer have any effect. Putting it (them) all together: Of course, you may vary the example directory names given below as you see fit, however, it is necessary to present a specific example in order to make a proper presentation of the technique. Autoexec.bat(s): The MS-DOS autoexec is c:\msdos\boot\autoexec.bat. The DR-DOS autoexec is c:\drdos\boot\autoexec.bat. Each autoexec can be essentially the same, but you will need to vary the PATH setting so you don't run the wrong external commands. It should be possible to combine the two into one file by taking a switch on the %_ver internal variable provided by 4DOS. However, in my case, autoexec is really eight different autoexecs for eight different configurations selected by Hans Salvisberg's BOOT.SYS utility. I didn't want to get into the maintenance headache of sixteen configurations (and three different command processors) in one autoexec, so I opted for two separate autoexec files. 4DOS.INI You will need two essentially identical 4DOS.INI files. The only difference necessary is the "AutoexecPath" directive. You will select which 4DOS initialization file gets run via the "shell" directives in config.drd and config.msd. Example 4DOS.MSD: AutoexecPath = c:\dos\boot CONFIG.* In config.drd, you point to the correct 4DOS startup file like so: shell=c:\4dos\boot\4dos.com @c:\4dos\boot\4dos.drd Likewise in config.msd: shell=c:\4dos\boot\4dos.com @c:\4dos\boot\4dos.msd Setting up the REBOOT alias (all on one line, of course): REBOOT=iff not exist c:\%1.sec then^*reboot^ else^(debug < c:\bootchg.scr c:\%1.sec > nul^delay 5^*reboot)^endiff Here's how the alias works. If you just type "reboot", the internal reboot command is executed instead of the alias -- i.e., you reboot with the same DOS you have running at the time. If you enter "reboot dr" at the command line, and the captured boot sector, c:\dr.sec exists, DEBUG is run with input supplied by the bootchg.scr script (included in this ZIP file). The disk cache (if any) is given a 5 second delay in which to finish its staged writes, then the internal reboot command is executed. The delay value should be at least 2 or 3 seconds longer than your cache's staged write delay time. You could also change "delay 5" to your cache's disabling command. Please make sure you're running a version of DEBUG which has been patched per Edward Welch's instructions so that it will work correctly with either DR-DOS or MS-DOS. Any comments, questions, or corrections may be sent to: Ray Tackett 76416,276 (Compuserve)