DOS boot menu explained

MS-DOS 6 introduced a boot menu capability, a capability PC DOS inherited. This capability had the potential to eliminate custom boot floppies, but not a lot of people used it in my experience. I have them set up on my retro PCs to good effect. So here’s the DOS boot menu explained, with a useful example.

Why a DOS boot menu?

DOS boot menu
While the DOS boot menu first appeared long after the 286’s heyday, the feature sure makes a 286-based PC more usable. It’s helpful on later systems to get picky titles running too.

It’s certainly possible to make a DOS configuration that works well for what seems like 98 percent of use cases. The problem is those few programs that need something a little different. Or those compromises you have to make that mostly work, but could be better. For example, you may have to load a device in config.sys to support Windows that you don’t need when you’re running straight DOS, and you don’t need a DOS mouse driver when you’re running Windows. You load both to cover both cases, but you’d save some upper memory if you didn’t.

Some systems have enough upper memory that it doesn’t matter. But if yours doesn’t, this can solve a problem.

If you play a lot of DOS games, you have some that need as much free conventional memory as possible. You have some that need EMS, some that need XMS, and the occasional odd title like Ultima VII that wants no memory management at all.

And sometimes it’s just a convenience factor. Sometimes you want DOS with networking. Sometimes you want to boot into Windows 3.11. Having a boot menu lets you pick the one you want without having to load stuff you don’t need and then load the other one. This is helpful on pre-386 systems and, in fact, is the only reason I would want to run something newer than DOS 5 on a pre-386.

DOS boot menu example

Here’s a very simple DOS boot menu example that loads either DOS or Windows. There’s certainly room to tweak it but this configuration will work reasonably well once you add what you need for your sound card and networking.

A config.sys example

[MENU] MENUITEM=DOS, DOS with CD-ROM
MENUITEM=WIN, Windows
REM DEFAULT TO DOS WITH A 10 SECOND TIMEOUT
MENUDEFAULT=DOS, 10

[COMMON] REM ANYTHING IN THIS SECTION LOADS IN EVERY SELECTION
DEVICE=C:\DOS\HIMEM.SYS /TESTMEM:OFF
DEVICE=C:\DOS\EMM386.EXE NOEMS
DOS=HIGH,UMB
DEVICEHIGH=C:\DOS\OAKCDROM.SYS /D:CD1

[DOS] REM EACH CONFIGURATION NEEDS A SECTION EVEN IF YOU LEAVE IT BLANK

[WIN] REM EACH CONFIGURATION NEEDS A SECTION EVEN IF YOU LEAVE IT BLANK

An autoexec.bat example

Autoexec.bat is a bit trickier. The boot menu sets a variable called CONFIG and you use the command GOTO %CONFIG% to skip around in the file.

@ECHO OFF
REM EVERYTHING HERE CORRESPONDS TO [COMMON] IN CONFIG.SYS
PATH=C:\DOS;C:\WINDOWS
PROMPT=$P$G
LH C:\DOS\MSCDEX.EXE /D:CD1
LH C:\DOS\SMARTDRV.EXE 2048

GOTO %CONFIG%

REM THIS SECTION CORRESPONDS TO [DOS] IN CONFIG.SYS
:DOS
LH MOUSE.COM
REM LOAD YOUR SOUND CARD AND NETWORK STUFF HERE IF YOU WANT
GOTO EXIT

REM THIS SECTION CORRESPONDS TO [WIN] IN CONFIG.SYS
:WIN
WIN
GOTO EXIT

:EXIT

A more complicated DOS boot menu example

Let’s try a slightly more complicated example, one that boots DOS with EMS, one that boots DOS with XMS, one that boots DOS without EMM386, and one that boots Windows, skipping EMS because Windows doesn’t use EMS.

Config.sys with EMS, XMS, no EMM386, and Windows

[MENU] MENUITEM=DOS, DOS with CD-ROM and XMS
MENUITEM=EMS, DOS with CD-ROM and EMS
MENUITEM=NONE, DOS with CD-ROM but no EMM386
MENUITEM=WIN, Windows
REM DEFAULT TO DOS WITH A 10 SECOND TIMEOUT
MENUDEFAULT=DOS, 10

[COMMON] REM ANYTHING IN THIS SECTION LOADS IN EVERY SELECTION
DEVICE=C:\DOS\HIMEM.SYS /TESTMEM:OFF

[DOS] DEVICE=C:\DOS\EMM386.EXE NOEMS
DOS=HIGH,UMB
DEVICEHIGH=C:\DOS\OAKCDROM.SYS /D:CD1

[WIN] DEVICE=C:\DOS\EMM386.EXE NOEMS
DOS=HIGH,UMB
DEVICEHIGH=C:\DOS\OAKCDROM.SYS /D:CD1

[EMS] DEVICE=C:\DOS\EMM386.EXE RAM
DOS=HIGH,UMB
DEVICEHIGH=C:\DOS\OAKCDROM.SYS /D:CD1

[NONE] REM YOU MAY NEED TO OMIT THE CD-ROM DRIVER
DOS=UMB
DEVICE=C:\DOS\OAKCDROM.SYS /D:CD1

Autoexec.bat with EMS, XMS, and Windows

@ECHO OFF
REM EVERYTHING HERE CORRESPONDS TO [COMMON] IN CONFIG.SYS
PATH=C:\DOS;C:\WINDOWS
PROMPT=$P$G
LH C:\DOS\MSCDEX.EXE /D:CD1
LH C:\DOS\SMARTDRV.EXE 2048

GOTO %CONFIG%

REM THIS SECTION CORRESPONDS TO [DOS] IN CONFIG.SYS
:DOS
LH MOUSE.COM
REM LOAD YOUR SOUND CARD AND NETWORK STUFF HERE IF YOU WANT
GOTO EXIT

REM THIS SECTION CORRESPONDS TO [WIN] IN CONFIG.SYS
:WIN
WIN
GOTO EXIT

REM THIS SECTION CORRESPONDS TO [EMS] IN CONFIG.SYS
:EMS
REM WE CAN JUST REUSE THE DOS SECTION FOR EMS
GOTO DOS

:NONE
MOUSE.COM
REM LOAD YOUR SOUND CARD STUFF HERE IF YOU NEED IT
GOTO EXIT

:EXIT

%d bloggers like this: