- CONFIG.SYS
-
CONFIG.SYS is the primary configuration file for the DOS, OS/2 as well as similar operating systems. It is a special file that contains setup or configuration instructions for the computer system.
Contents
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 the system was booted.
Some versions of DOS will probe for alternative filenames taking precedence over the default CONFIG.SYS filename if they exist:
While older versions of Concurrent DOS 3.2 to 4.1 did not support CONFIG.SYS files at all, later versions of Concurrent DOS 386 and Concurrent DOS XM, as well as Multiuser DOS, System Manager and REAL/32 will probe for CCONFIG.SYS (with "C" derived from "Concurrent") instead of CONFIG.SYS. Some versions of Multiuser DOS seem to use a filename of CCONFIG.INI instead. These operating systems support many additional and different configuration directives not known under MS-DOS/PC-DOS.
Under DR DOS 6.0, PalmDOS 1.0, Novell DOS 7, OpenDOS 7.01, and DR-DOS 7.02 and higher, a file named DCONFIG.SYS, if present, will take precedence over CONFIG.SYS. Originally, this was implemented to be used in conjunction with disk compression software, where the original boot drive C: would become drive D: (hence the name) after loading the compression driver, but it is since commonly used to help maintain multiple configuration files in multi-boot scenarios. In addition to this, OpenDOS 7.01 and DR-OpenDOS 7.02 will look for a file named ODCONFIG.SYS, whereas some issues of DR-DOS 7.02 and higher will instead also look for DRCONFIG.SYS. Further, under DR DOS 6.0 and higher the SYS /DR:ext command can be used to change the default file extensions.[1] For example, with SYS /L /DR:703 the modified system files IBMBIO.703 and IBMDOS.703 would look for [D]CONFIG.703 instead of CONFIG.SYS, so that multiple parallel sets of files can coexist in the same root directory and be selected via a boot-loader like LOADER, supplied with Multiuser DOS and DR-DOS 7.02/7.03. Under DR DOS 6.0 and higher, the CONFIG.SYS directive CHAIN=filespec can be used to continue processing in the named file, which does not necessarily need to reside in the root directory of the boot drive. DR-DOS 7.02 and higher optionally support an additional parameter as in CHAIN=filespec,label to jump to a specific :label in the given file. DR-DOS 7.03 and higher support a new SYS /A parameter in order to copy the corresponding CONFIG.SYS and AUTOEXEC.BAT files alongside with the system files.
FreeDOS implements a similar feature with its FDCONFIG.SYS configuration file.
Both CONFIG.SYS and AUTOEXEC.BAT can be found included in the root folder of Windows 95, and Windows 98 boot drives, as they are based on DOS. Typically, these files are left empty, with no content, as they are not strictly required to run Windows programs from these versions.
Windows ME does not even parse the CONFIG.SYS file during the Windows boot process,[2] loading those settings from the Windows Registry instead:
- HKLM\System\CurrentControlSet\Control\SessionManager\Environment
Under FlexOS, CONFIG.SYS is a binary file defining the resource managers and device drivers loaded.
Examples
MS-DOS
Example CONFIG.SYS for MS-DOS with Windows 3.xx:
device=c:\dos\himem.sys device=c:\dos\emm386.exe ram dos=high,umb devicehigh=c:\windows\mouse.sys devicehigh=c:\dos\setver.exe country=44,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, which emulates expanded memory. The command line argument RAM allows the use of the upper memory area. Another argument that can be given to emm386.exe is NOEMS, which allows use of the upper memory area without emulating expanded memory. The NOEMS switch also frees 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 the upper memory area: the first is a mouse driver from Microsoft; the second is a compatibility program.
- Line six sets localisation settings such as setting the country to the UK (code 44) and setting the default 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 primary process and therefore cannot be shut down by using the exit command.
As of MS-DOS version 6.0, an optional DOS boot menu was configurable. With this, the user could configure any number of boot configurations and choose one on start-up. This was of great use because various DOS applications preferred different settings for optimal functionality.
Example CONFIG.SYS with MS-DOS 6.0 boot menu:
[menu] menuitem=WIN, Windows menuitem=XMS, DOS with only Extended Memory menudefault=WIN, 10 [common] device=c:\dos\himem.sys dos=high,umb shell=c:\dos\command.com c:\dos /e:512 /p country=44,437,c:\dos\country.sys [WIN] device=c:\dos\emm386.exe ram devicehigh=c:\windows\mouse.sys devicehigh=c:\dos\setver.exe [XMS] device=c:\dos\emm386.exe noems
The layout of the DOS boot menu is fairly self-explanatory. The "[MENU]" section defines menu entries. The option, "MENUDEFAULT", allows a default choice with a countdown timer before it starts up (10 seconds here). The "[COMMON]" area holds lines that will start for every menu choice, while the later "[WIN]" and "[XMS]" areas are specific to each configuration.
The later boot file, AUTOEXEC.BAT, would receive the chosen selection through a special %CONFIG% environment variable and thereby could branch into separately configured areas within this batchjob as well.
More features of CONFIG.SYS menu are described here:
FreeDOS
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 version of the caching software SMARTDRIVE provided by Microsoft with MS-DOS 6.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 theconfiguration file.
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.
If CONFIG.SYS does not contain a "SHELL" statement (or the file is corrupt or missing), DOS typically searches for COMMAND.COM in the root directory. If this is not found, the system will not start up.
Dual Booting DOS and Windows 9x
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 9x and DOS. When booting into DOS, they are temporarily renamed CONFIG.SYS and AUTOEXEC.BAT. Backups of the Windows 95 versions are made as .W40 files.
When Caldera DR-DOS 7.02/7.03 is installed on a system already containing Windows 95, Windows' CONFIG.SYS and AUTOEXEC.BAT retain those names. DR-DOS' startup files are installed as DCONFIG.SYS (a name already used in earlier versions of DR DOS) and AUTODOS7.BAT.
OS/2 / NT
OS/2 uses the CONFIG.SYS file extensively for setting up its configuration, drivers and environment 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.
There are many undocumented or poorly documented CONFIG.SYS statements used by OS/2.[3]
See also
References
- ^ Novell, ed (1993-04). "Booting Multiple Operating Systems with the DR Multiuser DOS LOADER Utility, April 1993, Volume 5, Number 4". http://developer.novell.com/support/bullets/apr93.htm#articles. Retrieved 2011-09-08.
- ^ Understanding the Settings in the Windows Millennium Edition Config.sys File
- ^ "CONFIG.SYS statements used by OS/2". REXX Tips & Tricks, Version 2.80. http://www.markcrocker.com/rexxtipsntricks/rxtt28.2.0795.html. Retrieved 17 January 2009.
External links
Categories:- DOS files
- OS/2
- Configuration files
Wikimedia Foundation. 2010.