Vintage O/S: CD-ROM access from DOS

Reading a CD-ROM in DOS

A previous blog post discussed how to create a CD-ROM or DVD image as an ISO file. Accessing these images is easy if you have a Windows or Linux based operating system but what about MS-DOS?

This guide applies to physical CD-ROM drives as well as virtual ones if used in a hypervisor. To copy files from a CD-ROM disk or from an ISO image of one, we need to access it as a drive letter in DOS.

By default DOS represents the first floppy disk a drive A: and the second floppy disk as drive B: the first hard disk is drive C: so we want to allocate a drive letter to the CD-ROM. 

To do this, we need to load a device driver in CONFIG.SYS and then call it using the Microsoft CD-ROM Extension for DOS from AUTOEXEC.BAT.

There’s a few different drivers out there. I’ve tested the DOS OEM Adaptation Kit, OAK, LG and IBM CD drivers for DOS. After copying the driver files and MSCDEX.EXE to a directory called C:\DOS\CD, here’s the config details.

Note: a copy of MSCDEX.EXE is usually found on the DOS or Windows disks or on the Microsoft DOS CD-ROM support diskette if you have a copy.

Load the CD driver in the CONFIG.SYS but put it after the memory management drivers near the end of the file (may need LASTDRIVE=Z entry). In this example I’ve called it “CDDRIVER” but you can name it anything up to eight characters long :

DEVICE=C:\DOS\CD\OAKCDROM.SYS /D:CDDRIVER /L:X

Call “CDDRIVER” and allocate drive letter X by adding these two lines to AUTOEXEC.BAT:

C:\DOS\CD\MSCDEX.EXE /D:CDDRIVER /L:X
DEVICE=C:\DOS\CD\MSCDEX.EXE /D:X 

Reboot the machine, load or connect a CD and have a look at the file listing on drive X:

DIR X:

Done!