Thursday, March 5, 2020

Navigating FreeDOS - FDCONFIG.SYS

If you're new to FreeDOS, you may wonder "How does FreeDOS start up?" And how can you control what FreeDOS is doing during boot?

To learn that, let's examine the FDCONFIG.SYS file:


FDCONFIG.SYS (or just CONFIG.SYS on MS-DOS) is the configuration file for the DOS kernel. It's what tells the kernel what to load when it boots, and what things it should do during start-up.

In it's simplest form, FDCONFIG.SYS can just be a list of simple configuration entries:

SET DOSDIR=C:\FDOS
COUNTRY=001,858,C:\FDOS\BIN\COUNTRY.SYS
LASTDRIVE=Z
BUFFERS=20
FILES=40
MENUCOLOR=7,0
DOS=HIGH
DEVICE=C:\FDOS\BIN\HIMEMX.EXE
SHELL=C:\FDOS\BIN\COMMAND.COM C:\FDOS\BIN /E:1024 /P=C:\AUTOEXEC.BAT

Those lines tell the FreeDOS kernel about how it should set up the system. For example, it sets the DOSDIR environment variable to C:\FDOS, so FreeDOS knows where to find other files. The last drive letter is set to Z. At the end, this simple FDCONFIG.SYS loads the COMMAND.COM program as the interactive command shell (called FreeCOM on FreeDOS) as a permanent (/P) shell that loads the C:\AUTOEXEC.BAT file when it starts up.

You can control other things that happen during the boot process. FreeDOS lets you present a boot menu to the user; that's where the MENU entries and numbers come in. For example, 124?DOS=HIGH loads DOS=HIGH only when the user selects menu items 1, 2, or 4.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.