Page 1 of 1

converting floppy to iso failed to read disk

Posted: Fri Jan 30, 2015 3:49 pm
by markq
Hello,

I am trying to convert my floppy disk bootloader + kernel to an iso image but when I tried loading it in qemu it said failed to read disk. I am using the kernel found at https://github.com/sukwon0709/osdev. The command I used to convert to iso is:

Code: Select all

mkisofs -R -b os-image -no-emul-boot -boot-load-size 4 -o bootable.iso .
This will produce a iso file from os-image called bootable.iso.

when I typed:

Code: Select all

qemu-system-i386 -cdrom bootable.iso
qemu can't load the kernel. I thought the iso image is emulating the floppy but apparently something went wrong.

Re: converting floppy to iso failed to read disk

Posted: Fri Jan 30, 2015 4:17 pm
by Combuster
If you have a floppy disk bootloader, you'll want a floppy emulated boot, rather than the no-emulation boot you explicitly specify on the command line. The BIOS calls behave differently when booting natively from CD.

The floppy boot image needs to be exactly the 1.4MB of a floppy though, and contain everything you need to find and read from the CD later. If you can properly boot from floppy already, you can make that CD-bootable without much further thought this way.

Re: converting floppy to iso failed to read disk

Posted: Fri Jan 30, 2015 5:00 pm
by markq
Combuster wrote:If you have a floppy disk bootloader, you'll want a floppy emulated boot, rather than the no-emulation boot you explicitly specify on the command line. The BIOS calls behave differently when booting natively from CD.

The floppy boot image needs to be exactly the 1.4MB of a floppy though, and contain everything you need to find and read from the CD later. If you can properly boot from floppy already, you can make that CD-bootable without much further thought this way.
what is the command if I want to specify a floppy emulator?

Re: converting floppy to iso failed to read disk

Posted: Sat Jan 31, 2015 12:21 am
by Combuster