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
FILES=40. For example, the default
FDCONFIG.SYS in FreeDOS 1.3 RC4 looks like this:
SET DOSDIR=C:\FDOS !COUNTRY=001,858,C:\FDOS\BIN\COUNTRY.SYS !LASTDRIVE=Z !BUFFERS=20 !FILES=40 !MENUCOLOR=7,0 MENUDEFAULT=1,5 MENU 1 - Load FreeDOS with JEMMEX, no EMS (most UMBs), max RAM free MENU 2 - Load FreeDOS with JEMM386 (Expanded Memory) MENU 3 - Load FreeDOS low with some drivers (Safe Mode) MENU 4 - Load FreeDOS without drivers (Emergency Mode) 12?DOS=HIGH 12?DOS=UMB 12?DOSDATA=UMB 1?DEVICE=C:\FDOS\BIN\JEMMEX.EXE NOEMS X=TEST I=TEST NOVME NOINVLPG 234?DEVICE=C:\FDOS\BIN\HIMEMX.EXE 2?DEVICE=C:\FDOS\BIN\JEMM386.EXE X=TEST I=TEST I=B000-B7FF NOVME NOINVLPG 34?SHELL=C:\FDOS\BIN\COMMAND.COM C:\FDOS\BIN /E:1024 /P=C:\FDAUTO.BAT 12?SHELLHIGH=C:\FDOS\BIN\COMMAND.COM C:\FDOS\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?
Let's start with a simple configuration, so we can see what does what. Assume this very brief
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.
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=40, depending on how often they need to read and write files on the system.
FILES setting determines how many files DOS will allow 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
DEVICE=C:\FDOS\BIN\HIMEMX.EXE 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,
SHELL=C:\FDOS\BIN\COMMAND.COM says the shell is the
COMMAND.COM program, located in the
\FDOS\BIN directory on the
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 the |
|/E:1024||The environment (E) size, in bytes. |
With that simple configuration, you should be able to interpret some of the the
FDCONFIG.SYS file that's installed by FreeDOS 1.3 RC4.
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:
!MENUCOLOR=7,0 MENUDEFAULT=1,5 MENU 1 - Load FreeDOS with JEMMEX, no EMS (most UMBs), max RAM free MENU 2 - Load FreeDOS with JEMM386 (Expanded Memory) MENU 3 - Load FreeDOS low with some drivers (Safe Mode) MENU 4 - Load FreeDOS without drivers (Emergency Mode)
MENUCOLOR instruction defines the text color and background color of the bootmenu. These values are typically in the range 0 to 7, and represent these colors:
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
The exclamation point (
!) at the start of the line means that this instruction will always be executed, no matter what menu option you choose.
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.
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, this line with
234? will only load the HimemX device driver if the user selects boot menu entries "2," "3," or "4."
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
|SWITCHES||Boot time processing behavior|
|REM and ;||Comments (ignored in FDCONFIG.SYS)|
|MENUCOLOR||Boot menu text color and background color|
|MENUDEFAULT||Boot menu default value|
|MENU||Boot menu entry|
|ECHO and EECHO||Display messages|
|BREAK||Sets extended ctrl-c checking on or off|
|BUFFERS or BUFFERSHIGH||How many disk buffers to allocate|
|COUNTRY||Sets international behavior|
|DOS||Tell the FreeDOS kernel how to load itself into memory|
|DOSDATA||Tell FreeDOS to load kernel data into upper memory|
|FCBS||Set the number of file control blocks (FCBs)|
|KEYBUF||Reassign the keyboard buffer in memory|
|FILES or FILESHIGH||How many files to have open at once|
|LASTDRIVE or LASTDRIVEHIGH||Set the last drive letter that can be used|
|NUMLOCK||Set the keyboard number pad lock on or off|
|SHELL, SHELLHIGH, or COMMAND||Set the command line shell|
|STACKS or STACKSHIGH||Add stacks to handle hardware interrupts|
|SWITCHAR||Redefines the command line option switch character|
|SCREEN||Set the number of lines on the screen|
|VERSION||Set what DOS version to report to programs|
|IDLEHALT||Activates energy saving features, useful on certain systems|
|DEVICE and DEVICEHIGH||Load a driver into memory|
|INSTALL and INSTALLHIGH||Load a "terminate and stay resident" (TSR) program|
|SET||Set a DOS environment variable|