Jump to content

SOFTREBOOT (CONFIG.SYS directive)

From Alfawiki
CONFIG.SYS
Company typeConfiguration file
IndustryOperating systems
Founded1983
ProductsConfiguration commands for DOS and OS/2 startup

CONFIG.SYS serves as the main configuration file for DOS and OS/2 operating systems. This plain text ASCII file holds configuration commands that the operating system's DOS BIOS interprets during the startup sequence. CONFIG.SYS was first introduced with DOS version 2.0.

Usage

The directives within CONFIG.SYS are used to set up DOS for hardware devices, applications, and memory allocation. Once CONFIG.SYS has been processed, DOS initiates the command interpreter specified by the SHELL directive; if none is indicated, it defaults to COMMAND.COM, which then executes AUTOEXEC.BAT.

Typically, the file consists of name=value pairs that adjust configurable settings or load device drivers and terminate-and-stay-resident (TSR) programs. In DOS systems, CONFIG.SYS is located in the root directory of the system's boot drive.

Some DOS variants utilize alternative filenames for this configuration file. Examples include:

- Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, and REAL/32 use CCONFIG.SYS or CCONFIG.INI in place of CONFIG.SYS. These platforms also support supplementary configuration data stored in binary files such as CCONFIG.BIN, which are usually modified via CONFIG.EXE.

- Starting with DR DOS 3.31 and continuing through PalmDOS 1.0 and Novell DOS 7, DCONFIG.SYS overrides CONFIG.SYS. This feature facilitates disk compression and multi-boot configurations by allowing multiple configuration files to coexist.

- OpenDOS 7.01 and DR-OpenDOS 7.02 additionally recognize ODCONFIG.SYS or DRCONFIG.SYS as valid configuration files.

From DR DOS 6.0 onward, users can change the default system file extensions using SYS /DR:ext, enabling multiple sets of system files to be managed concurrently via boot loaders like LOADER. The SHELL command supports specifying alternative AUTOEXEC.BAT files with the option /P[:filename.ext], including support for extensions other than .BAT.

The CHAIN=filespec command allows DR-DOS to continue reading another configuration file, optionally jumping to a specific label using CHAIN=filespec,label. Starting with DR-DOS 7.03, the SYS /A option copies both CONFIG.SYS and AUTOEXEC.BAT alongside other system files.

Other DOS-based systems offer comparable functionalities:

- FreeDOS uses a configuration file named FDCONFIG.SYS - RxDOS utilizes RXCONFIG.SYS - PTS-DOS employs CONFIG.PTS

In Windows 95 and Windows 98, which are built on DOS foundations, CONFIG.SYS and AUTOEXEC.BAT exist in the root directory but usually contain minimal or no content. Windows Me no longer processes CONFIG.SYS during boot; instead, it retrieves environment settings from the Windows Registry.

In contrast, under FlexOS, CONFIG.SYS is a binary file that specifies resource managers and device drivers loaded at startup.

Example

A sample CONFIG.SYS for MS-DOS 5 might look like this: <syntaxhighlight lang="ini" line="1"> DOS=HIGH,UMB DEVICE=C:\DOS\HIMEM.SYS DEVICE=C:\DOS\EMM386.EXE RAM DEVICEHIGH=C:\DOS\ANSI.SYS FILES=30 SHELL=C:\DOS\COMMAND.COM C:\DOS /E:512 /P </syntaxhighlight>

:;*?!

Marks labels within CONFIG.SYS that serve as jump destinations for , , , , and commands.
Functions similarly to , allowing inline comments after directives. (Note that MS-DOS/PC DOS handles inline comments differently if enclosed in quotation marks.)
Used at the beginning of inline comments alongside the ; directive.
Presents a Yes/No prompt requesting confirmation before executing subsequent CONFIG.SYS commands.[1] (FreeDOS does not support optional messages but permits conditional execution via boot menus.) From DOS version 6.0 onward, a similar effect can be achieved by appending after a directive (for example, ).
Forces unconditional execution of the following CONFIG.SYS command.

ATemplate:NbndC

Determines whether programs can be terminated upon encountering errors.
Sets which drives record file access timestamps within FAT directory entries.
Enables conditional execution on AT-compatible systems.
Functions as a boot manager.
Adjusts the level of detail for error messages.
Changes the default serial port driver (COM1 through COM4) used by the AUX device.
Prevents activation of character devices outside the virtual \DEV directory.
Loads a fundamental device driver into memory.
Generates a brief beep even if notification sounds are disabled.
Designates the operating system to boot next.
Enables or disables extended Ctrl+C interrupt checking.
Defines the quantity of disk buffers allocated.
Similar to BUFFERS but allocates buffers in HMA or UMB.
Sets the maximum number of cache blocks allocated from the system pool.
Defines the maximum duration before unused cache blocks are returned to the system pool.
Specifies the maximum delay before dirty cache blocks are written back to disk.
Loads programs listed in CONFIG.SYS, executing them in the foreground and pausing processing until completion.
Indicates the keyboard's Caps Lock status.
Names the CD-ROM hardware driver.
Specifies the number of buffers used for CD-ROM access.
Continues processing CONFIG.SYS from a new file or label.
Defines the type of system clock utilized.
Clears the display screen.
Specifies OEM codepage(s) in use.
Indicates CMOS RAM address location.
Configures color schemes for boot menus.
, ;, ;, ;
Sets count, sequence, I/O address, and timeout for COM ports (DR-DOS 7.02 and later).
(PTS-DOS exclusive)
Defines DMA buffer settings.
Redefines inline comment markers or causes subsequent lines to be ignored.
Activates and configures internationalization support.
Positions display cursor for menu interfaces.
Supports codepage switching functionality.
Specifies RAM refresh rate.

Conditional CPU directives (CPU88, CPU88+, CPU86, CPU86+, CPU286, CPU286+, CPU386, CPU386+, CPU486, CPU486+): Govern execution based on CPU model (applicable in PTS-DOS and DR-DOS 7.02+).

DTemplate:NbndF

Adjusts relocation settings for drive descriptor tables.
Defines memory segment limit up to which multi-sector disk data deblocking is permitted.
Enables support for an internal debugger tool.
Functions as a boot manager utility.
Loads device drivers into memory space.
Loads device drivers into upper memory area (parallel to in DRDOS 5.0).
Configures country-specific and codepage information for keyboard, screen, and printer devices (KBD, SCR, LPT).
Sets sizes for cache memory allocation.
Defines compatibility mode settings for floppy disk drives.
Specifies font used for display output.
Controls loading of DOS into high memory and/or utilization of upper memory blocks.
Determines whether DOS tables (BUFFERS, FCBS, FILES, LASTDRIVE, STACKS) are loaded into upper memory areas.
Provides an alternate directory path for DOS files.
Designates search paths for data files.
Specifies parameters related to physical disk drives.
Defines characteristics for unrecognized drives.
Refer to .
Enables creation and specifies target drive for PDUMP.nnn error log files.
Displays a simple message on screen output.
Shows messages supporting ANSI escape sequences on screen.
Sets additional verification checks when launching programs.
Assigns presumed error or return codes for subsequent operations.
Specifies A20 gate state during program startup procedures.
Terminates CONFIG.SYS processing before reaching file end (excluding SWITCHES and SHELL directives).
Configures hash table size to optimize file open operations (differs from MS-DOS/PC DOS FASTOPEN driver).
Defines number of cached File Control Blocks that can be open simultaneously (shares buffer with FILES under DR-DOS).
Similar to FCBS but explicitly loads FCBs into upper memory segments.
Acts as a boot manager component.
Sets maximum number of files allowed open concurrently.
Like FILES but explicitly loads file handles into upper memory segments.
Includes execution of specified CONFIG.SYS subsections (see IGNORE).

GTemplate:NbndI

Waits for a key press or timeout, setting the error level to the ASCII code of the key or 1024 if timed out.
Resumes processing of CONFIG.SYS at a designated label.
Continues nested CONFIG.SYS processing at a specified label, then returns to the previous point.
Refer to , , or for additional details.
See also .
Refer to .
See or for more information.
Consult or as applicable.
Refer to .
Loads a TSR program after relocating the DOS data segment, functioning similarly to .
See , , or for related commands.
Refer to .
See or for further instructions.
Activates console and command line history buffer with advanced search capabilities.
Defines the address of the High Memory Area (HMA) segment.
Sets up HLT mode for energy conservation.
Enables scanning for boot sector viruses.
Loads file systems that can be installed.
Skips execution of specified CONFIG.SYS subsections.
Grants certain programs permission to run at ring 2, allowing direct hardware I/O access.
Incorporates directives from another menu block, emulated via GOSUB/RETURN in DR-DOS.
Sets the keyboard Insert mode status.
Loads a TSR program into memory.
Installs TSR into upper memory, equivalent to HIINSTALL in DR DOS 5.0.
Installs TSR after relocating the DOS data segment.
Rotates PIC interrupt priorities to prioritize a specified IRQ number.

KTemplate:NbndM

Defines the keyboard layout configuration.
Specifies the memory address of the relocated keyboard buffer.
Determines the maximum number of accessible drives.
Functions like LASTDRIVE but loads Current Directory Structure (CDS) into upper memory.
Sets paths for DLL file searching.
Controls how legacy applications are loaded.
Establishes the number of allowable file locks.
Configures display of boot logos using PTS-DOS boot manager.
Sets count, logical order, I/O address, and timeout parameters for LPT1 device.[2]
Applies LPT1 settings equivalently to LPT2 device.[2]
Mirrors LPT1 configuration for LPT3 device.[2]
Enables and configures LPT4 device similarly to others.
Defines wait time before process priority is raised.
Configures strategy for memory allocation.
Specifies default DOS memory allocation method.
Sets menu option definitions.
Determines menu color schemes (emulation available under DR-DOS).
Selects default menu block (DR-DOS emulatable).
Defines a menu block (emulatable under DR-DOS).
Enables or disables multitrack disk operations support.
Continues CONFIG.SYS processing from a new file, optionally loading a device driver and setting %NEWFILE% environment variable.[3]

NTemplate:NbndQ

Defines default No () character for Yes/No/Resume prompts.
Sets keyboard [[Num Lock|Template:Keypress]] status on or off at startup.
Allows conditional execution based on last error code, e.g., .
Displays text and waits for keypress, similar to and commands in DR-DOS.
Requires user confirmation for errors encountered in CONFIG.SYS processing.
Configures buffer sizes for LPT ports.
Enables conditional execution on PC-compatible systems.
Sets scheduler priority level.
Assigns priority for disk input/output operations.
Changes default printer device driver from LPT1 to LPT3 or LPT4 as specified.
Determines whether DOS programs are permitted to run.
Loads a user interface shell program.
Enables conditional execution on IBM PS/1-compatible machines.
Enables conditional execution on IBM PS/2-compatible machines.
Silences output sent to STDOUT.

RTemplate:NbndT

Activates automatic system reboot upon encountering errors.
Permits inclusion of comments within CONFIG.SYS (ignored in PTS-DOS).
Reserves a drive letter to prevent its use by local block device drivers.
Establishes the default Resume () prompt character.
Returns nested CONFIG.SYS processing control to the previous GOSUB or SWITCH statement, optionally providing a return code.
Sets the size of real mode memory.
Allows programs in CONFIG.SYS to load concurrently in the background.
Saves the initial character of deleted files within the FAT reserved area.
Determines video mode under FreeDOS and screen access methods under PTS-DOS.
Controls keyboard Scroll Lock state, turning it on or off.
Defines environment variables.
Loads the command interpreter shell.
Functions like SHELL but includes a SIZE parameter to pre-allocate COMMAND.COM into HMA or UMBs, enhancing memory efficiency with third-party shells.
Specifies keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
Configures whether files close upon pressing Ctrl+Alt+Del.
Skips the Power-On Self-Test (POST) during reboot.
, STACKSIZE, STACKSHIGH
Sets hardware interrupt stack sizes and buffer locations, varying by OS version.
, SYSBOOT, SYSGEN, SYSLOAD
PTS-DOS commands managing boot procedures, system file paths, and alternative DOS boot files.
(DOS 6.0+) Defines submenu blocks (unsupported by DR-DOS or FreeDOS).
, SWAPPATH
OS/2 options for specifying error log locations and swap file directories.
, SWITCHES
Conditional processing directives for CONFIG.SYS (dependent on OS).
, designates the default command-line switch character ('/' or '-').
, THREADS, TIMESLICE
OS/2-specific settings controlling system behavior including FPU bug fixes and scheduler parameters.
, TRACE, TRACEBUF
Set timeouts for processing steps and enable logging/tracing of CONFIG.SYS execution (varies by OS).
, defines temporary file extensions (PTS-DOS).
, records detailed error logs (OS/2 3.0+).

UTemplate:NbndZ

Configures DOS to utilize a specified segment as Upper Memory Block (UMB) memory.
Selects the UMB server to be used.
Defines address ranges allocated as UMB RAM.
Enables or disables verification of disk writes.
Specifies the DOS version reported to applications.
Controls VGA display status settings.
Indicates current video mode, analogous to FreeDOS's SCREEN directive.
Determines whether virtual DMA is permitted.
Specifies if processor Virtual Mode Extensions should be disabled.
Configures VxD drivers for Windows environments.
Sets up system support parameters for Windows.
Manages relocation of the Extended BIOS Data Area (XBDA).
Enables conditional execution on XT-compatible machines.
Activates built-in Year 2000 compliance features.
Defines the default character for Yes responses in prompts.
Configures tracking of file deletions.

Issues

Although the system can boot without CONFIG.SYS or AUTOEXEC.BAT files, these are crucial for tailoring the operating system and loading necessary software components. Corruption or absence of these files necessitates troubleshooting efforts.

If CONFIG.SYS lacks a SHELL directive—or if it is missing or damaged—DOS attempts to locate COMMAND.COM in the root directory of the boot drive. Versions prior to 6.0 will fail to boot if COMMAND.COM cannot be found. However, MS-DOS 6.0, PC DOS 6.1, and Novell DOS 7 and later will prompt users to specify an alternate command processor path. This prompt also appears if COMMAND.COM terminates unexpectedly, allowing limited runtime shell replacement without requiring a reboot.

The COMMAND.COM from MS-DOS 7.0 and newer is incompatible with DR-DOS systems, which are commonly used in dual-boot configurations. Starting with DR-DOS 7.02, skipping or tracing through SHELL directives is disabled to avoid conflicts. Certain key combinations restore some skipping functionality for recovery when invalid SHELL arguments are encountered. If no valid SHELL is found during skipped CONFIG.SYS processing, users are prompted to enter a shell filename before COMMAND.COM loads.

CONFIG.SYS file size is limited in MS-DOS/PC DOS—up to 64 KB in recent releases—but DR-DOS imposes no such restriction beyond file system limits. MS-DOS processes CONFIG.SYS by tokenizing it into memory before executing directives sequentially—loading device drivers prior to TSRs. Conversely, DR-DOS interprets commands line-by-line, allowing precise control over loading order through DEVICE and INSTALL commands. This approach facilitates resolving load conflicts and supports conditional execution based on hardware detection or errors, enabling integration of temporary utilities into the boot sequence.

Early MS-DOS versions restricted the length of the SHELL command line to 31 characters. Later versions expanded this limit up to 128 characters, while DR-DOS permits up to 255 characters. None of the CONFIG.SYS directives support long filenames.

Dual Booting DOS with Windows 9x

When Windows 95 is installed over a pre-existing DOS or Windows environment, the system renames CONFIG.SYS and AUTOEXEC.BAT to CONFIG.DOS and AUTOEXEC.DOS, enabling a dual boot arrangement between Windows 9x and DOS. During a DOS startup, these renamed files are temporarily switched back to CONFIG.SYS and AUTOEXEC.BAT. Meanwhile, backup copies of the Windows 95 versions are preserved as CONFIG.W40 and AUTOEXEC.W40.

In contrast, when Caldera DR-DOS versions 7.02 or 7.03 are installed alongside Windows 95, the original CONFIG.SYS and AUTOEXEC.BAT files for Windows remain intact. Instead, DR-DOS utilizes its own initialization files named DCONFIG.SYS and AUTODOS7.BAT.

OS/2 and Windows NT

The OS/2 operating system depends extensively on CONFIG.SYS for setting up device drivers and environment variables prior to launching its graphical user interface.

Within the OS/2 subsystem embedded in Windows NT, what OS/2 applications recognize as CONFIG.SYS is actually maintained within the system registry rather than as a physical file.

Numerous CONFIG.SYS commands employed by OS/2 lack formal documentation.

The use of CONFIG.SYS persists in OS/2-based systems such as eComStation and ArcaOS.

See also

External links

  • Information on AUTOEXEC.BAT and CONFIG.SYS at Computer Hope
  • Archived details on Windows 98 / MS-DOS 7.10 CONFIG.SYS directives
  • Caldera’s archived CONFIG.SYS Command Reference – summary of DR-DOS 7 directives
  • FreeDOS CONFIG.SYS directives overview
  • PTS-DOS 2000 Pro User Guide including CONFIG.SYS commands
  • Unofficial German PTS-DOS FAQ (PTS/FAQD) with additional CONFIG.SYS commands (archived)
  1. ↑ Cite error: Invalid <ref> tag; no text was provided for refs named Paul_2000_CONFIG
  2. ↑ 2.0 2.1 2.2 Cite error: Invalid <ref> tag; no text was provided for refs named Paul_1997_OD-A3
  3. ↑ Cite error: Invalid <ref> tag; no text was provided for refs named Datalight_2005_ROM-DOS