Page 1 of 1

help cd-rw booting

Posted: Tue Dec 15, 2009 7:32 am
by ChrisSkura
I have been working on my os with a floppy disk but now I want to make it work with a cd-rw. first I made an iso from a bootable floppy img and opened that with magic iso. then I dragged my bootloader and kernel into the file list that is going to be burned. I then clicked burn cd/dvd with iso, selected the bootable is from the floppy disk and burned my cd-rw. it burned fine and when I look at it with windows to view the files on it, it shows the boot.bin and kernel.bin files. I test it in my desktop from startup but it doesn't start my bootloader it just freezes on the black screen. I've been trying for about and hour and a half and I can't get it working. I don't know what I am doing wrong.

oh and when I try the same .bin files off a floppy disk my os works perfectly.

Re: help cd-rw booting

Posted: Tue Dec 15, 2009 7:38 am
by Solar
ChrisSkura wrote:first I made an iso from a bootable floppy img...
Your options are El-Torito or a Bootable CD. I am not quite sure what you did in "making an ISO from a bootable floppy image", but since it didn't work, I assume you did neither of the two, but some strange third way that didn't result in a properly bootable CD. 8)

Re: help cd-rw booting

Posted: Tue Dec 15, 2009 8:10 am
by Combuster
The bootable CD wiki page does just that - It takes a floppy image and hooks it up in an El-torito emulation configuration. While it should work in theory, I have seen enough hardware that:
- doesn't like CD-RWs
- doesn't like bootable CDs
- doesn't like El-torito emulation images. (while it does accept the more mainstream no-emulation El-torito)

If you picked 1 or 2, bad luck. If you picked 3, you can create a no-emulation CD with GRUB (its on the wiki as well), but you essentially need a different bootloader for either media.

Some other things, have you inserted some really simple code (like poking bytes into video memory) to see if your code actually gets executed instead of hanging over some unfortunate difference between a real floppy and the magic?
Also, when you'd browse such a CD, you should only see the floppy image and the boot catalog - the rest is unnecessary, and unavailable until you write a CD driver of some sort.

Re: help cd-rw booting

Posted: Tue Dec 15, 2009 8:20 am
by Solar
Combuster wrote:Some other things, have you inserted some really simple code (like poking bytes into video memory) to see if your code actually gets executed instead of hanging over some unfortunate difference between a real floppy and the magic?
ACK... that's so self-explanatory I keep forgetting asking about it. If you try something new, try it at its simplest: A kernel that simply writes an "X" to screen or somesuch. Any code you might have written while using your floppy might fail catastrophically when booted from CD, so it might not be the boot process at all.

Re: help cd-rw booting

Posted: Tue Dec 15, 2009 12:44 pm
by Dex
I have found some cd/dvd drives like cd-r and others cd-rw, you could download a iso from any project on this forum, to see if it's the code or cd-rw etc.
Just in case does your PC boot from USB ?.

Re: help cd-rw booting

Posted: Tue Dec 15, 2009 4:58 pm
by ChrisSkura
k, I used isomagic to make a bootable floppy img http://www.magiciso.com/tutorials/miso- ... ble-cd.htm
then I save my bin files to the cd and burn them using the iso I saved ^
I burn the like it shows in this link http://www.magiciso.com/tutorials/miso-burniso.htm

The bin that I save is a program that changes the video mode to graphics mode and prints out "hello, world!".

Re: help cd-rw booting

Posted: Mon Dec 21, 2009 1:58 am
by Solar
Reiterating:
Solar wrote:
Combuster wrote:Some other things, have you inserted some really simple code (like poking bytes into video memory) to see if your code actually gets executed instead of hanging over some unfortunate difference between a real floppy and the magic?
ACK... that's so self-explanatory I keep forgetting asking about it. If you try something new, try it at its simplest: A kernel that simply writes an "X" to screen or somesuch. Any code you might have written while using your floppy might fail catastrophically when booted from CD, so it might not be the boot process at all.
Take a working boot disk that has nothing to do with your kernel - like, a MS-DOS disk. Burn that to CD-RW and see if it still boots. If not, get a different "how to make a bootable CD" tutorial or a different burning tool.

Then take a bare-minimum bootloader (one that prints a character and hangs), put that on a disk image, test that it works when booted from floppy, then build a bootable CD-RW from it. If that doesn't work, you're doing something wrong.

Only then continue with "your" kernel.

Re: help cd-rw booting

Posted: Mon Dec 21, 2009 9:36 pm
by AndrewAPrice
Just incase you need it, I made a bootable ISO 9660 GRUB disc that you will be able to burn to CD-RW or mount in a virtual machine. GRUB boots files directly off the CD rather than emulate a floppy.

http://www.mediafire.com/file/i3dhyjjztwy/grub.iso (452KB)