CONFIG.SYS
Encyclopedia
CONFIG.SYS is the primary configuration file
Configuration file
In computing, configuration files, or config files configure the initial settings for some computer programs. They are used for user applications, server processes and operating system settings. The files are often written in ASCII and line-oriented, with lines terminated by a newline or carriage...

 for the DOS
DOS
DOS, short for "Disk Operating System", is an acronym for several closely related operating systems that dominated the IBM PC compatible market between 1981 and 1995, or until about 2000 if one includes the partially DOS-based Microsoft Windows versions 95, 98, and Millennium Edition.Related...

, OS/2
OS/2
OS/2 is a computer operating system, initially created by Microsoft and IBM, then later developed by IBM exclusively. The name stands for "Operating System/2," because it was introduced as part of the same generation change release as IBM's "Personal System/2 " line of second-generation personal...

 as well as similar operating system
Operating system
An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...

s. It is a special file that contains setup or configuration instructions for the computer system.

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
COMMAND.COM
COMMAND.COM is the filename of the default operating system shell for DOS operating systems and the default command line interpreter on Windows 95, Windows 98 and Windows Me...

 if there is no such line. The command shell in turn is responsible for processing the AUTOEXEC.BAT
AUTOEXEC.BAT
AUTOEXEC.BAT is a system file found originally on DOS-type operating systems. It is a plain-text batch file that is located in the root directory of the boot device...

 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
Terminate and Stay Resident
Terminate and Stay Resident is a computer system call in DOS computer operating systems that returns control to the system as if the program has quit, but keeps the program in memory...

 and device driver
Device driver
In computing, a device driver or software driver is a computer program allowing higher-level computer programs to interact with a hardware device....

s, into memory.

In DOS, CONFIG.SYS is located in the root directory
Root directory
In computer file systems, the root directory is the first or top-most directory in a hierarchy. It can be likened to the root of a tree — the starting point where all branches originate.-Metaphor:...

 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
Multiuser DOS
Multiuser DOS is a soft real-time multi-user multi-tasking operating system for IBM PC-compatible microcomputers.An evolution of the older Concurrent CP/M-86 and Concurrent DOS operating systems, it was originally developed by Digital Research and later further developed by Novell...

, 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. 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
FreeDOS
FreeDOS is an operating system for IBM PC compatible computers. FreeDOS is made up of many different, separate programs that act as "packages" to the overall FreeDOS Project...

 implements a similar feature with its FDCONFIG.SYS configuration file.

Both CONFIG.SYS and AUTOEXEC.BAT can be found included in the root folder
Root directory
In computer file systems, the root directory is the first or top-most directory in a hierarchy. It can be likened to the root of a tree — the starting point where all branches originate.-Metaphor:...

 of Windows 95
Windows 95
Windows 95 is a consumer-oriented graphical user interface-based operating system. It was released on August 24, 1995 by Microsoft, and was a significant progression from the company's previous Windows products...

, and Windows 98
Windows 98
Windows 98 is a graphical operating system by Microsoft. It is the second major release in the Windows 9x line of operating systems. It was released to manufacturing on 15 May 1998 and to retail on 25 June 1998. Windows 98 is the successor to Windows 95. Like its predecessor, it is a hybrid...

 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
Windows Me
Windows Millennium Edition, or Windows Me , is a graphical operating system released on September 14, 2000 by Microsoft, and was the last operating system released in the Windows 9x series. Support for Windows Me ended on July 11, 2006....

 does not even parse the CONFIG.SYS file during the Windows boot process, loading those settings from the Windows Registry
Windows registry
The Windows Registry is a hierarchical database that stores configuration settings and options on Microsoft Windows operating systems. It contains settings for low-level operating system components as well as the applications running on the platform: the kernel, device drivers, services, SAM, user...

 instead:
HKLM\System\CurrentControlSet\Control\SessionManager\Environment


Under FlexOS
FlexOS
FlexOS was a modular real-time multi-user multi-tasking operating system designed for computer-integrated manufacturing, laboratory, retail and financial markets...

, CONFIG.SYS is a binary file defining the resource managers and device drivers loaded.

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
    HIMEM
    HIMEM.SYS is a DOS device driver which allows DOS programs to store data in extended memory via the Extended Memory Specification . This device driver is of particular importance because various versions of Microsoft Windows that ran on top of the DOS operating system required HIMEM.SYS to be...

     driver that enables DOS to use the high memory area.
  • The second line loads the EMM386
    EMM386
    The name EMM386 was used for the expanded memory managers of both Microsoft's MS-DOS and Digital Research's DR-DOS, which created expanded memory using extended memory on Intel 80386 CPUs. There also is an EMM386.EXE available in FreeDOS....

     memory manager, which emulates expanded memory. The command line argument RAM allows the use of the upper memory area
    Upper Memory Area
    In DOS memory management, the upper memory area refers to memory between the addresses of 640 KB and 1024 KB in an IBM PC or compatible. IBM reserved the uppermost 384 KB of the 8088 CPU's 1024 KB address space for ROM, RAM on peripherals, and memory-mapped input/output...

    . 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
    Conventional memory
    In DOS memory management, conventional memory, also called base memory, is the first 640 kilobytes of the memory on IBM PC or compatible systems. It is the read-write memory usable by the operating system and application programs...

     for applications to use.
  • Lines four to five load device driver
    Device driver
    In computing, a device driver or software driver is a computer program allowing higher-level computer programs to interact with a hardware device....

    s into the upper memory area: the first is a mouse driver from Microsoft; the second is a compatibility program.
  • Line six sets localisation
    Internationalization and localization
    In computing, internationalization and localization are means of adapting computer software to different languages, regional differences and technical requirements of a target market...

     settings such as setting the country to the UK (code 44) and setting the default code page 437
    Code page 437
    IBM PC or MS-DOS code page 437 is the character set of the original IBM PC. It is also known as CP 437, OEM 437, PC-8, MS-DOS Latin US or sometimes misleadingly referred to as the OEM font, High ASCII or Extended ASCII....

    .
  • The final line sets the shell to the default shell, COMMAND.COM
    COMMAND.COM
    COMMAND.COM is the filename of the default operating system shell for DOS operating systems and the default command line interpreter on Windows 95, Windows 98 and Windows Me...

    , 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
AUTOEXEC.BAT
AUTOEXEC.BAT is a system file found originally on DOS-type operating systems. It is a plain-text batch file that is located in the root directory of the boot device...

, 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:
http://dos.rsvs.net/DOSPAGE/CONFMENU.HTM

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
SmartDrive
SmartDrive was a disk caching program that shipped with MS-DOS versions 4.01 through 6.22 and Windows 3.x. It improved disk transfer rates by storing frequently accessed data in the main memory. Early versions of SmartDrive were loaded through a CONFIG.SYS device driver named SMARTDRV.SYS...

 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
Windows 95
Windows 95 is a consumer-oriented graphical user interface-based operating system. It was released on August 24, 1995 by Microsoft, and was a significant progression from the company's previous Windows products...

 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
OS/2
OS/2 is a computer operating system, initially created by Microsoft and IBM, then later developed by IBM exclusively. The name stands for "Operating System/2," because it was introduced as part of the same generation change release as IBM's "Personal System/2 " line of second-generation personal...

 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
OS/2
OS/2 is a computer operating system, initially created by Microsoft and IBM, then later developed by IBM exclusively. The name stands for "Operating System/2," because it was introduced as part of the same generation change release as IBM's "Personal System/2 " line of second-generation personal...

 subsystem of Windows NT
Windows NT
Windows NT is a family of operating systems produced by Microsoft, the first version of which was released in July 1993. It was a powerful high-level-language-based, processor-independent, multiprocessing, multiuser operating system with features comparable to Unix. It was intended to complement...

, what appeared as CONFIG.SYS to OS/2
OS/2
OS/2 is a computer operating system, initially created by Microsoft and IBM, then later developed by IBM exclusively. The name stands for "Operating System/2," because it was introduced as part of the same generation change release as IBM's "Personal System/2 " line of second-generation personal...

 programs was actually stored in the registry.

There are many undocumented or poorly documented CONFIG.SYS statements used by OS/2.

See also

  • DOS
    DOS
    DOS, short for "Disk Operating System", is an acronym for several closely related operating systems that dominated the IBM PC compatible market between 1981 and 1995, or until about 2000 if one includes the partially DOS-based Microsoft Windows versions 95, 98, and Millennium Edition.Related...

  • IBMBIO.COM
    IBMBIO.COM
    IBMBIO.COM is the filename of the DOS-BIOS in many DOS operating systems, and as such part of PC-DOS, earlier versions of MS-DOS, and DR DOS 5.0 and higher...

  • IBMDOS.COM
    IBMDOS.COM
    IBMDOS.COM is the filename of the DOS kernel. It exists in DR-DOS and PC-DOS systems, with MS-DOS using MSDOS.SYS. The file is located in the root directory of the drive containing the operating system....

  • IO.SYS
    IO.SYS
    IO.SYS is an essential part of MS-DOS and Windows 9x. It contains the default MS-DOS device drivers and the DOS initialization program.- Boot sequence :...

  • MSDOS.SYS
    MSDOS.SYS
    MSDOS.SYS an important system file on MS-DOS and Windows 9x systems. It is run after IO.SYS. In MS-DOS, it contains the core operating system code, the kernel...

  • COMMAND.COM
    COMMAND.COM
    COMMAND.COM is the filename of the default operating system shell for DOS operating systems and the default command line interpreter on Windows 95, Windows 98 and Windows Me...

  • AUTOEXEC.BAT
    AUTOEXEC.BAT
    AUTOEXEC.BAT is a system file found originally on DOS-type operating systems. It is a plain-text batch file that is located in the root directory of the boot device...


External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK