The main configuration file for FreeDOS is a file in the root directory called FDCONFIG.SYS. This file contains a series of lines, each setting a value such as LASTDRIVE=Z or FILES=40. For example, the default FDCONFIG.SYS in FreeDOS 1.4 looks like this:
SET DOSDIR=C:\FreeDOS
!COUNTRY=001,858,C:\FreeDOS\BIN\COUNTRY.SYS
!LASTDRIVE=Z
!BUFFERS=20
!FILES=40
!MENUCOLOR=7,0
MENUDEFAULT=2,5
MENU 1 - Load FreeDOS with JEMMEX, no EMS (most UMBs), max RAM free
MENU 2 - Load FreeDOS with JEMMEX (more compatible)
MENU 3 - Load FreeDOS with JEMM386 (Expanded Memory)
MENU 4 - Load FreeDOS low with some drivers (Safe Mode)
MENU 5 - Load FreeDOS without drivers (Emergency Mode)
123?DOS=HIGH
123?DOS=UMB
123?DOSDATA=UMB
1?DEVICE=C:\FreeDOS\BIN\JEMMEX.EXE NOEMS X=TEST I=TEST NOVME NOINVLPG
2?DEVICE=C:\FreeDOS\BIN\JEMMEX.EXE NOEMS X=TEST NOVME NOINVLPG
34?DEVICE=C:\FreeDOS\BIN\HIMEMX.EXE
3?DEVICE=C:\FreeDOS\BIN\JEMM386.EXE X=TEST NOVME NOINVLPG
REM 123?DEVICEHIGH=C:\FreeDOS\BIN\LOGGER.COM COLOR 256 XMS MONO 128 XMS
12?SHELLHIGH=C:\FreeDOS\BIN\COMMAND.COM C:\FreeDOS\BIN /E:1024 /P=C:\FDAUTO.BAT
345?SHELL=C:\FreeDOS\BIN\COMMAND.COM C:\FreeDOS\BIN /E:1024 /P=C:\FDAUTO.BAT
But what do all those lines mean? Why do some have a question mark (?) or an exclamation point (!), while other lines do not?
A simple configuration
Let’s start with a simple configuration, so we can see what does what. Assume this very brief FDCONFIG.SYS file:
LASTDRIVE=Z
BUFFERS=20
FILES=40
DEVICE=C:\FDOS\BIN\HIMEMX.EXE
SHELL=C:\FDOS\BIN\COMMAND.COM C:\FDOS\BIN /E:1024 /P=C:\FDAUTO.BAT
This configuration file contains only a few instructions:
The first instruction tells FreeDOS how many drive letters to reserve in memory. (DOS uses letters to represent each drive attached to the system, and LASTDRIVE=Z says to reserve drive letters from “A” to “Z.”). LASTDRIVE affects the number of logical drives that your system can recognize. You probably don’t have any logical drives; the FreeDOS installer doesn’t set these up by default. In any case, it is safe to set LASTDRIVE=Z on any FreeDOS system.
The BUFFERS line reserves memory for file buffers. A buffer helps to speed up certain processes that require storage, such as copying files. If you set a larger value for BUFFERS, FreeDOS will reserve more memory—and vice versa for smaller values. Most users will set this to BUFFERS=20 or BUFFERS=40, depending on how often they need to read and write files on the system.
The FILES setting determines how many files DOS allows you to open at one time. If you run an application that needs to open many files at once, such as a Genealogy database, you may need to set FILES to a larger value. For most users, FILES=40 is a reasonable value.
DEVICE is a special instruction that loads a device driver. DOS requires device drivers for certain hardware or configurations. The line in the example loads the HimemX device driver, so DOS can take advantage of expanded memory beyond the first 640 kilobytes.
The last line tells the FreeDOS kernel where to find the command-line shell. By default, the kernel will look for the shell as COMMAND.COM, but you can change it with the SHELL instruction. In this example, the shell is the COMMAND.COM program, located in the \FDOS\BIN directory on the “C:” drive.
The other text at the end of the SHELL indicate the options to the COMMAND.COM shell. The FreeDOS COMMAND.COM supports several startup options to modify its behavior, including:
C:\FDOS\BIN– The full path to theCOMMAND.COMprogram/E:1024– The environment size, in bytes./E:1024tellsCOMMAND.COMto reserve 1024 bytes, or 1 kilobyte, to store its environment variables./P=C:\FDAUTO.BAT– The/Poption indicates that the shell is a permanent shell, so the user cannot quit the shell by typingEXIT(the extra text tellsCOMMAND.COMto execute theC:\FDAUTO.BATfile at startup, instead of the defaultAUTOEXEC.BATfile)
With that simple configuration, you should be able to interpret some of the FDCONFIG.SYS file that’s installed by FreeDOS.
Boot menu
FreeDOS supports a neat feature—multiple configurations on one system, using a “boot menu” to select the configuration you want. The FDCONFIG.SYS file contains several lines that define the menu:
MENUDEFAULT=2,5
MENU 1 - Load FreeDOS with JEMMEX, no EMS (most UMBs), max RAM free
MENU 2 - Load FreeDOS with JEMMEX (more compatible)
MENU 3 - Load FreeDOS with JEMM386 (Expanded Memory)
MENU 4 - Load FreeDOS low with some drivers (Safe Mode)
MENU 5 - Load FreeDOS without drivers (Emergency Mode)
The MENUCOLOR instruction defines the text color and background color of the boot menu. These values are typically in the range 0 to 7, and represent these colors:
- 0 Black
- 1 Blue
- 2 Green
- 3 Cyan
- 4 Red
- 5 Magenta
- 6 Brown
- 7 White
So the MENUCOLOR=7,0 definition means to display the menu with white (7) text on a black (0) background. If you instead wanted to use white text on a blue background, you could define this as MENUCOLOR=7,1.
The exclamation point at the start of the line means that this instruction will always be executed, no matter what menu option you choose.
The MENUDEFAULT=1,5 line tells the kernel how long to wait for the user to select a boot menu entry, or what default menu entry to use if the user did not select one. MENUDEFAULT=1,5 indicates the system will wait for 5 seconds; if the user did not attempt to select a menu item within that time, the kernel will assume boot menu “1” instead.
The MENU lines after that are labels for the different boot menu configurations. These are presented in order, so menu item “1” is first, then “2,” and so on.
In the lines that follow in FDCONFIG.SYS, you will see numbers before a question mark. These indicate “for this boot menu entry, use this line.” For example, the line with 234? will only load the HimemX device driver if the user selects boot menu entries “2,” “3,” or “4.”
Other configuration
There are lots of ways to use FDCONFIG.SYS to configure your FreeDOS system. We’ve only covered the basics here, the most common ways to define your FreeDOS kernel settings. For more information, explore the FreeDOS Help system (type HELP at the command line) to learn how to use all of the FreeDOS FDCONFIG.SYS options:
SWITCHES– Boot time processing behaviorREMand;– Comments (ignored)MENUCOLOR– Boot menu text color and background colorMENUDEFAULT– Boot menu default valueMENU– Boot menu entryECHOandEECHO– Display messagesBREAK– Sets extended Ctrl+C checking on or offBUFFERSorBUFFERSHIGH– How many disk buffers to allocateCOUNTRY– Sets international behaviorDOS– Tell the FreeDOS kernel how to load itself into memoryDOSDATA– Tell FreeDOS to load kernel data into upper memoryFCBS– Set the number of file control blocksKEYBUF– Reassign the keyboard buffer in memoryFILESorFILESHIGH– How many files to have open at onceLASTDRIVEorLASTDRIVEHIGH– Set the last drive letter that can be usedNUMLOCK– Set the keyboard number pad lock on or offSHELL,SHELLHIGH, orCOMMAND– Set the command line shellSTACKSorSTACKSHIGH– Add stacks to handle hardware interruptsSWITCHAR– Redefines the command line option switch characterSCREEN– Set the number of lines on the screenVERSION– Set what DOS version to report to programsIDLEHALT– Activates energy saving features, useful on certain systemsDEVICEandDEVICEHIGH– Load a driver into memoryINSTALLandINSTALLHIGH– Load a “terminate and stay resident” programSET– Set a DOS environment variable
Configuring in plain text
Like Linux and other Unix systems, FreeDOS configuration happens in plain text. No special tools for editing are required, so dive in and see what options suit you best.
Adapted from Configure FreeDOS in plain text by Jim Hall