I am using
qemu-system-i386 on a Windows 10 PC to emulate an MS-DOS system. I have installed MS-DOS 6.22 successfully from disk images from original Microsoft media.
I am starting qemu using this command:
c:\program files\qemu\qemu-system-i386.exe -hda msdos.disk -m 64 -L . -soundhw sb16,adlib,pcspk -k en-gb -vga cirrus -nic user,model=pcnet -boot order=d -drive file=.\cdrom.iso,media=cdrom,index=2,if=ide,format=raw
cdrom.iso is an image created by mkisofs (running under WSL) using this command:
mkisofs -pad -b disks/msdos/msd622_b.img -R -J -o cdrom.iso cdrom
This includes an El Torito boot floppy of MS-DOS 6.22. When running qemu with the above command, it successfully boots from CD-ROM into MS-DOS.
XDVD2.SYS detects the CD-ROM correctly, identifying it as a qemu virtual DVD-ROM.
MSCDEX runs correctly and assigns the CD drive a drive letter, as illustrated:
However, whenever I try to access the CD - for example, with
dir d:\, I get this error:
CDR101: Not ready reading drive D Abort, Retry, Fail?
The qemu virtual CD-ROM and the ISO file are both clearly valid, otherwise qemu would not have been able to boot the El Torito image. I have repeated the test using an old Windows 95 setup boot disk that uses a different CD driver and it too fails in the same way, so this appears to be something specific about MSCDEX inside qemu. I have also tried a different ISO image in case there is a problem with my ISO image, with no difference in results.
How can I access the qemu virtual CD-ROM from MS-DOS?
For reference, here are the boot disk's startup files.
DOS=HIGH,UMB BUFFERS=11,0 FILES=60 LASTDRIVE=H FCBS=1,0 STACKS=0,0 DEVICE=A:\DOS\HIMEM.SYS /TESTMEM:OFF DEVICE=A:\DOS\EMM386.EXE X=B800-C7FF I=B000-B7FF A=64 H=128 D=256 ON DEVICEHIGH=A:\DOS\SETVER.EXE COUNTRY=044,,A:\DOS\COUNTRY.SYS DEVICEHIGH=A:\DOS\DISPLAY.SYS CON=(EGA,,1) DEVICEHIGH=A:\EXTRAS\XDVD2.SYS /D:DVDROM SET TEMP=A:\TEMP SET TMP=A:\TEMP
@ECHO OFF A:\DOS\SMARTDRV.EXE /X PROMPT $p$g PATH A:\DOS A:\DOS\MODE.COM CON CODEPAGE PREPARE=((437) A:\DOS\EGA.CPI) A:\DOS\MODE.COM CON CODEPAGE SELECT=437 LH A:\DOS\KEYB.COM UK,,A:\DOS\KEYBOARD.SYS LH A:\DOS\DOSKEY.COM /INSERT LH A:\DOS\MSCDEX.EXE /D:DVDROM /M:20 /E