CONFIG.SYS

From Wikipedia, the free encyclopedia

CONFIG.SYS is the primary configuration file for the DOS and OS/2 operating systems. It is a special file that contains setup or configuration instructions for the computer system.

Contents

[edit] Usage

The commands in this file configure DOS for use with devices and applications in the system. The commands also set up the memory managers in the system. After processing the CONFIG.SYS file, DOS proceeds to load and execute the command shell specified in the shell= line of CONFIG.SYS, or COMMAND.COM if there is no such line. The command shell in turn is responsible for processing the AUTOEXEC.BAT file.

CONFIG.SYS is composed mostly of name=value statements which look like variable assignments. In fact these will either define some tunable parameters often resulting in reservation of memory, or load files, mostly TSRs and device drivers, into memory.

In DOS, CONFIG.SYS is located in the root directory of the drive from which DOS was booted. In some versions of DOS it may have an alternate filename, e.g. FDCONFIG.SYS in FreeDOS, or DCONFIG.SYS in some versions of DR-DOS.

Both CONFIG.SYS and AUTOEXEC.BAT can still be found included in the system files of Windows 3.x, Windows 95, and Windows 98, because they all ran on top of DOS. Typically these files were left empty, with no content, as they were not strictly required to run Windows programs. Windows Me did not parse the CONFIG.SYS file during the Windows boot process[1], instead applying default settings through the registry. An unofficial workaround exists [2].

[edit] Examples

Historical CONFIG.SYS for MS-DOS with Windows 3.xx:

device=c:\dos\himem.sys
device=c:\dos\emm386.exe /noems
dos=high,umb
devicehigh=c:\windows\mouse.sys
devicehigh=c:\dos\setver.exe
country=044,437,c:\dos\country.sys 
shell=c:\dos\command.com c:\dos /e:512 /p
  • The first line loads the himem.sys driver that enables DOS to use the high memory area.
  • The second line loads the EMM386 memory manager. The command line argument umb allows the use of the upper memory area. Other arguments that could be given to emm386.exe are ram, which enables expanded memory, or noems which prevents the use of expanded memory while allowing extended memory. The noems switch had the advantage of freeing up more umb blocks.
  • The third line causes DOS to use high memory and upper memory when possible, freeing up more conventional memory for applications to use.
  • Lines four to five load device drivers into high memory: the first is a mouse driver; the second is a compatibility program. Line six sets localisation settings such as setting the country to the UK (code 044) and setting code page 437. The final line sets the shell to the default shell, command.com, and starts it with c:\dos as the working directory, with an environment size of 512 bytes, and the /p indicates that it is the parent process and therefore cannot be shut down by using the exit command.

Recent FDCONFIG.SYS or CONFIG.SYS of FreeDOS:

screen=0x12
device=c:\dos\himem.exe
device=c:\dos\emm386.exe
dos=high,umb
country=044,437,c:\dos\country.sys 
shell=c:\dos\freecom.com c:\dos /e:512 /p

In general .sys files are called in config.sys, as above, and .exe programs such as the popular disk caching software SMARTDRIVE provided by Microsoft with MS-DOS 5.x, or LBACACHE of FreeDOS, are loaded in the autoexec.bat file. However, there are ways to load .SYS like files later from commandline as well as .EXE files from config file.

[edit] Issues

The system can still boot if these files are missing or corrupted. However, these two files are essential for the complete bootup process to occur with the DOS operating system. They contain information that is used to change the operating system for personal use. They also contain the requirements of different software application packages. A DOS system would require troubleshooting if either of these files became damaged or corrupted.

[edit] Dual Booting DOS and Win 9.x

When installing Windows 95 over a preexisting DOS/WINDOWS install, CONFIG.SYS and AUTOEXEC.BAT are renamed to CONFIG.DOS and AUTOEXEC.DOS. This is intended to ease dual booting between Windows 9.x and DOS. When booting into DOS, they are temporarily renamed CONFIG.SYS and AUTOEXEC.BAT. Backups of the Win95 versions are made as .W40 files.

[edit] OS/2 / NT

OS/2 uses the CONFIG.SYS file extensively for setting up its configuration, drivers and enviroment before the graphical part of the system loads.

In the OS/2 subsystem of Windows NT, what appeared as CONFIG.SYS to OS/2 programs was actually stored in the registry.

[edit] See also

[edit] External links