CREEPINGNET'S WORLD
MULTIBOOT AUTOEXEC.BAT & CONFIG.SYS FILES
How to Get Multiple Configurations on the Same Machine using MS-DOS 6.00 and Later, and a Special Section on FreeDOS
In 1991, Microsoft introduced the ability to create multiple boot configurations using the Autoexec.bat and config.sys files in DOS. This is a rather under-used feature by the retro-computing community, but it can be a very useful one.

If you are looking ot FreeDOS, look lower down the page since theirs work a little, uh, differently. But if you're looking at MS-DOS 6.00 or later, the first section is for you.

As for use cases for multiple boot configurations - ie, why you'd do this, well, there's a few really good reasons. First off, and most common, is a way to have a "Boot Disk" without an actual boot disk. It also allows you to enable and disable features you don't need to either save on RAM or in the interest of network security - ie - not having mTCP loaded when you don't need it. This is also a good way to make different memory configurations, especially for very particular software (Ultima VII, 3D Body Simulator, Broderbund Turbo C++, just to name a few) that need a very specific memory configuration to work. You can also save RAM by having boot options that turn devices off - and you can even EXPAND into "Submenus" of sorts - ie, you have a 486 and want multople DOS boot configurations, and multiple boot configurations for Microsoft Windows 1.01/2.03/3.0/3.1x on the computer without having to fill the entire screen with options.


MS-DOS SYSTEMS
MS-DOS Systems typically use CONFIG.SYS To generate the menu system, and create the links to the specific group of entries in AUTOEXEC.BAT that are to get executed once CONFIG.SYS has completed configuring the system.

TYPICAL MULTIBOOT CONFIG.SYS FILE
[MENU]
menuitem, CLN, Start MS-DOS 6.22 (Clean Boot)
menuitem, DOS, Start MS-DOS 6.22
menuitem, EMS, Start MS-DOS 6.22 (With EMS)
menuitem, WIN, Start Windows For Workgroups 3.11

[CLN]

[DOS]
DEVICE=C:\DOS\HIMEM.SYS /TESTMEM:OFF
DEVICEHIGH=C:\CDROM\OAKCDROM.SYS /D:MSCD001
DOS=HIGH
FILES=45
BUFFERS=45
STACKS=9,256

[EMS]
DEVICE=C:\DOS\HIMEM.SYS /TESTMEM:OFF
DEVICE=C:\DOS\EMM386.EXE RAM
DEVICEHIGH=C:\CDROM\OAKCDROM.SYS/D:MSCD001
DOS=HIGH
FILES=45
BUFFERS=45
STACKS=9,256

[WIN]
DEVICE=C:\DOS\HIMEM.SYS /TESTMEM:OFF
DEVICE=C:\DOS\EMM386.EXE RAM
DEVICEHIGH=C:\CDROM\OAKCDROM.SYS/D:MSCD001
DOS=HIGH
FILES=45
BUFFERS=45
STACKS=9,256
DEVICE=C:\WINDOWS\IFSHLP.SYS

So above, you can see that the menu is created under the [MENU] heading using "menuitem" to create an entry, and then a 3 letter heading is created for each item, then the description you see on screen is listed.

Once a "menuitem" has been picked, the three letters after the comma are used to locate the entry which are under the headings in brackets. Under there is where all your typical DOS Settings. So way, I pick the regular DOS one ->HIMEM.SYS enables XMS, the DOS Kernel is put in High Memory area (HMA), the the CD-ROM Driver loads (OAKCDROM.SYS) and labels the drive "MSCD001". Files, Buffers, and Stacks are configured - and then the CONFIG.SYS passes control over to Autoexec.bat...

Typical Multiboot AUTOEXEC.BAT
goto %config%

:CLN
GOTO END

:DOS
PATH=C:\DOS LH C:\MOUSE\MOUSE.COM /1
LH C:\DOS\SMARTDRV.EXE
LH C:\SB16\CTCM.EXE
LH C:\SB16\AWEUTIL /S
SET BLASTER=A220 I5 T6 P330 E620 H5
C:\PKTDRV\ETHER 0x60
SET MTCPCFG=C:\MTCP\MTCPCFG.CFG
C:\MTCP\DHCP
GOTO END

:EMS
PATH=C:\DOS LH C:\MOUSE\MOUSE.COM /1
LH C:\DOS\SMARTDRV.EXE
LH C:\SB16\CTCM.EXE
LH C:\SB16\AWEUTIL /S
SET BLASTER=A220 I5 T6 P330 E620 H5
GOTO END

:WIN
PATH=C:\WINDOWS;C:\DOS LH C:\MOUSE\MOUSE.COM /1
LH C:\DOS\SMARTDRV.EXE
LH C:\SB16\CTCM.EXE
LH C:\SB16\AWEUTIL /S
SET BLASTER=A220 I5 T6 P330 E620 H5
C:\WINDOWS\NET START
WIN
GOTO END

:END
CLS

Now the boot path calls the Config.SYS (%CONFIG%) to find the booth path. Say you're just booting into Regular DOS here - then what happens is it sets the path to C:\DOS\ - so now any command in DOS is executable from anywhere on the system. After that's set, then SMARTDRV.EXE is loaded, followed by the Mouse driver - all loaded into high memory area if possible - CTCM and AWEUTIL are loaded - which means this computer has a SoundBlaster AWE32 or AWE64 card (like mine), and then the "SET BLASTER" Environment variable is set so DOS programs can locate the card's resources (especially the fancy Wavetable synth in this case), and then it goes on to process some NETWORK configuration ie - sets the Packet Driver for the Ethernet card at Interrupt Vector 0x60, sets MTCP's configuration file with an environment variable, runs DHCP (which will write the DHCP Lease info into the MTCP configuration file stated by the bavoed environment variable), then follows "GOTO END" to the :END heading, where the Clear Screen Command (CLS) clears the screen leaving you with a nice, clean C:>_ prompt to work with. Cool huh?


FreeDOS Systems