I was able to successfully recreate this.
I'm actually on a freshly installed Ubuntu Mate, so I had to install qemu (by the way... 'apt-get install qemu' as described on
qemu.org, does not install qemu anymore - please update the documentation, it's now ' qemu-kvm').
Yes, I was able to see "Boot failed: Could not read from CDROM (code 0004)"
Since computers like mine are only limited with 16 GiB of RAM where there is not enough memory for human readable error messages, I have to translate what "code 0004" means. I found numerous forum posts asking what code 0004 means before deciding to download the source, grep the string, and pray there are comments in the code (there were). The string "Boot failed: Could not read from CDROM" is found in /roms/seabios/src/boot.c and is a 'status' int returned from the cdrom_boot() command which takes a drive_s struct as a parameter. This command is located in util.h, which in turn tells me the C code is in cdrom.c
So there is an array of unsigned 8-bit words called buffer which is the length of CDROM_SECTOR_SIZE. This buffer is loaded with the Boot Record Volume Descriptor. If the zero'th byte of this buffer is not equal zero, integer 4 is returned, which is in turn seen as 0004.
I don't know what the Boot Record Volume Descriptor is, so I decided to find out. I went to the site
http://cdfs.com/cdfs-iso-primary.html This page suggests that the record begins with the Volume Descriptor Type and when this is 0, then "the Volume Descriptor is a Boot Record". This leads me to two conclusions: Either the disc ISO image is corrupted/nonstandard or it is not made to be a bootable disc.
I'm honestly not certain since I'm no expert on CD-ROMs. I only read some C code and a few technical docs.
Timothy D Legg
On Thu, 5 Jan 2023, at 10:28, Ed Rahn wrote:
> I get a 004 error when I try to boot from the ISO found at
> Winworldpc.com. The OEM CD works, but the Retail does not. Why would
> this be?
>
Hi Ed,
Which ISO? (there are many listed on that site)
Which version of QEMU?
What command line did you use?
When you say that the retail CD "does not work" what do you mean? Are there any errors?
At a guess, the OEM CD includes a bootloader and the retail one does not. It probably requires a boot floppy - QEMU is likely capable of emulating this, too.
Regards,
Adam