help cd-rw booting

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
ChrisSkura
Member
Member
Posts: 33
Joined: Sat Nov 07, 2009 2:47 am

help cd-rw booting

Post 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.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: help cd-rw booting

Post 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)
Every good solution is obvious once you've found it.
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: help cd-rw booting

Post 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.
"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 ]
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: help cd-rw booting

Post 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.
Every good solution is obvious once you've found it.
User avatar
Dex
Member
Member
Posts: 1444
Joined: Fri Jan 27, 2006 12:00 am
Contact:

Re: help cd-rw booting

Post 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 ?.
ChrisSkura
Member
Member
Posts: 33
Joined: Sat Nov 07, 2009 2:47 am

Re: help cd-rw booting

Post 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!".
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: help cd-rw booting

Post 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.
Every good solution is obvious once you've found it.
User avatar
AndrewAPrice
Member
Member
Posts: 2303
Joined: Mon Jun 05, 2006 11:00 pm
Location: USA (and Australia)

Re: help cd-rw booting

Post 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)
My OS is Perception.
Post Reply