converting floppy to iso failed to read disk

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
markq
Posts: 24
Joined: Fri Jan 30, 2015 3:42 pm

converting floppy to iso failed to read disk

Post 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.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: converting floppy to iso failed to read disk

Post 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.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
markq
Posts: 24
Joined: Fri Jan 30, 2015 3:42 pm

Re: converting floppy to iso failed to read disk

Post 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?
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: converting floppy to iso failed to read disk

Post by Combuster »

"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Post Reply