How to Set Up a RAM Disk on FreeDOS
A complete walkthrough configuring a RAM disk with the built-in RAM driver — a fast, volatile drive letter backed entirely by memory, useful for temporary files and speeding up disk-heavy tasks.
A RAM disk presents a portion of system memory as an ordinary DOS drive letter — dramatically faster than physical disk access, at the cost of losing everything on it the moment the system powers off or reboots.
Step 1: decide how much memory to allocate
Consider available conventional/upper/extended memory
(check with MEM first) before choosing a size — allocating
too much leaves too little for applications afterward.
Step 2: load the RAM disk driver in CONFIG.SYS
DEVICE=C:\FREEDOS\RAM.SYS 1024 /E
This creates a 1024KB (1MB) RAM disk. The /E flag places it in extended memory rather than conventional memory — almost always the right choice, since conventional memory is by far the scarcer resource.
Step 3: reboot and confirm the new drive letter appeared
DIR
The RAM disk appears as the next available drive letter after your existing physical drives and partitions.
Step 4: format the RAM disk (often required before first use)
FORMAT E: /Q
Some RAM disk driver versions require an explicit format before the drive is usable; others initialize it automatically — check for a “drive not formatted” error as the signal you need this step.
Step 5: use the RAM disk for temporary files
SET TEMP=E:\
SET TMP=E:\
Redirecting TEMP/TMP environment variables to the RAM disk speeds up any application or utility that writes temporary files heavily during operation, since those writes now hit memory instead of physical disk.
Step 6: copy frequently-accessed files to the RAM disk for a session
COPY C:\DATA\*.DAT E:\
For a task that repeatedly reads the same set of files, copying them to the RAM disk once per session and working from there can meaningfully speed up disk-bound workloads — particularly noticeable on genuinely old, slow physical disk hardware.
Step 7: remember to copy anything important back before shutting down
Everything on the RAM disk disappears completely at power-off or reboot — this is not a backup location, and there’s no warning prompt reminding you to save work off of it before shutting down.
Step 8: adjust the size later if needed
DEVICE=C:\FREEDOS\RAM.SYS 2048 /E
Changing the size requires editing CONFIG.SYS and rebooting — there’s no way to resize a RAM disk live while the system is running.
Why /E (extended memory) is almost always the right choice over conventional memory
Given how scarce and valuable conventional memory already is for actually running applications, backing a RAM disk with extended memory instead avoids competing with the exact resource most DOS-era software is already tightly constrained by. The only reason to use conventional memory for a RAM disk would be a system genuinely lacking extended memory entirely — an increasingly rare case even on fairly old hardware.