DEBLOCK (CONFIG.SYS directive)
| Company type | Configuration file |
|---|---|
| Industry | Operating systems |
| Founded | 1983 |
| Products | Configuration 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 file, formatted in ASCII, includes configuration commands executed by the operating system's DOS BIOS during the startup process. 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, software applications, and memory handling. Once CONFIG.SYS is processed, DOS initiates the command interpreter specified by the SHELL directive or defaults to COMMAND.COM, which subsequently runs the AUTOEXEC.BAT script.
Typically, the file contains name=value pairs that define settings or load components such as device drivers and terminate-and-stay-resident programs (TSRs). CONFIG.SYS is located in the root directory of the boot volume.
Certain DOS variants utilize alternative filenames that take priority over CONFIG.SYS:
Earlier iterations of Concurrent DOS did not support CONFIG.SYS; however, later versions like Concurrent DOS 386, Concurrent DOS XM, Multiuser DOS, and REAL/32 employ CCONFIG.SYS or CCONFIG.INI (in Multiuser DOS) and MCONFIG.SYS (in REAL/32). These operating systems also maintain supplementary settings in binary files such as CCONFIG.BIN, which are commonly managed through CONFIG.EXE.
In DR DOS 3.31 and subsequent releases including 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. Similarly, OpenDOS 7.01 and DR-OpenDOS 7.02 recognize ODCONFIG.SYS or DRCONFIG.SYS.
Starting with DR DOS 6.0, the SYS /DR:ext command enables customization of system file extensions to permit multiple sets of system files within a single root directory, selectable through boot loaders like LOADER. The SHELL command supports an optional parameter /P[:filename.ext], enabling alternative AUTOEXEC.BAT files for enhanced multi-boot flexibility.
From version 6.0 onward, DR-DOS includes the CHAIN=filespec directive, allowing continuation of configuration processing from another file, which may reside outside the root directory. Versions 7.02 and later add an optional label argument to jump to specific sections within chained files. DR-DOS 7.03 introduced the SYS /A option to copy both CONFIG.SYS and AUTOEXEC.BAT along with system files.
FreeDOS uses a comparable FDCONFIG.SYS, while RxDOS version 7.24 and above utilizes RXCONFIG.SYS, and PTS-DOS employs CONFIG.PTS.
In the case of Windows 95 and Windows 98, both CONFIG.SYS and AUTOEXEC.BAT remain present but are generally left empty since these systems operate on a DOS base. Conversely, Windows Me does not process CONFIG.SYS during startup; instead, it retrieves environment variables directly from the Windows Registry at:
- HKLM\System\CurrentControlSet\Control\SessionManager\Environment
Within the FlexOS environment, CONFIG.SYS is a binary file that specifies resource managers and device drivers loaded during system initialization.
Example
A sample CONFIG.SYS for MS-DOS 5: <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>
:;*?!
- Establishes labels within CONFIG.SYS to serve as jump targets for commands such as , , , and .
- Functions similarly to , primarily for inline comments following other CONFIG.SYS instructions. (Note: In MS-DOS/PC DOS, inline comments enclosed in double quotes are not ignored.)
- Used to begin inline comments alongside the ; directive.
- Prompts a Yes/No confirmation with an optional message before executing subsequent CONFIG.SYS commands.[1] (FreeDOS supports conditions via boot menus defined by and but lacks optional messages.) DOS version 6.0 and later allow appending after directives, e.g., or , with DR DOS also providing this feature.
- Executes the following CONFIG.SYS command unconditionally.
ATemplate:NbndC
- Indicates whether programs can be terminated upon encountering errors.
- Determines which drives record file access timestamps in reserved FAT directory entries.
- Enables conditional execution on AT-compatible systems.
- Acts as a boot manager.
- Adjusts the verbosity level of error messages.
- Alters the default serial device driver (COM1: through COM4:) assigned to the AUX device.
- Prevents character devices from being accessible outside the virtual \DEV directory.
- Loads core device drivers into memory.
- Produces a brief beep even if audio alerts are disabled via switches.
- Specifies the operating system to load next during boot.
- Enables or disables extended Ctrl+C checking functionality.
- Defines the quantity of disk buffers allocated.
- Similar to BUFFERS but loads buffers into High Memory Area (HMA) or Upper Memory Blocks (UMB).
- , CACHETTL, CACHEFLUSH (Embedded DOS 6-XL only)
- Manage cache block allocation timing and flushing behavior.
- Executes programs within CONFIG.SYS, running them in the foreground and pausing processing until completion.
- (DR-DOS 7.02+)
- Controls keyboard Caps Lock state.
- , CDDBUFFERS (PTS-DOS only)
- Specifies CD-ROM driver name and buffer parameters.
- (DR DOS 5.0+, Embedded DOS)
- Continues processing of CONFIG.SYS from a different file or label.
- , CLS, CODEPAGE (PTS-DOS or OS/2)
- Configure system clock type, clear screen functionality, and OEM codepages.
- , COLOR (PTS-DOS only)
- Sets CMOS RAM address and boot menu color schemes.
- (DR-DOS 7.02+)
- Configures number, sequence, I/O addresses, and timeouts for serial COM ports.
- , COMMENT(S), COUNTRY, CPOS, CPSW (various DOS versions)
- Manage DMA buffers, comment syntax, internationalization support, cursor positioning, and codepage switching.
CPU-specific directives available in PTS-DOS and DR-DOS 7.02+ include CPU88, CPU86, CPU286, CPU386, CPU486 with + variants for conditional execution based on CPU model or generation.
Together, these directives offer detailed control over system settings to optimize performance and ensure compatibility across diverse DOS platforms and hardware.
DTemplate:NbndF
- Adjusts relocation of drive descriptor tables in memory.
- Defines memory segment address used for multi-sector disk data deblocking operations.
- Activates internal debugger support features.
- Functions as a boot manager utility.
- Loads device drivers into conventional memory.
- Loads device drivers into upper memory areas (equivalent to in DRDOS 5.0).
- Sets country and codepage information for keyboard, screen, and printer devices.
- Configures cache memory size parameters.
- Specifies compatibility mode for floppy disk drives.
- Determines display font settings.
- Controls whether DOS loads into high memory and utilizes upper memory blocks.
- Loads DOS system tables such as BUFFERS, FCBS, FILES, LASTDRIVE, STACKS into upper memory regions.
- Specifies an alternate path location for DOS files.
- Defines search paths for data files used by the system.
- Details physical characteristics of disk drives.
- Sets parameters for unrecognized or unknown drives.
- Refer to for additional information.
- Enables error logging by specifying drive location for log files named
PDUMP.nnn. - Outputs a plain message to the display screen.
- Displays messages incorporating ANSI escape sequences for enhanced formatting.
- Activates extra validation checks during program startup.
- Assigns assumed error or return codes for subsequent commands executed by the system.
- Manages A20 gate state when launching programs to control memory access above 1MB boundary.
- Terminates CONFIG.SYS processing prematurely before reaching file end (with exceptions such as SWITCHES and SHELL under certain conditions).
- Defines hash table size to accelerate file opening operations—this differs from MS-DOS/PC DOS FASTOPEN driver implementation.
- Specifies number of cached File Control Blocks (FCBs) that can be open simultaneously (shares buffer space with FILES parameter in DR-DOS).
- Equivalent to FCBS but loads these structures into upper memory areas instead of conventional memory.
- Boot manager functionality included here as well.
- Sets maximum number of files that may be opened concurrently by the system.
- Same as FILES directive but loads file handles into upper memory blocks rather than conventional memory.
- Includes execution of designated CONFIG.SYS subsections as specified by IGNORE directive.
GTemplate:NbndI
- Waits for a key press or timeout, setting the error level to the ASCII value of the key or 1024 if timed out.
- Resumes processing of CONFIG.SYS at a designated label.
- Continues nested CONFIG.SYS processing at a specific label, then returns to the previous point.
- Refer to , , or for additional details.
- See also .
- See also .
- Refer to or for more information.
- Refer to or as well.
- See also .
- Loads a TSR application into memory following DOS data segment relocation. Compare with INSTCDEX.
- Consult , , or for further information.
- See also .
- Refer to or for related commands.
- Activates console and command line history buffer with enhanced pattern search capability.
- Defines the address of the High Memory Area (HMA) segment.
- Sets configuration for HLT power-saving mode.
- Specifies system verification for boot sector viruses.
- Loads installable file system drivers.
- Prevents execution of specific subsections within CONFIG.SYS.
- Permits designated programs to operate at CPU ring 2, enabling direct hardware I/O access.
- Incorporates directives from another menu block, emulated via GOSUB/RETURN in DR-DOS.
- Controls keyboard Insert mode status.
- Installs a TSR program into memory.
- Loads TSR into upper memory area (equivalent to HIINSTALL in DR DOS 5.0).
- Installs TSR after relocating DOS data segment; compare with INSTCDEX.
- Adjusts PIC interrupt priorities to give precedence to a specified IRQ number.
KTemplate:NbndM
- Defines the keyboard layout configuration.
- Sets the address for the relocated keyboard buffer.
- Specifies the maximum number of accessible drives.
- Similar to LASTDRIVE but loads Current Directory Structure into upper memory.
- Lists directories for DLL search paths.
- Manages compatibility handling for legacy applications.
- Sets the maximum number of file locks allowed.
- Configures display of boot logo alongside PTS-DOS boot manager interface.
- Defines count, sequence, I/O port address, and timeout settings for LPT1 device.
- Applies LPT1 settings equivalently to LPT2 device.
- Applies LPT1 settings equivalently to LPT3 device.
- Enables and configures LPT4 device similarly to other LPT ports.
- Specifies wait duration before elevating process priority.
- Configures strategy for memory allocation management.
- Establishes default DOS memory allocation method.
- Defines available menu options within CONFIG.SYS environment.
- Sets color schemes for menus (can be emulated under DR-DOS).
- Specifies default menu block (emulatable in DR-DOS).
- Defines multiple menu blocks (emulatable in DR-DOS).
- Enables operations involving multitrack disk access.
- Continues processing CONFIG.SYS in a new file after loading device driver and setting %NEWFILE% environment variable.
NTemplate:NbndQ
- Sets the default character representing No () in Yes/No/Resume prompts.
- Controls keyboard [[Num Lock|Template:Keypress]] activation status (on/off).
- Executes conditionally based on previous error code, e.g., .
- Displays message text and waits for key input, similar to DR-DOS commands and .
- Requires user confirmation for errors encountered during CONFIG.SYS processing.
- Configures buffer size parameters for LPT ports.
- Executes conditionally on PC-compatible hardware platforms.
- Adjusts scheduler priority settings.
- Sets priority level for disk I/O operations programs.
- Changes default printer driver assignment among LPT1 through LPT4 devices.
- Specifies whether DOS programs are permitted to run.
- Loads user interface components or modules.
- Executes conditionally on IBM PS/1-compatible systems.
- Executes conditionally on IBM PS/2-compatible systems.
- Suppresses output directed to STDOUT.
RTemplate:NbndT
- Activates automatic system reboot upon encountering errors.
- Permits inclusion of comments within CONFIG.SYS files.
- Allocates drive letters for local block device drivers.
- Defines the default Resume () character used in Yes/No/Resume prompts.
- Enables returning from nested CONFIG.SYS processing to the prior GOSUB or SWITCH point, optionally with a return code.
- Sets the size of real mode memory available.
- Allows simultaneous loading of programs in CONFIG.SYS, functioning similarly to CALL or INSTALL commands in DOS.
- Saves the initial character of deleted files within the FAT reserved area.
- Determines video mode settings in FreeDOS or screen access methods in PTS-DOS.
- Controls the on/off state of the keyboard Scroll Lock key.
- Establishes environment variables.
- Loads the command interpreter shell.
- Similar to SHELL but supports a SIZE parameter to pre-allocate COMMAND.COM in HMA or UMBs, preventing fragmentation—beneficial when using third-party shells.
- Specifies keyboard modifier states such as Shift Lock, Num Lock, Scroll Lock, and Insert mode.
- Determines whether files close upon pressing Ctrl+Alt+Del.
- Skips the Power-On Self-Test (POST) during reboot.
- , STACKSIZE, STACKSHIGH
- Set hardware interrupt stack sizes and buffer locations across different DOS versions and OS/2 platforms.
- , SYSBOOT, SYSGEN, SYSLOAD
- PTS-DOS-specific options managing boot configurations, alternative operating system boot files, memory layouts, and loading from alternate disk sectors.
- , SWITCH, SWITCHES
- Define conditional processing blocks and options mainly for DOS variants excluding DR-DOS and FreeDOS.
- , SWAPPATH
- OS/2 parameters for specifying error log drive and swap file directories.
- , THREADS, TIMESLICE
- OS/2 settings addressing FPU bug fixes, thread concurrency, and scheduler time slice durations.
- , TRACE, TRACEBUF
- Configure operation timeouts for CONFIG.SYS and enable tracing or logging features under DR-DOS, PTS-DOS, FreeDOS, and OS/2 systems.
- , TRAPDUMP
- Specifies temporary file extensions in PTS-DOS and detailed error logging options in OS/2.
UTemplate:NbndZ
- Directs DOS to use a designated segment as Upper Memory Block (UMB) space.
- Configures the UMB manager service.
- Defines address ranges allocated for UMB RAM usage.
- Enables or disables verification of disk writes.
- Sets the DOS version reported to applications.
- Manages VGA display status settings.
- Specifies the active video mode configuration.
- Controls whether virtual DMA access is permitted.
- Regulates processor Virtual Mode Extensions (VME).
- Configures Windows VxD (Virtual Device Driver) behavior.
- Sets Windows system support parameters.
- Manages relocation of the Extended BIOS Data Area (XBDA).
- Enables conditional execution on XT-class compatible machines.
- Implements built-in Year 2000 compliance features.
- Defines the default affirmative response character in prompts.
- Configures tracking for file deletions.
Issues
While booting is possible without CONFIG.SYS or AUTOEXEC.BAT files, these are crucial for comprehensive customization and meeting software requirements. Problems with either file necessitate troubleshooting.
If CONFIG.SYS lacks a SHELL directive or if it is absent or corrupted, DOS attempts to locate COMMAND.COM in the root directory. Versions prior to DOS 6.0 fail to boot without this file. In contrast, MS-DOS 6.0/PC DOS 6.1 and Novell DOS 7+ present a prompt requesting the command processor path. This prompt also appears if the main command interpreter terminates unexpectedly, offering limited shell replacement capabilities without restarting.
COMMAND.COM versions from MS-DOS 7.0 onward are incompatible with DR-DOS environments. This incompatibility impacts dual-boot setups where COMMAND.COM resides at C:\ root. To avoid conflicts, DR-DOS 7.02+ prevents bypassing SHELL directives during skip/trace/step modes and prompts users to provide valid shell filenames when none are found before loading COMMAND.COM.
Limits on CONFIG.SYS file size differ by operating system version—recent MS-DOS/PC DOS editions support up to 64 KB. DR-DOS imposes no explicit size restriction due to its line-by-line directive interpretation rather than tokenization and reordering used by MS-DOS. This approach offers DR-DOS enhanced control over driver and TSR loading sequences, facilitating conflict resolution and temporary program insertion via INSTALL.
MS-DOS/PC DOS versions 2.0 through 4.01 restrict SHELL lines to a maximum of 31 characters. Later releases extend this limit up to 128 characters, while DR-DOS permits up to 255 characters. Notably, CONFIG.SYS directives do not support long filenames.
Dual Booting DOS and Windows 9x
During the installation of Windows 95 on a pre-existing DOS/Windows system, the files CONFIG.SYS and AUTOEXEC.BAT are renamed to CONFIG.DOS and AUTOEXEC.DOS to enable dual boot functionality between Windows 9x and DOS. When the system boots into DOS, these files are temporarily reverted to their original filenames. Meanwhile, copies of the Windows 95 variants are preserved under the names CONFIG.W40 and AUTOEXEC.W40.
In setups where Caldera DR-DOS 7.02/7.03 coexists with Windows 95, the CONFIG.SYS and AUTOEXEC.BAT files used by Windows remain untouched, whereas DR-DOS employs startup files named DCONFIG.SYS and AUTODOS7.BAT.
OS/2 / Windows NT
OS/2 relies heavily on CONFIG.SYS to set up device drivers and environment variables prior to launching its graphical user interface.
Within the OS/2 subsystem included in Windows NT, CONFIG.SYS was presented as expected to OS/2 applications but was actually maintained within the system registry.
There exists a variety of undocumented CONFIG.SYS commands specific to OS/2.
CONFIG.SYS continues to be a fundamental component in OS/2-based operating systems such as eComStation and ArcaOS.
See also
- IBMBIO.COM / IO.SYS
- IBMDOS.COM / MSDOS.SYS
- CONFIG (environment variable)
- AUTOEXEC.BAT
- COMMAND.COM
- List of DOS commands
External links
- Information on AUTOEXEC.BAT and CONFIG.SYS at Computer Hope
- Overview of Windows 98 / MS-DOS 7.10 CONFIG.SYS directives (archived)
- Caldera's CONFIG.SYS Command Reference (archived) – summary of DR-DOS 7 directives
- Details on FreeDOS CONFIG.SYS directives
- User manual for PTS-DOS 2000 Pro including CONFIG.SYS directive descriptions
- Unofficial German PTS-DOS FAQ (PTS/FAQD) featuring additional CONFIG.SYS commands
- ↑ Cite error: Invalid
<ref>tag; no text was provided for refs namedPaul_2000_CONFIG