6

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:

qemu screenshot showing boot with CD

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.

CONFIG.SYS

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

AUTOEXEC.BAT

@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
  • What happens if you boot QEMU with only qemu-system-i386 -cdrom cdrom.iso? – Stephen Kitt Mar 17 at 22:32
  • 1
    The emulated FAT formatted floppy image that MS-DOS booted off of will be drive A: Drive D: will be the ISO 9660 file system on the CD-ROM, if any. If there's no ISO 9660 file system on the CD-ROM image then you'll get errors like the one you're receiving. – Ross Ridge Mar 17 at 22:32
  • @StephenKitt if I do this, then MSCDEX assigns C: to the CD-ROM drive, but I still get the error. – Richard Downer Mar 17 at 22:47
  • 1
    Thinking if it, is there a reason to invoke with -drive instead of -cdrom <filename> maybe the format=raw parameter isn't really helpful? It's your own image anyway, isn't it? – Raffzahn Mar 17 at 23:34
  • 1
    +1 Dos emulators are within the scope of this forum. I have the same problem but did not think to ask this forum. I am looking forward to the answer. – jwzumwalt Mar 21 at 4:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.